-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
64 lines (64 loc) · 2.04 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
57
58
59
60
61
62
63
64
module.exports = {
env: { browser: true, node: true, es2022: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/all",
"plugin:eslint-comments/recommended",
"plugin:import/recommended",
"plugin:jsx-a11y/strict",
"plugin:promise/recommended",
"plugin:react-hooks/recommended",
"plugin:react/all",
"plugin:sonarjs/recommended",
"next/core-web-vitals",
"prettier",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
React: "writable",
},
ignorePatterns: ["public"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: { jsx: true },
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
plugins: ["simple-import-sort"],
rules: {
"@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "variable",
format: ["camelCase", "PascalCase", "UPPER_CASE"],
},
],
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"eslint-comments/no-unused-disable": "warn",
"import/exports-last": "warn",
"import/newline-after-import": "warn",
"import/no-default-export": "warn",
"import/no-extraneous-dependencies": "warn",
"jsx-a11y/anchor-is-valid": "off",
"no-console": ["warn", { allow: ["warn", "error"] }],
"react/forbid-component-props": "off",
"react/function-component-definition": "off",
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
"react/jsx-max-depth": ["warn", { max: 6 }],
"react/jsx-no-literals": "off",
"react/require-default-props": "off",
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": "warn",
},
overrides: [
{ files: ["pages/**"], rules: { "import/no-default-export": "off" } },
],
settings: {
react: { version: "detect" },
"import/extensions": [".ts", ".tsx", ".d.ts", ".js"],
"import/external-module-folders": ["node_modules", "node_modules/@types"],
},
};