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
* Set eslint version to 9
* Remove @rushstack/eslint-patch dependency
We used modern-module-resolution plugin which seems to
be no longer needed in newer ESLint versions.
See: https://github.com/microsoft/rushstack/tree/main/eslint/eslint-patch#modern-module-resolution-feature
* Update @typescript-eslint and eslint-plugin-import
While running this eslint-config against belt, these
dependencies needed to get updated.
* Update README with working example
* Update config for setting jest version
* Upgraded package versions to avoid conflicting peer dependencies
- we needed to upgrade some dependencies to avoid peer dependency conflicts. The older versions of these packages did not support ESlint 9:
- eslint-plugin-jest
- eslint-plugin-jsx-a11y
- eslint-plugin-react
- eslint-plugin-testing-library
- removed eslint-plugin-react-native-a11y as it's sadly still not compatible with ESlint 9+. The GitHub repo has an open PR that has not been merged (the PR needs some cleanup)
- upgraded ESLint from v9 to v10. Since we're already doing a big version upgrade, we might as well go all the way to the latest
* Adjusted package.json
- change the eslint dev dependency from 10 to 9. Some of our dependencies don't support 10 yet
- also upgrade the eslint peer dependency to >= 9
- add the typescript dev dependency: it's equired by @typescript-eslint
- make the jest and typescript peer dependencies optional
* Updated the postinstall documentation
---------
Co-authored-by: Dave Iverson <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+26-32Lines changed: 26 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,58 +38,52 @@ The configurations that include Prettier turn off all formatting rules that are
38
38
39
39
### Example usage:
40
40
41
-
Following are some example usages of this config (eg. in `.eslintrc.js`).
41
+
Following are some example usages of this config (eg. in `eslint.config.mjs`).
42
42
43
43
React with TypeScript:
44
44
45
-
```json
46
-
{
47
-
"extends": [
48
-
"@thoughtbot/eslint-config",
49
-
"@thoughtbot/eslint-config/typescript"
50
-
]
51
-
}
45
+
```js
46
+
extends:compat.extends(
47
+
'@thoughtbot/eslint-config',
48
+
'@thoughtbot/eslint-config/typescript',
49
+
)
52
50
```
53
51
54
52
React Native with TypeScript:
55
53
56
-
```json
57
-
{
58
-
"extends": [
59
-
"@thoughtbot/eslint-config/native",
60
-
"@thoughtbot/eslint-config/typescript"
61
-
]
62
-
}
54
+
```js
55
+
extends:compat.extends(
56
+
'@thoughtbot/eslint-config/native',
57
+
'@thoughtbot/eslint-config/typescript'
58
+
)
63
59
```
64
60
65
61
Base web without React or TypeScript
66
62
67
-
```json
68
-
{
69
-
"extends": ["@thoughtbot/eslint-config/base"]
70
-
}
63
+
```js
64
+
extends:compat.extends(
65
+
'@thoughtbot/eslint-config/base',
66
+
)
71
67
```
72
68
73
69
You can override rules from the shared configuration, by setting your
74
70
own values within the `rules` property:
75
71
76
-
```json
77
-
{
78
-
"extends": "@thoughtbot/eslint-config",
79
-
"rules": {
80
-
"react/jsx-newline": "warn"
72
+
```js
73
+
rules: {
74
+
'no-console':'off',
75
+
'import/order':'off',
81
76
}
82
-
}
83
77
```
84
78
85
79
You might also need to add the following to your ESLint config if you get an error about Jest not being able to detect the version:
86
80
87
-
```json
88
-
{
89
-
"settings": {
90
-
"jest": { "version": "detect" }
91
-
}
92
-
}
81
+
```js
82
+
settings:{
83
+
jest: {
84
+
version:'detect',
85
+
},
86
+
},
93
87
```
94
88
95
89
Consult the [ESLint documentation][eslint-configuration] for more information about configuring ESLint, and take a look at the config files in this repo for more information about the rules and plugins they include.
@@ -98,7 +92,7 @@ Consult the [ESLint documentation][eslint-configuration] for more information ab
98
92
99
93
## License
100
94
101
-
thoughtbot ESLint Config is copyright (c) 2023 thoughtbot, inc.
95
+
thoughtbot ESLint Config is copyright (c) 2026 thoughtbot, inc.
102
96
It is free software, and may be redistributed under the
0 commit comments