Skip to content

Commit

Permalink
chore(deps): update dependency eslint to v9 (#33)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency eslint to v9

* fixup: debug

* fixup: add trailing EOF blank line

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kris Stern <[email protected]>
  • Loading branch information
renovate[bot] and krisstern authored Oct 12, 2024
1 parent 814335a commit 3c0ee96
Show file tree
Hide file tree
Showing 5 changed files with 321 additions and 243 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

56 changes: 56 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { fixupConfigRules } from "@eslint/compat";
import reactRefresh from "eslint-plugin-react-refresh";
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 [{
ignores: [
"**/dist",
"node_modules/",
"tests/fixtures/",
"coverage/",
"docs/",
"jsdoc/",
"dist/",
],
}, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier",
)), {
plugins: {
"react-refresh": reactRefresh,
},

languageOptions: {
globals: {
...globals.browser,
},

parser: tsParser,
},

rules: {
"react-refresh/only-export-components": "off",
"no-unused-vars": "error",

"prefer-const": ["error", {
ignoreReadBeforeAssign: true,
}],
},

files: ["**/*.ts", "**/*.tsx"],
}];
Loading

0 comments on commit 3c0ee96

Please sign in to comment.