Skip to content

Commit

Permalink
Migrate ESLint config to the new v9 format
Browse files Browse the repository at this point in the history
See:
 - https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config
 - https://eslint.org/docs/latest/use/configure/migration-guide
 - https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file

Did:
 > npx @eslint/migrate-config .eslintrc.json
 > npm install @eslint/js @eslint/eslintrc -D
 > mv eslint.config.mjs eslint.config.js

# Conflicts:
#	package-lock.json
  • Loading branch information
torokati44 committed Nov 13, 2024
1 parent 2ff5d59 commit 4bec9eb
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 186 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.json

This file was deleted.

21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@next/next/core-web-vitals",
),
];
229 changes: 51 additions & 178 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"recharts": "^2.13.3"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@types/d3": "^7.4.3",
"@types/jsdom": "^21.1.7",
"@types/node": "^22",
Expand Down

0 comments on commit 4bec9eb

Please sign in to comment.