-
-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade ESLint to v9 and update configurations (#356)
* chore: upgrade ESLint to v9 and update configurations Upgrade ESLint and configure and update ESLint rules. * refactor: update code to comply with new ESLint v9 rules
- Loading branch information
Showing
8 changed files
with
524 additions
and
683 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,5 +9,5 @@ | |
!astro.config.ts | ||
!package.json | ||
!.prettierrc | ||
!.eslintrc.js | ||
!eslint.config.mjs | ||
!README.md |
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,44 @@ | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
import tseslint from "typescript-eslint"; | ||
import astroParser from "astro-eslint-parser"; | ||
import eslintPluginAstro from "eslint-plugin-astro"; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
...tseslint.configs.recommended, | ||
...eslintPluginAstro.configs.recommended, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["*.astro"], | ||
languageOptions: { | ||
parser: astroParser, | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
extraFileExtensions: [".astro"], | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["tailwind.config.cjs", "**/*.d.ts"], | ||
rules: { | ||
"@typescript-eslint/no-require-imports": "off", | ||
"@typescript-eslint/triple-slash-reference": "off", | ||
}, | ||
}, | ||
{ | ||
rules: { | ||
"@typescript-eslint/no-unused-expressions": "off", | ||
}, | ||
}, | ||
{ | ||
ignores: ["dist/**", ".astro"], | ||
}, | ||
]; |
Oops, something went wrong.