Skip to content

Commit a459e78

Browse files
committed
docs: update configuration docs
1 parent f5436e1 commit a459e78

File tree

4 files changed

+21
-47
lines changed

4 files changed

+21
-47
lines changed

.zed/settings.json

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,8 @@
11
{
2-
// Whether or not to remove any trailing whitespace from lines of a buffer
3-
// before saving it.
42
"remove_trailing_whitespace_on_save": true,
5-
// Whether to start a new line with a comment when a previous line is a comment as well.
63
"extend_comment_on_newline": true,
7-
// Removes any lines containing only whitespace at the end of the file and
8-
// ensures just one newline at the end.
94
"ensure_final_newline_on_save": true,
10-
// Whether or not to perform a buffer format before saving
11-
//
12-
// Keep in mind, if the autosave with delay is enabled, format_on_save will be ignored
135
"format_on_save": "on",
14-
// How to perform a buffer format. This setting can take 4 values:
15-
//
16-
// 1. Format code using the current language server:
17-
// "formatter": "language_server"
18-
// 2. Format code using an external command:
19-
// "formatter": {
20-
// "external": {
21-
// "command": "prettier",
22-
// "arguments": ["--stdin-filepath", "{buffer_path}"]
23-
// }
24-
// }
25-
// 3. Format code using Zed's Prettier integration:
26-
// "formatter": "prettier"
27-
// 4. Default. Format files using Zed's Prettier integration (if applicable),
28-
// or falling back to formatting via language server:
29-
// "formatter": "auto"
306
"formatter": {
317
"external": {
328
"command": "node_modules/.bin/dprint",
@@ -37,21 +13,7 @@
3713
]
3814
}
3915
},
40-
// How to soft-wrap long lines of text.
41-
// Possible values:
42-
//
43-
// 1. Prefer a single line generally, unless an overly long line is encountered.
44-
// "soft_wrap": "none",
45-
// "soft_wrap": "prefer_line", // (deprecated, same as "none")
46-
// 2. Soft wrap lines that overflow the editor.
47-
// "soft_wrap": "editor_width",
48-
// 3. Soft wrap lines at the preferred line length.
49-
// "soft_wrap": "preferred_line_length",
50-
// 4. Soft wrap lines at the preferred line length or the editor width (whichever is smaller).
51-
// "soft_wrap": "bounded",
52-
"soft_wrap": "none",
53-
// The column at which to soft-wrap lines, for buffers where soft-wrap
54-
// is enabled.
16+
"soft_wrap": "editor_width",
5517
"preferred_line_length": 120,
5618
"prettier": {
5719
"allowed": false

apps/website/content/docs/configuration/configure-fixer.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/website/content/docs/configuration/configure-language-config.mdx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ title: "Configure Language Config"
44

55
import { JSXRuntimeTypeTable } from "./configure-language-config";
66

7-
ESLint React references your project configuration to determine how to perform code checking.
7+
<Callout title="TIP">
88

9-
This page will explain which parts of ESLint React respect your project configuration.
9+
Once you've correctly configured the `project` or `projectService` in `parserOptions` for the files to be analyzed, ESLint React utilizes the information within to make more accurate determinations.
10+
11+
</Callout>
12+
13+
ESLint React references your language config to determine how to perform static code analysis. This page details which parts of ESLint React utilize your language config.
1014

1115
## JSX Runtime
1216

@@ -16,6 +20,19 @@ The following [compiler options](https://www.typescriptlang.org/tsconfig/#compil
1620

1721
<JSXRuntimeTypeTable />
1822

23+
Since this part does not perform type checking, there is almost no performance impact.
24+
25+
## Rules that Need Type Information
26+
27+
The following rules require type information:
28+
29+
- [`react-x/prefer-read-only-props`](/docs/rules/prefer-read-only-props)
30+
- [`react-x/no-leaked-conditional-rendering`](/docs/rules/no-leaked-conditional-rendering)
31+
32+
These rules will not work if you do not provide a `project` or `projectService` in the `parserOptions`.
33+
34+
This part has a performance impact, as it requires TypeScript to analyze the entire project. As a result, these rules are slower than traditional lint rules but are much more powerful.
35+
1936
## Resources
2037

2138
For more information, see:
@@ -24,3 +41,4 @@ For more information, see:
2441
- [TypeScript ESLint Parser Options](https://typescript-eslint.io/packages/parser)
2542
- [`project`](https://typescript-eslint.io/packages/parser/#project)
2643
- [`projectService`](https://typescript-eslint.io/packages/parser/#projectservice)
44+
- [Linting with Type Information](https://typescript-eslint.io/getting-started/typed-linting/)

apps/website/content/docs/configuration/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"title": "Configuration",
33
"pages": [
44
"configure-analyzer",
5-
"!configure-fixer",
65
"configure-language-config",
76
"!configure-language-preference",
87
"!---Advanced Configuration---",

0 commit comments

Comments
 (0)