forked from kaje94/menufic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
61 lines (60 loc) · 2.5 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
54
55
56
57
58
59
60
61
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "react", "prettier", "sort-keys-fix", "typescript-sort-keys", "jsx-a11y"],
"extends": [
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:jsx-a11y/recommended"
],
"rules": {
"react/prop-types": "off",
"import/prefer-default-export": "off",
"react-hooks/exhaustive-deps": "off",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": "off",
"no-promise-executor-return": "off",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-shadow": ["warn"],
"prettier/prettier": ["warn", { "tabWidth": 4, "printWidth": 120 }],
"sort-keys-fix/sort-keys-fix": "warn",
"typescript-sort-keys/interface": "warn",
"react/jsx-sort-props": ["warn", { "reservedFirst": ["key"] }],
"sort-imports": ["warn", { "ignoreCase": true, "ignoreDeclarationSort": true }],
"import/order": [
"warn",
{
"groups": [["external", "builtin", "object"], "type", "internal", ["parent", "sibling", "index"]],
"pathGroups": [
{ "pattern": "react", "group": "external", "position": "before" },
{ "pattern": "@src/**", "group": "internal" }
],
"pathGroupsExcludedImportTypes": ["internal", "react"],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
],
"max-lines": ["warn", 300],
"react/jsx-filename-extension": ["error", { "extensions": [".ts", ".tsx"] }],
"import/extensions": ["error", "ignorePackages", { "tsx": "never", "ts": "never" }],
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"@typescript-eslint/consistent-type-imports": "warn",
"react/no-unescaped-entities": "off",
"react/jsx-no-useless-fragment": "off"
}
}