Skip to content

Commit

Permalink
chore: upgrade ESLint to v9 and update configurations (#356)
Browse files Browse the repository at this point in the history
* 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
satnaing authored Aug 19, 2024
1 parent dab61b3 commit 6bbe177
Show file tree
Hide file tree
Showing 8 changed files with 524 additions and 683 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
!astro.config.ts
!package.json
!.prettierrc
!.eslintrc.js
!eslint.config.mjs
!README.md
44 changes: 44 additions & 0 deletions eslint.config.mjs
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"],
},
];
Loading

0 comments on commit 6bbe177

Please sign in to comment.