forked from fictionco/fiction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·119 lines (113 loc) · 3.08 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module.exports = {
root: true,
globals: {
__dirname: false,
require: false,
module: false,
process: false,
cy: false,
Cypress: false,
to: false,
describe: false,
context: false,
globalThis: false,
},
parser: "vue-eslint-parser",
parserOptions: {
sourceType: "module",
parser: "@typescript-eslint/parser",
},
env: {
browser: true,
es6: true,
node: true,
"jest/globals": true,
"cypress/globals": true,
},
extends: [
"plugin:vue/recommended",
"plugin:unicorn/recommended",
"plugin:jest/recommended",
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended",
],
plugins: [
"vue",
"json",
"prettier",
"unicorn",
"import",
"jest",
"@typescript-eslint",
"cypress",
],
rules: {
"jest/no-disabled-tests": "off",
"jest/no-commented-out-tests": "off",
"no-console": "error",
"no-debugger": "error",
"import/order": [
"error",
{
groups: ["builtin", "external", "parent", "sibling", "index"],
},
],
semi: ["error", "never"],
"unicorn/no-abusive-eslint-disable": 0,
"unicorn/prevent-abbreviations": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-extra-semi": "off",
"import/no-cycle": 2,
"import/no-unresolved": "off",
"import/named": "off",
"import/extensions": ["warn", "always", { ts: "never", js: "never" }],
"unicorn/no-null": "off",
"unicorn/no-fn-reference-in-iterator": "off",
"unicorn/no-useless-undefined": "off",
"vue/html-self-closing": [
"error",
{
html: {
void: "always",
normal: "always",
component: "always",
},
svg: "always",
math: "always",
},
],
"vue/html-closing-bracket-spacing": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/max-attributes-per-line": [2, { singleline: 20, multiline: {} }],
"jest/expect-expect": "off", // annoying
"@typescript-eslint/explicit-module-boundary-types": "off", // come back to this later (2000 errors)
"@typescript-eslint/explicit-function-return-type": "off", // overridden for .ts files
"@typescript-eslint/no-use-before-define": "warn", // can cause organization issues
"func-style": ["warn", "expression"],
"@typescript-eslint/no-var-requires": "off", // overridden for transpiled .ts files
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/member-delimiter-style": "off",
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ["*.ts", "*.tsx"],
rules: {
"@typescript-eslint/explicit-function-return-type": ["warn"],
},
},
],
settings: {
"import/resolver": {
alias: {
map: [["~", process.env.FACTOR_CWD || process.cwd()]],
},
},
},
}