-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
51 lines (45 loc) · 1.35 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
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended" // TypeScript rules
],
"root": true,
"env": { "browser": false },
"plugins": ["prettier", "simple-import-sort"],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"rules": {
"prettier/prettier": "error",
// Auto-sort imports
"sort-imports": "off",
"import/order": "off",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// Custom preferences
"import/prefer-default-export": "off",
"no-bitwise": "off",
"no-plusplus": "off",
/* Typescript */
"arrow-body-style": ["off"],
"@typescript-eslint/no-explicit-any": "off",
// This rule is not compatible with Next.js's <Link /> components
"jsx-a11y/anchor-is-valid": "off",
// Why would you want unused vars?
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-unused-vars-experimental": "error",
"no-unused-vars": "off",
// I suggest this setting for requiring return types on functions only where useful
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true,
"allowConciseArrowFunctionExpressionsStartingWithVoid": true
}
]
}
}