Skip to content

Commit 1b1afe8

Browse files
committed
Add recommended @eslint/js config
1 parent c8e47f2 commit 1b1afe8

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

eslint.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1+
import eslint from "@eslint/js";
12
import eslintPlugin from "eslint-plugin-eslint-plugin";
23
import nodePlugin from "eslint-plugin-n";
4+
import globals from "globals";
35

46
export default [
7+
eslint.configs.recommended,
58
eslintPlugin.configs["flat/recommended"],
69
nodePlugin.configs["flat/recommended"],
710
{
811
ignores: ["dist/**", "node_modules/**", ".yarn/**"],
912
},
13+
{
14+
languageOptions: {
15+
globals: {
16+
...globals.node,
17+
},
18+
},
19+
},
20+
{
21+
files: ["test/**"],
22+
languageOptions: {
23+
globals: {
24+
...globals.mocha,
25+
},
26+
},
27+
},
1028
];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"globals": "^16.2.0"
4242
},
4343
"devDependencies": {
44+
"@eslint/js": "^9.28.0",
4445
"esbuild": "^0.25.3",
4546
"eslint": "^9.20.1",
4647
"eslint-plugin-eslint-plugin": "^6.4.0",

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,13 @@ __metadata:
273273
languageName: node
274274
linkType: hard
275275

276+
"@eslint/js@npm:^9.28.0":
277+
version: 9.28.0
278+
resolution: "@eslint/js@npm:9.28.0"
279+
checksum: 10c0/5a6759542490dd9f778993edfbc8d2f55168fd0f7336ceed20fe3870c65499d72fc0bca8d1ae00ea246b0923ea4cba2e0758a8a5507a3506ddcf41c92282abb8
280+
languageName: node
281+
linkType: hard
282+
276283
"@eslint/object-schema@npm:^2.1.6":
277284
version: 2.1.6
278285
resolution: "@eslint/object-schema@npm:2.1.6"
@@ -976,6 +983,7 @@ __metadata:
976983
version: 0.0.0-use.local
977984
resolution: "eslint-plugin-react-you-might-not-need-an-effect@workspace:."
978985
dependencies:
986+
"@eslint/js": "npm:^9.28.0"
979987
esbuild: "npm:^0.25.3"
980988
eslint: "npm:^9.20.1"
981989
eslint-plugin-eslint-plugin: "npm:^6.4.0"

0 commit comments

Comments
 (0)