-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESLint 9.x introduced a new format for the configuration file. The old configuration file has been migrated to the new format using the guide and provided CLI[^1]. [^1]: https://eslint.org/docs/latest/use/configure/migration-guide#migrate-your-config-file
- Loading branch information
Showing
2 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import globals from "globals"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
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( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
), | ||
{ | ||
plugins: { | ||
"@typescript-eslint": typescriptEslint, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
|
||
rules: {}, | ||
}, | ||
]; |