generated from mayone-du/chrome-extension-template-with-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.95 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: { project: "./tsconfig.json", ecmaFeatures: { jsx: true } },
settings: { react: { version: "detect" } },
env: { es2021: true, browser: true, jest: true, node: true },
plugins: ["@typescript-eslint", "import", "simple-import-sort", "tailwindcss"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
],
rules: {
"no-restricted-syntax": [
"error",
{ selector: "TSEnumDeclaration", message: "Don't declare enums" },
],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"func-style": ["error", "expression"],
"no-restricted-imports": ["error", { paths: [{ name: "react", importNames: ["default"] }] }],
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/display-name": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"import/newline-after-import": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"tailwindcss/classnames-order": "warn",
"tailwindcss/no-custom-classname": "warn",
"tailwindcss/no-contradicting-classname": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/consistent-type-imports": ["warn", { prefer: "type-imports" }],
"jsx-a11y/anchor-is-valid": [
"error",
{
components: ["Link"],
specialLink: ["hrefLeft", "hrefRight"],
aspects: ["invalidHref", "preferButton"],
},
],
},
overrides: [
{
files: ["src/pages/**/*.tsx"],
rules: { "import/no-default-export": "off" },
},
],
};