Skip to content

Commit 0ff5d1f

Browse files
authored
chore: update ESLint config to use define config (#204)
* chore: update ESLint config to use `defineConfig` * wip: update `.gitignore` * wip: remove blanks
1 parent 8fecc66 commit 0ff5d1f

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ temp/
33
npm-debug.log
44
.eslint-release-info.json
55
/.vscode/
6+
*.code-workspace

eslint.config.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
12
import globals from "globals";
23
import eslintConfigESLint from "eslint-config-eslint";
34
import eslintConfigESLintFormatting from "eslint-config-eslint/formatting";
45

5-
export default [
6-
...eslintConfigESLint,
6+
export default defineConfig([
7+
eslintConfigESLint,
78
eslintConfigESLintFormatting,
8-
{
9-
name: "generator-eslint/global-ignores",
10-
ignores: ["temp/", "*/templates/*"]
11-
},
9+
globalIgnores(["temp/", "*/templates/*"]),
1210
{
1311
name: "generator-eslint/test-files",
1412
files: ["tests/**/*.js"],
1513
languageOptions: { globals: globals.mocha }
1614
}
17-
];
15+
]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"yeoman-generator": "^7.3.3"
3838
},
3939
"devDependencies": {
40-
"eslint": "^9.13.0",
40+
"eslint": "^9.30.1",
4141
"eslint-config-eslint": "^11.0.0",
4242
"eslint-release": "^3.2.2",
4343
"globals": "^15.11.0",

rule/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* @author Nicholas C. Zakas
44
*/
55

6-
76
//------------------------------------------------------------------------------
87
// Requirements
98
//------------------------------------------------------------------------------

tests/lib/validators.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ describe("validation helpers", () => {
1818
it("some valid plugin names", () => {
1919
strictEqual(isPluginId("eslint-plugin-foo"), true);
2020
strictEqual(isPluginId("foo-bar"), true);
21-
2221
});
2322

2423
it("plugin id can contain numbers", () => {

tests/rule/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* @author Nicholas C. Zakas
44
*/
55

6-
76
//------------------------------------------------------------------------------
87
// Requirements
98
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)