You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next, add an `eslintConfig` member to your project's `package.json`. At a minimum, this config file must include an `extends` member:
13
+
Next, add an `eslint.config.js` file to the root of your project. At a minimum, this config file must include the following:
14
14
15
-
```json
16
-
{
17
-
"eslintConfig": {
18
-
"extends": "tschaub"
19
-
}
20
-
}
15
+
```js
16
+
importconfigfrom'eslint-config-tschaub';
17
+
18
+
exportdefault [...config];
21
19
```
22
20
23
-
See the ESLint [configuration guide](http://eslint.org/docs/user-guide/configuring) for details on additional configuration options. Any rules configured in your `package.json` file will override those provided by the `eslint-config-tschaub` package.
21
+
See the ESLint [configuration guide](https://eslint.org/docs/latest/use/configure/) for details on additional configuration options. Any rules configured in your `eslint.config.js` file will override those provided by the `eslint-config-tschaub` package.
24
22
25
23
### Use
26
24
@@ -38,9 +36,9 @@ With this `pretest` entry in your `package.json`, ESLint will run on all JavaScr
38
36
39
37
npm test
40
38
41
-
See the ESLint [CLI guide](http://eslint.org/docs/user-guide/command-line-interface) for additional options when running ESLint.
39
+
See the ESLint [CLI guide](https://eslint.org/docs/latest/use/command-line-interface) for additional options when running ESLint.
42
40
43
-
In addition to running the linter when your tests are run, you should configure your editor to run the linter as well. See the [ESLint integration page](http://eslint.org/docs/user-guide/integrations#editors) to find details on configuring your editor to warn you of ESLint errors.
41
+
In addition to running the linter when your tests are run, you should configure your editor to run the linter as well. See the [ESLint integration page](https://eslint.org/docs/latest/use/integrations#editors) to find details on configuring your editor to warn you of ESLint errors.
44
42
45
43
See the [examples directory](https://github.com/tschaub/eslint-config-tschaub/tree/main/examples) for more usage examples.
46
44
@@ -50,30 +48,26 @@ The `eslint-config-tschaub` package includes a number of ESLint configuration pr
50
48
51
49
#### `tschaub` (base config)
52
50
53
-
The "base" config is suitable for Node projects or browser-based projects using a CommonJS module loader (e.g. [Browserify](http://browserify.org/) or [Webpack](http://webpack.github.io/)).
51
+
The "base" config is suitable for Node or browser-based projects.
54
52
55
-
Example configuration in `package.json`:
56
-
```json
57
-
{
58
-
"eslintConfig": {
59
-
"extends": "tschaub"
60
-
}
61
-
}
53
+
Example configuration in `eslint.config.js`:
54
+
```js
55
+
importconfigfrom'eslint-config-tschaub';
56
+
57
+
exportdefault [...config];
62
58
```
63
59
64
60
#### `tschaub/react`
65
61
66
-
The `tschaub/react` config is suitable for projects using [React](https://reactjs.org/). This extends the base config to include the React plugin, enable JSX parsing, and run React specific rules. To use this profile, you'll need to install the `eslint-plugin-react`package:
62
+
The `tschaub/react` config is suitable for projects using [React](https://react.dev/). This extends the base config to include the React plugin, enable JSX parsing, and run React specific rules. To use this profile, you'll need to install the `eslint-plugin-react`and `eslint-plugin-react-hooks` packages:
0 commit comments