-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
53 lines (49 loc) · 2.78 KB
/
.eslintrc.json
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
{
"ignorePatterns": ["next-env.d.ts", "*.config.js"],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"globals": {
"JSX": "readonly",
"NodeJS": "readonly"
},
"extends": ["next/core-web-vitals", "next/typescript", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/strict", "plugin:jsx-a11y/strict", "airbnb"],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"rules": {
"indent": ["error", "tab", { "SwitchCase": 1 }],
"quotes": ["error", "double"],
"new-cap": ["error", { "capIsNew": false, "newIsCapExceptions": ["webkitSpeechRecognition"] }],
"no-tabs": ["error", { "allowIndentationTabs": true }],
"eol-last": ["error", "never"],
"no-shadow": "off", // -> @typescript-eslint/no-shadow
"camelcase": ["error", { "ignoreImports": true, "properties": "never" }],
"no-plusplus": "off",
"brace-style": ["error", "allman"],
"comma-dangle": ["error", "never"],
"no-unused-vars": "off", // -> @typescript-eslint/no-unused-vars
"linebreak-style": "off",
"space-in-parens": ["error", "always"],
"operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }],
"no-underscore-dangle": ["error", { "allow": ["__NEXT_ROUTER_BASEPATH"] }], // https://github.com/vercel/next.js/issues/52201#issuecomment-1620629437
"object-curly-newline": ["error", { "ImportDeclaration": { "minProperties": 0 }}],
"array-bracket-spacing": ["error", "always"],
"template-curly-spacing": ["error", "always"],
"computed-property-spacing": ["error", "always"],
"import/extensions": ["error", "never", { "json": "ignorePackages" }],
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "IntlMessages" }], // https://next-intl-docs.vercel.app/docs/workflows/typescript
"jsx-a11y/label-has-associated-control": ["error", { "assert": "either" } ], // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/718
"react/no-danger": "off", // https://github.com/pacocoursey/next-themes/blob/cd67bfa20ef6ea78a814d65625c530baae4075ef/packages/next-themes/src/index.tsx#L267
"react/jsx-indent": ["error", "tab"],
"react/jsx-indent-props": ["error", "tab"],
"react/react-in-jsx-scope": "off", // https://stackoverflow.com/a/61160875
"react-hooks/rules-of-hooks": "off", // https://github.com/vercel/next.js/issues/52566
"react/require-default-props": ["error", { "functions": "defaultArguments" }], // https://github.com/jsx-eslint/eslint-plugin-react/issues/2396
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }],
"react/jsx-one-expression-per-line": "off",
"react/no-unstable-nested-components": "off" // https://next-intl-docs.vercel.app/docs/usage/messages#rich-text
}
}