-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
69 lines (68 loc) · 1.84 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
62
63
64
65
66
67
68
69
/**
* @type {import("eslint").Linter.Config}
*/
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "tsconfig.json"
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
"next",
"next/core-web-vitals",
"plugin:jsx-a11y/recommended"
],
"plugins": ["react", "jsx-a11y", "check-file"],
"rules": {
"import/extensions": ["off", "ignorePackages"],
"no-unused-expressions": ["error", { "enforceForJSX": true }],
"import/no-default-export": 0,
"import/no-anonymous-default-export": 0,
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"jsx-a11y/no-autofocus": 0,
"jsx-a11y/alt-text": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-explicit-any": "off",
"react/jsx-curly-brace-presence": [
1,
{ "props": "never", "propElementValues": "always" }
],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "lodash",
"importNames": ["default"],
"message": "Please import only the functions you need to reduce bundle size. E.g. import { range } from 'lodash'"
}
]
}
]
},
"overrides": [
{
"files": ["*.test.ts{,x}"],
"rules": {
"no-restricted-imports": 0 // this are purely for bundle size
}
},
{
"files": ["*.stories.ts{,x}"],
"rules": {
"import/no-default-export": 0 // storybook uses default export
}
}
]
}