forked from Dan503/time-input-polyfill-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
79 lines (75 loc) · 2.49 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
70
71
72
73
74
75
76
77
78
79
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
// "plugins": ["prettier"],
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
"prettier/prettier": "warn",
// Prettier and ES Lint disagree about how some indents should work.
// I can"t stop Prettier but I can stop ES Lint
"indent": [0, "tab"],
"no-use-before-define": [0, false],
"camelcase": [0, "never"],
"quotes": ["error", "single"],
"semi": ["error", "never"],
"no-unused-vars": [
"warn",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": true }
],
"no-nested-ternary": "error"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"env": { "browser": true, "es6": true, "node": true, "cypress/globals": true },
"extends": [
// Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:@typescript-eslint/recommended",
// Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"prettier/@typescript-eslint",
// Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
"plugin:prettier/recommended"
],
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" },
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["prettier", "cypress", "@typescript-eslint"],
"rules": {
"prettier/prettier": "warn",
// Prettier and ES Lint disagree about how some indents should work.
// I can"t stop Prettier but I can stop ES Lint
"@typescript-eslint/indent": [0, "tab"],
"@typescript-eslint/no-empty-function": [0, false],
"@typescript-eslint/no-use-before-define": [0, false],
"@typescript-eslint/camelcase": [0, "never"],
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/no-unused-vars": [
"warn",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": true }
],
"@typescript-eslint/no-explicit-any": [0, false],
"@typescript-eslint/consistent-type-assertions": [
"error",
{ "assertionStyle": "as" }
],
"@typescript-eslint/no-namespace": [0, false],
"no-nested-ternary": "error"
}
}
]
}