@ololoepepe/eslint-config-typescript 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/package.json +33 -11
- package/src/index.js +80 -308
- package/src/node.js +27 -0
- package/src/plugins/eslint-comments.js +16 -0
- package/src/plugins/import-x.js +107 -0
- package/src/plugins/n.js +48 -0
- package/src/plugins/perfectionist.js +36 -26
- package/src/plugins/promise.js +25 -0
- package/src/plugins/react-hooks.js +32 -0
- package/src/plugins/react.js +91 -0
- package/src/plugins/regexp.js +86 -0
- package/src/plugins/stylistic.js +177 -0
- package/src/plugins/typescript/index.js +1 -1
- package/src/plugins/typescript/no.js +5 -0
- package/src/plugins/unicorn.js +329 -0
- package/src/react.js +48 -0
- package/src/rules/core.js +126 -0
- package/src/rules/jsx-stylistic.js +62 -0
- package/src/rules/no.js +3 -34
- package/src/plugins/import.js +0 -107
package/src/rules/no.js
CHANGED
|
@@ -12,10 +12,6 @@ export default {
|
|
|
12
12
|
'no-class-assign': 'error',
|
|
13
13
|
'no-compare-neg-zero': 'error',
|
|
14
14
|
'no-cond-assign': ['error', 'always'],
|
|
15
|
-
'no-confusing-arrow': ['error', {
|
|
16
|
-
allowParens: true,
|
|
17
|
-
onlyOneSimpleParam: false
|
|
18
|
-
}],
|
|
19
15
|
'no-console': 'off',
|
|
20
16
|
'no-const-assign': 'error',
|
|
21
17
|
'no-constant-binary-expression': 'error',
|
|
@@ -59,13 +55,10 @@ export default {
|
|
|
59
55
|
enforceForLogicalOperands: true
|
|
60
56
|
}],
|
|
61
57
|
'no-extra-label': 'error',
|
|
62
|
-
'no-extra-parens': 'off', // TODO: Reconsider
|
|
63
|
-
'no-extra-semi': 'error',
|
|
64
58
|
'no-fallthrough': ['error', {
|
|
65
59
|
allowEmptyCase: false,
|
|
66
|
-
commentPattern:
|
|
60
|
+
commentPattern: String.raw`break[\s\w]*omitted`
|
|
67
61
|
}],
|
|
68
|
-
'no-floating-decimal': 'error',
|
|
69
62
|
'no-func-assign': 'error',
|
|
70
63
|
'no-global-assign': ['error', {
|
|
71
64
|
exceptions: []
|
|
@@ -101,34 +94,19 @@ export default {
|
|
|
101
94
|
'no-loss-of-precision': 'error',
|
|
102
95
|
'no-magic-numbers': 'off',
|
|
103
96
|
'no-misleading-character-class': 'error',
|
|
104
|
-
'no-mixed-operators': ['error', {
|
|
105
|
-
allowSamePrecedence: true
|
|
106
|
-
}],
|
|
107
|
-
'no-mixed-spaces-and-tabs': 'error',
|
|
108
97
|
'no-multi-assign': ['error', {
|
|
109
98
|
ignoreNonDeclaration: false
|
|
110
99
|
}],
|
|
111
|
-
'no-multi-spaces': ['error', {
|
|
112
|
-
exceptions: {
|
|
113
|
-
Property: false
|
|
114
|
-
}
|
|
115
|
-
}],
|
|
116
100
|
'no-multi-str': 'error',
|
|
117
|
-
'no-multiple-empty-lines': ['error', {
|
|
118
|
-
max: 1,
|
|
119
|
-
maxBOF: 0,
|
|
120
|
-
maxEOF: 1
|
|
121
|
-
}],
|
|
122
101
|
'no-negated-condition': 'error',
|
|
123
102
|
'no-nested-ternary': 'off',
|
|
124
103
|
'no-new': 'error',
|
|
125
104
|
'no-new-func': 'error',
|
|
126
|
-
'no-new-native-nonconstructor': 'error',
|
|
127
|
-
'no-new-object': 'error',
|
|
128
|
-
'no-new-symbol': 'error',
|
|
105
|
+
'no-new-native-nonconstructor': 'error', // NOTE: Replaces the deprecated `no-new-symbol`
|
|
129
106
|
'no-new-wrappers': 'error',
|
|
130
107
|
'no-nonoctal-decimal-escape': 'error',
|
|
131
108
|
'no-obj-calls': 'error',
|
|
109
|
+
'no-object-constructor': 'error', // NOTE: Replaces the deprecated `no-new-object`
|
|
132
110
|
'no-octal': 'error',
|
|
133
111
|
'no-octal-escape': 'error',
|
|
134
112
|
'no-param-reassign': 'off',
|
|
@@ -144,7 +122,6 @@ export default {
|
|
|
144
122
|
'no-restricted-properties': 'off',
|
|
145
123
|
'no-restricted-syntax': 'off',
|
|
146
124
|
'no-return-assign': ['error', 'always'],
|
|
147
|
-
'no-return-await': 'off',
|
|
148
125
|
'no-script-url': 'error',
|
|
149
126
|
'no-self-assign': ['error', {
|
|
150
127
|
props: true
|
|
@@ -157,17 +134,10 @@ export default {
|
|
|
157
134
|
'no-shadow': 'off', // NOTE: See TypeScript rule extending this one
|
|
158
135
|
'no-shadow-restricted-names': 'error',
|
|
159
136
|
'no-sparse-arrays': 'error',
|
|
160
|
-
'no-tabs': ['error', {
|
|
161
|
-
allowIndentationTabs: false
|
|
162
|
-
}],
|
|
163
137
|
'no-template-curly-in-string': 'warn',
|
|
164
138
|
'no-ternary': 'off',
|
|
165
139
|
'no-this-before-super': 'error',
|
|
166
140
|
'no-throw-literal': 'off', // NOTE: See TypeScript rule extending this one
|
|
167
|
-
'no-trailing-spaces': ['error', {
|
|
168
|
-
ignoreComments: false,
|
|
169
|
-
skipBlankLines: false
|
|
170
|
-
}],
|
|
171
141
|
'no-undef': ['error', {
|
|
172
142
|
typeof: true
|
|
173
143
|
}],
|
|
@@ -218,6 +188,5 @@ export default {
|
|
|
218
188
|
location: 'start',
|
|
219
189
|
terms: ['fix', 'fixme', 'todo']
|
|
220
190
|
}],
|
|
221
|
-
'no-whitespace-before-property': 'error',
|
|
222
191
|
'no-with': 'error'
|
|
223
192
|
};
|
package/src/plugins/import.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
rules: {
|
|
3
|
-
'import/consistent-type-specifier-style': 'off', // TODO: Reconsider if use TS/Flow
|
|
4
|
-
'import/default': 'error',
|
|
5
|
-
'import/dynamic-import-chunkname': ['error'],
|
|
6
|
-
'import/export': 'error',
|
|
7
|
-
'import/exports-last': 'off',
|
|
8
|
-
'import/extensions': 'off',
|
|
9
|
-
'import/first': ['error', 'absolute-first'],
|
|
10
|
-
'import/group-exports': 'off',
|
|
11
|
-
'import/max-dependencies': 'off',
|
|
12
|
-
'import/named': 'error',
|
|
13
|
-
'import/namespace': ['error', {
|
|
14
|
-
allowComputed: false
|
|
15
|
-
}],
|
|
16
|
-
'import/newline-after-import': ['error', {
|
|
17
|
-
considerComments: false,
|
|
18
|
-
count: 1
|
|
19
|
-
}],
|
|
20
|
-
'import/no-absolute-path': ['error', {
|
|
21
|
-
amd: true,
|
|
22
|
-
commonjs: true,
|
|
23
|
-
esmodule: true
|
|
24
|
-
}],
|
|
25
|
-
'import/no-amd': 'off',
|
|
26
|
-
'import/no-anonymous-default-export': 'off',
|
|
27
|
-
'import/no-commonjs': 'off',
|
|
28
|
-
'import/no-cycle': ['error', {
|
|
29
|
-
amd: true,
|
|
30
|
-
commonjs: true,
|
|
31
|
-
esmodule: true, // TODO
|
|
32
|
-
ignoreExternal: true
|
|
33
|
-
}],
|
|
34
|
-
'import/no-default-export': 'off',
|
|
35
|
-
'import/no-deprecated': 'warn',
|
|
36
|
-
'import/no-duplicates': ['error', {
|
|
37
|
-
considerQueryString: true
|
|
38
|
-
}],
|
|
39
|
-
'import/no-dynamic-require': 'off', // TODO
|
|
40
|
-
'import/no-empty-named-blocks': 'error',
|
|
41
|
-
'import/no-extraneous-dependencies': 'error',
|
|
42
|
-
'import/no-import-module-exports': 'off',
|
|
43
|
-
'import/no-internal-modules': 'off',
|
|
44
|
-
'import/no-mutable-exports': 'error',
|
|
45
|
-
'import/no-named-as-default': 'warn',
|
|
46
|
-
'import/no-named-as-default-member': 'error',
|
|
47
|
-
'import/no-named-default': 'off',
|
|
48
|
-
'import/no-named-export': 'off',
|
|
49
|
-
'import/no-namespace': 'off',
|
|
50
|
-
'import/no-nodejs-modules': 'off',
|
|
51
|
-
'import/no-relative-packages': 'off',
|
|
52
|
-
'import/no-relative-parent-imports': 'warn',
|
|
53
|
-
'import/no-restricted-paths': 'off',
|
|
54
|
-
'import/no-self-import': 'error',
|
|
55
|
-
'import/no-unassigned-import': 'off',
|
|
56
|
-
'import/no-unresolved': ['error', {
|
|
57
|
-
ignore: ['^#']
|
|
58
|
-
}],
|
|
59
|
-
'import/no-unused-modules': 'off', // TODO: Reconsider
|
|
60
|
-
'import/no-useless-path-segments': ['error', {
|
|
61
|
-
commonjs: true,
|
|
62
|
-
noUselessIndex: false
|
|
63
|
-
}],
|
|
64
|
-
'import/no-webpack-loader-syntax': 'error',
|
|
65
|
-
'import/order': ['error', {
|
|
66
|
-
alphabetize: {
|
|
67
|
-
caseInsensitive: true,
|
|
68
|
-
order: 'asc',
|
|
69
|
-
orderImportKind: 'ignore'
|
|
70
|
-
},
|
|
71
|
-
distinctGroup: true,
|
|
72
|
-
groups: ['builtin', 'external', 'type', 'internal', 'parent', 'sibling', 'index', 'object', 'unknown'],
|
|
73
|
-
'newlines-between': 'always-and-inside-groups',
|
|
74
|
-
pathGroups: [{
|
|
75
|
-
group: 'internal',
|
|
76
|
-
pattern: '#src/**'
|
|
77
|
-
}, {
|
|
78
|
-
group: 'parent',
|
|
79
|
-
pattern: '../**/styles.js',
|
|
80
|
-
position: 'after'
|
|
81
|
-
}, {
|
|
82
|
-
group: 'parent',
|
|
83
|
-
pattern: '../**/styles.css',
|
|
84
|
-
position: 'after'
|
|
85
|
-
}, {
|
|
86
|
-
group: 'parent',
|
|
87
|
-
pattern: '../**/styles.less',
|
|
88
|
-
position: 'after'
|
|
89
|
-
}, {
|
|
90
|
-
group: 'sibling',
|
|
91
|
-
pattern: './**/styles.js',
|
|
92
|
-
position: 'after'
|
|
93
|
-
}, {
|
|
94
|
-
group: 'sibling',
|
|
95
|
-
pattern: './**/styles.css',
|
|
96
|
-
position: 'after'
|
|
97
|
-
}, {
|
|
98
|
-
group: 'sibling',
|
|
99
|
-
pattern: './**/styles.less',
|
|
100
|
-
position: 'after'
|
|
101
|
-
}],
|
|
102
|
-
warnOnUnassignedImports: false
|
|
103
|
-
}],
|
|
104
|
-
'import/prefer-default-export': 'off',
|
|
105
|
-
'import/unambiguous': 'off' // TODO: Reconsider
|
|
106
|
-
}
|
|
107
|
-
};
|