Skip to content

Commit 2c46b09

Browse files
committed
Update docs and dependencies
1 parent 94137ad commit 2c46b09

File tree

3 files changed

+72
-73
lines changed

3 files changed

+72
-73
lines changed

package-lock.json

+46-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,20 @@
2727
"fix-examples": "eslint --fix examples"
2828
},
2929
"license": "MIT",
30-
"eslintConfig": {
31-
"extends": "./index.js"
32-
},
3330
"devDependencies": {
34-
"eslint": "^9.19.0",
35-
"eslint-plugin-react": "^7.37.2",
36-
"eslint-plugin-react-hooks": "^5.0.0",
31+
"eslint": "^9.20.1",
32+
"eslint-plugin-react": "^7.37.4",
33+
"eslint-plugin-react-hooks": "^5.1.0",
3734
"prop-types": "^15.8.1",
3835
"react": "^19.0.0",
3936
"react-dom": "^19.0.0"
4037
},
4138
"dependencies": {
4239
"eslint-config-prettier": "^10.0.1",
4340
"eslint-plugin-import": "^2.31.0",
44-
"eslint-plugin-jsdoc": "^50.5.0",
45-
"eslint-plugin-prettier": "^5.2.1",
46-
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
47-
"prettier": "^3.3.3"
41+
"eslint-plugin-jsdoc": "^50.6.3",
42+
"eslint-plugin-prettier": "^5.2.3",
43+
"globals": "^15.15.0",
44+
"prettier": "^3.5.1"
4845
}
4946
}

readme.md

+19-25
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ To make use of this config, install ESLint (>= 8.0) and this package as a develo
1010

1111
npm install eslint eslint-config-tschaub --save-dev
1212

13-
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:
1414

15-
```json
16-
{
17-
"eslintConfig": {
18-
"extends": "tschaub"
19-
}
20-
}
15+
```js
16+
import config from 'eslint-config-tschaub';
17+
18+
export default [...config];
2119
```
2220

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.
2422

2523
### Use
2624

@@ -38,9 +36,9 @@ With this `pretest` entry in your `package.json`, ESLint will run on all JavaScr
3836

3937
npm test
4038

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.
4240

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.
4442

4543
See the [examples directory](https://github.com/tschaub/eslint-config-tschaub/tree/main/examples) for more usage examples.
4644

@@ -50,30 +48,26 @@ The `eslint-config-tschaub` package includes a number of ESLint configuration pr
5048

5149
#### `tschaub` (base config)
5250

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.
5452

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+
import config from 'eslint-config-tschaub';
56+
57+
export default [...config];
6258
```
6359

6460
#### `tschaub/react`
6561

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:
6763

6864
npm install --save-dev eslint-plugin-react eslint-plugin-react-hooks
6965

70-
Then your minimal configuration in `package.json` would look like this:
66+
Then your minimal configuration in `eslint.config.js` would look like this:
7167
```json
72-
{
73-
"eslintConfig": {
74-
"extends": "tschaub/react"
75-
}
76-
}
68+
import config from 'eslint-config-tschaub/react';
69+
70+
export default [...config];
7771
```
7872

7973
### Development

0 commit comments

Comments
 (0)