-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
62 lines (56 loc) · 1.74 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
module.exports = {
root: true,
ignorePatterns: [
"node_modules/*",
".next/*",
"out/*",
"http/*",
"certs/*",
"logs/*",
"!.prettierrc",
],
extends: [
"plugin:jsx-a11y/recommended", // Accessibility rules
"next/core-web-vitals", // NextJS has some jsx-a11y overrides so we load the base second
"plugin:prettier/recommended", // Prettier plugin
],
rules: {
// May turn this off in the future
"import/no-anonymous-default-export": "off",
// may turn this on later, creates issues for HTML
"react/no-unescaped-entities": 0,
// This rule is not compatible with Next.js's <Link /> components
"jsx-a11y/anchor-is-valid": "off",
// Includes .prettierrc rules
"prettier/prettier": ["warn", {}, { usePrettierrc: true }],
},
overrides: [
// This configuration will apply only to TypeScript files
{
files: ["**/*.ts?(x)"],
parser: "@typescript-eslint/parser",
extends: [
"plugin:@typescript-eslint/recommended", // TypeScript rules
],
rules: {
// we should allow implicit any
"@typescript-eslint/no-explicit-any": "off",
// We don't need this ... for now
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
minimumDescriptionLength: 10,
},
],
// should probably allow this ... but we wont for now
"@typescript-eslint/no-non-null-assertion": "off",
// turn off default unused vars
"no-unused-vars": "off",
// Why would you want unused vars?
"@typescript-eslint/no-unused-vars": ["warn"],
},
},
],
};