Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
modsen-hedgehog committed Dec 6, 2024
1 parent 76d5498 commit 0bd0fc7
Show file tree
Hide file tree
Showing 3 changed files with 397 additions and 57 deletions.
19 changes: 12 additions & 7 deletions eslintrc.config.ts → eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export default [
{
import { FlatCompat } from "@eslint/eslintrc";

const compat = new FlatCompat({
baseDirectory: process.cwd(), // Ensure ESLint knows where to find the configuration
recommendedConfig: {
parser: "@babel/eslint-parser",
parserOptions: {
requireConfigFile: false,
Expand All @@ -10,14 +13,16 @@ export default [
jsx: true,
},
},
},
});

export default [
...compat.config({
extends: ["eslint:recommended", "plugin:react/recommended"],
plugins: ["react", "react-hooks"],
rules: {
// we don't use prop-types
"react/prop-types": 0,
// this would throw an error e.g. for quotes ('')
"react/no-unescaped-entities": 0,
// in callbacks it's handy to leave unused function parameters
"no-unused-vars": ["error", { args: "none" }],
},
env: {
Expand All @@ -30,5 +35,5 @@ export default [
version: "detect",
},
},
},
];
}),
];
Loading

0 comments on commit 0bd0fc7

Please sign in to comment.