forked from OutSystems/outsystems-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
133 lines (133 loc) · 4.48 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"root": true,
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"@typescript-eslint/member-ordering": [
"warn",
{
"default": {
"memberTypes": [
"signature",
"field",
"method"
],
"order": "alphabetically"
},
"interfaces": {
"memberTypes": [
"signature",
"field",
"method"
],
"order": "alphabetically"
},
"classes": {
"memberTypes": [
"signature",
"private-field",
"protected-field",
"public-field",
"constructor",
"private-method",
"protected-method",
"public-method",
"abstract-method"
],
"order": "alphabetically"
}
}
],
"@typescript-eslint/explicit-member-accessibility": [
"warn",
{
"ignoredMethodNames": ["constructor"]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "function",
"format": ["StrictPascalCase"],
"modifiers": ["exported"]
},
{
"selector": "class",
"format": ["StrictPascalCase"]
},
{
"selector": "classProperty",
"format": ["strictCamelCase"],
"leadingUnderscore": "require",
"modifiers": ["private"]
},
{
"selector": "classProperty",
"format": ["strictCamelCase"],
"leadingUnderscore": "forbid",
"modifiers": ["public", "protected"]
},
{
"selector": "classMethod",
"format": ["strictCamelCase"],
"leadingUnderscore": "require",
"modifiers": ["private"]
},
{
"selector": "classMethod",
"format": ["strictCamelCase"],
"leadingUnderscore": "forbid",
"modifiers": ["public", "protected"]
},
{
"selector": "interface",
"format": ["UPPER_CASE", "StrictPascalCase"],
"prefix": ["I"]
}
],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/triple-slash-reference": "off",
"eqeqeq": "warn",
"linebreak-style": "off",
"no-cond-assign": "error",
//"no-console": "error", //-> let's add this in the future
"no-eval": "error",
"no-extend-native": "error",
"no-inner-declarations": "off",
"no-multiple-empty-lines": [
"warn",
{
"max": 1,
"maxEOF": 0
}
],
"no-template-curly-in-string": "warn",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "warn",
"no-prototype-builtins": "off",
//"no-use-before-define": "error",
"no-var": "error",
"one-var": ["warn", "never"],
//"quotes": ["error", "single"], //ecaping quotes on prettier https://github.com/prettier/prettier/issues/973
"semi": [
"error",
"always"
],
"yoda": "warn"
}
}