eslint-config-dolmios 1.3.2 → 1.3.4
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/.prettierrc +1 -0
- package/README.md +25 -7
- package/configs/eslint/base.js +251 -0
- package/configs/prettier/base.js +16 -0
- package/configs/swc/base.js +18 -0
- package/configs/tsconfig/base.js +20 -0
- package/configs/tsconfig/lib.js +31 -0
- package/index.js +6 -211
- package/package.json +6 -6
- package/.prettierrc.json +0 -15
package/.prettierrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"./configs/prettier/base.js"
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eslint-config-dolmios
|
|
2
2
|
|
|
3
|
-
> A simple ESLint setup using [@typescript-eslint](https://typescript-eslint.io).
|
|
3
|
+
> A simple ESLint setup using [@typescript-eslint](https://typescript-eslint.io), with Prettier and a couple TSConfig setup.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -18,12 +18,33 @@ Populate `.eslintrc` with the following, and code away.
|
|
|
18
18
|
}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
### Usage with Prettier
|
|
22
22
|
|
|
23
23
|
Prettier is configured to work nicely with this config, though is an optional inclusion. If you'd like to include the config, you can add it to `package.json`.
|
|
24
24
|
|
|
25
25
|
```json
|
|
26
|
-
"prettier": "eslint-config-dolmios/.prettierrc
|
|
26
|
+
"prettier": "eslint-config-dolmios/.prettierrc"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Extending Prettier
|
|
30
|
+
|
|
31
|
+
> This method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a `.prettierrc.js` file and export the modifications.
|
|
32
|
+
> [https://prettier.io/docs/en/](https://prettier.io/docs/en/configuration.html#sharing-configurations)
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
module.exports = {
|
|
36
|
+
...require("eslint-config-dolmios/configs/prettier/base.js"),
|
|
37
|
+
semi: false,
|
|
38
|
+
};
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Usage with TSConfig
|
|
42
|
+
|
|
43
|
+
This config also exports two TSConfig setups, `base` and `lib` respectively. The _base_ config is generally suitable. To include either, extend your `tsconfig.json`.
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
"extends": "eslint-config-dolmios/configs/tsconfig/base.json"
|
|
47
|
+
// "extends": "eslint-config-dolmios/configs/tsconfig/lib" (req. further config for source and dist)
|
|
27
48
|
```
|
|
28
49
|
|
|
29
50
|
## Contributing
|
|
@@ -34,7 +55,4 @@ Feel free to get in touch with feedback, advice or suggestions. See [Conventiona
|
|
|
34
55
|
|
|
35
56
|
- [eslint-plugin-sort-keys-fix](https://github.com/leo-buneev/eslint-plugin-sort-keys-fix)
|
|
36
57
|
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
|
|
37
|
-
|
|
38
|
-
## License
|
|
39
|
-
|
|
40
|
-
It's an ESLINT config, go crazy.
|
|
58
|
+
- [@tsconfig/next](https://www.npmjs.com/package/@tsconfig/next)
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
node: true,
|
|
6
|
+
},
|
|
7
|
+
extends: [
|
|
8
|
+
"plugin:@typescript-eslint/recommended",
|
|
9
|
+
"plugin:import/recommended",
|
|
10
|
+
"eslint:recommended",
|
|
11
|
+
],
|
|
12
|
+
parser: "@typescript-eslint/parser",
|
|
13
|
+
plugins: ["sort-keys-fix", "@typescript-eslint"],
|
|
14
|
+
root: true,
|
|
15
|
+
rules: {
|
|
16
|
+
"@typescript-eslint/brace-style": "off",
|
|
17
|
+
"@typescript-eslint/comma-dangle": "off",
|
|
18
|
+
"@typescript-eslint/comma-spacing": "off",
|
|
19
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
|
20
|
+
"@typescript-eslint/func-call-spacing": "off",
|
|
21
|
+
"@typescript-eslint/indent": "off",
|
|
22
|
+
"@typescript-eslint/keyword-spacing": "off",
|
|
23
|
+
"@typescript-eslint/member-delimiter-style": "off",
|
|
24
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
25
|
+
"@typescript-eslint/no-extra-parens": "off",
|
|
26
|
+
"@typescript-eslint/no-extra-semi": "off",
|
|
27
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
|
28
|
+
"@typescript-eslint/no-unused-vars": [
|
|
29
|
+
"error",
|
|
30
|
+
{
|
|
31
|
+
args: "none",
|
|
32
|
+
ignoreRestSiblings: true,
|
|
33
|
+
vars: "all",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
37
|
+
"@typescript-eslint/object-curly-spacing": "off",
|
|
38
|
+
"@typescript-eslint/quotes": 0,
|
|
39
|
+
"@typescript-eslint/semi": "off",
|
|
40
|
+
"@typescript-eslint/space-before-blocks": "off",
|
|
41
|
+
"@typescript-eslint/space-before-function-paren": "off",
|
|
42
|
+
"@typescript-eslint/space-infix-ops": "off",
|
|
43
|
+
"@typescript-eslint/type-annotation-spacing": "off",
|
|
44
|
+
"array-bracket-newline": "off",
|
|
45
|
+
"array-bracket-spacing": "off",
|
|
46
|
+
"array-element-newline": "off",
|
|
47
|
+
"arrow-parens": "off",
|
|
48
|
+
"arrow-spacing": "off",
|
|
49
|
+
"block-spacing": "off",
|
|
50
|
+
"brace-style": "off",
|
|
51
|
+
camelcase: [
|
|
52
|
+
"error",
|
|
53
|
+
{
|
|
54
|
+
properties: "never",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
"comma-dangle": "off",
|
|
58
|
+
"comma-spacing": "off",
|
|
59
|
+
"comma-style": "off",
|
|
60
|
+
"computed-property-spacing": "off",
|
|
61
|
+
curly: 0,
|
|
62
|
+
"dot-location": "off",
|
|
63
|
+
"eol-last": "off",
|
|
64
|
+
"func-call-spacing": "off",
|
|
65
|
+
"func-names": ["error", "as-needed"],
|
|
66
|
+
"function-call-argument-newline": "off",
|
|
67
|
+
"function-paren-newline": "off",
|
|
68
|
+
"generator-star": "off",
|
|
69
|
+
"generator-star-spacing": "off",
|
|
70
|
+
"implicit-arrow-linebreak": "off",
|
|
71
|
+
"import/export": "error",
|
|
72
|
+
"import/first": "warn",
|
|
73
|
+
"import/named": "warn",
|
|
74
|
+
"import/namespace": "error",
|
|
75
|
+
"import/no-deprecated": "error",
|
|
76
|
+
"import/no-duplicates": "error",
|
|
77
|
+
"import/no-extraneous-dependencies": [
|
|
78
|
+
"error",
|
|
79
|
+
{
|
|
80
|
+
devDependencies: true,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
"import/no-named-as-default": "off",
|
|
84
|
+
"import/no-unresolved": "warn",
|
|
85
|
+
"import/order": [
|
|
86
|
+
"error",
|
|
87
|
+
{
|
|
88
|
+
alphabetize: {
|
|
89
|
+
caseInsensitive: true,
|
|
90
|
+
order: "asc",
|
|
91
|
+
},
|
|
92
|
+
groups: ["builtin", "external", "parent", "sibling", "index"],
|
|
93
|
+
"newlines-between": "always",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
indent: "off",
|
|
97
|
+
"jsx-quotes": "off",
|
|
98
|
+
"key-spacing": "off",
|
|
99
|
+
"keyword-spacing": "off",
|
|
100
|
+
"linebreak-style": "off",
|
|
101
|
+
"lines-around-comment": 0,
|
|
102
|
+
"max-len": 0,
|
|
103
|
+
"multiline-ternary": "off",
|
|
104
|
+
"new-parens": "off",
|
|
105
|
+
"newline-per-chained-call": "off",
|
|
106
|
+
"no-alert": "error",
|
|
107
|
+
"no-array-constructor": "error",
|
|
108
|
+
"no-arrow-condition": "off",
|
|
109
|
+
"no-comma-dangle": "off",
|
|
110
|
+
"no-confusing-arrow": 0,
|
|
111
|
+
"no-console": [
|
|
112
|
+
"warn",
|
|
113
|
+
{
|
|
114
|
+
allow: ["error", "warn"],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
|
|
118
|
+
"no-continue": "error",
|
|
119
|
+
"no-duplicate-imports": [
|
|
120
|
+
"error",
|
|
121
|
+
{
|
|
122
|
+
includeExports: true,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
"no-eq-null": "error",
|
|
126
|
+
"no-eval": "error",
|
|
127
|
+
"no-extend-native": "error",
|
|
128
|
+
"no-extra-bind": "error",
|
|
129
|
+
"no-extra-label": "error",
|
|
130
|
+
"no-extra-parens": "off",
|
|
131
|
+
"no-extra-semi": "off",
|
|
132
|
+
"no-floating-decimal": "off",
|
|
133
|
+
"no-invalid-this": "error",
|
|
134
|
+
"no-iterator": "error",
|
|
135
|
+
"no-label-var": "error",
|
|
136
|
+
"no-labels": [
|
|
137
|
+
"error",
|
|
138
|
+
{
|
|
139
|
+
allowLoop: false,
|
|
140
|
+
allowSwitch: false,
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
"no-lone-blocks": "error",
|
|
144
|
+
"no-mixed-operators": [
|
|
145
|
+
"error",
|
|
146
|
+
{
|
|
147
|
+
allowSamePrecedence: false,
|
|
148
|
+
groups: [
|
|
149
|
+
["&", "|", "^", "~", "<<", ">>", ">>>"],
|
|
150
|
+
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
151
|
+
["&&", "||"],
|
|
152
|
+
["in", "instanceof"],
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
"no-mixed-spaces-and-tabs": "off",
|
|
157
|
+
"no-multi-spaces": "off",
|
|
158
|
+
"no-multi-str": "error",
|
|
159
|
+
"no-multiple-empty-lines": "off",
|
|
160
|
+
"no-new": "error",
|
|
161
|
+
"no-new-func": "error",
|
|
162
|
+
"no-new-object": "error",
|
|
163
|
+
"no-new-wrappers": "error",
|
|
164
|
+
"no-octal-escape": "error",
|
|
165
|
+
"no-proto": "error",
|
|
166
|
+
"no-reserved-keys": "off",
|
|
167
|
+
"no-space-before-semi": "off",
|
|
168
|
+
"no-tabs": 0,
|
|
169
|
+
"no-template-curly-in-string": "error",
|
|
170
|
+
"no-trailing-spaces": "off",
|
|
171
|
+
"no-undef": "off",
|
|
172
|
+
"no-unexpected-multiline": 0,
|
|
173
|
+
"no-unreachable-loop": "error",
|
|
174
|
+
"no-unused-expressions": [
|
|
175
|
+
"error",
|
|
176
|
+
{
|
|
177
|
+
allowShortCircuit: true,
|
|
178
|
+
allowTernary: true,
|
|
179
|
+
enforceForJSX: true,
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
"no-use-before-define": [
|
|
183
|
+
"error",
|
|
184
|
+
{
|
|
185
|
+
classes: true,
|
|
186
|
+
functions: false,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
"no-useless-call": "error",
|
|
190
|
+
"no-useless-concat": "error",
|
|
191
|
+
"no-whitespace-before-property": "off",
|
|
192
|
+
"no-wrap-func": "off",
|
|
193
|
+
"nonblock-statement-body-position": "off",
|
|
194
|
+
"object-curly-newline": "off",
|
|
195
|
+
"object-curly-spacing": "off",
|
|
196
|
+
"object-property-newline": "off",
|
|
197
|
+
"one-var": [
|
|
198
|
+
"error",
|
|
199
|
+
{
|
|
200
|
+
initialized: "never",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
"one-var-declaration-per-line": "off",
|
|
204
|
+
"operator-linebreak": "off",
|
|
205
|
+
"padded-blocks": "off",
|
|
206
|
+
"quote-props": "off",
|
|
207
|
+
quotes: 0,
|
|
208
|
+
"rest-spread-spacing": "off",
|
|
209
|
+
semi: "off",
|
|
210
|
+
"semi-spacing": "off",
|
|
211
|
+
"semi-style": "off",
|
|
212
|
+
"sort-keys-fix/sort-keys-fix": "error",
|
|
213
|
+
"space-after-function-name": "off",
|
|
214
|
+
"space-after-keywords": "off",
|
|
215
|
+
"space-before-blocks": "off",
|
|
216
|
+
"space-before-function-paren": "off",
|
|
217
|
+
"space-before-function-parentheses": "off",
|
|
218
|
+
"space-before-keywords": "off",
|
|
219
|
+
"space-in-brackets": "off",
|
|
220
|
+
"space-in-parens": "off",
|
|
221
|
+
"space-infix-ops": "error",
|
|
222
|
+
"space-return-throw-case": "off",
|
|
223
|
+
"space-unary-ops": [
|
|
224
|
+
"error",
|
|
225
|
+
{
|
|
226
|
+
nonwords: false,
|
|
227
|
+
words: true,
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
"space-unary-word-ops": "off",
|
|
231
|
+
"spaced-comment": [
|
|
232
|
+
"error",
|
|
233
|
+
"always",
|
|
234
|
+
{
|
|
235
|
+
line: {
|
|
236
|
+
exceptions: ["-"],
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
"switch-colon-spacing": "off",
|
|
241
|
+
"template-curly-spacing": ["error", "never"],
|
|
242
|
+
"template-tag-spacing": "off",
|
|
243
|
+
"unicode-bom": "off",
|
|
244
|
+
"vue/html-self-closing": 0,
|
|
245
|
+
"vue/max-len": 0,
|
|
246
|
+
"wrap-iife": "off",
|
|
247
|
+
"wrap-regex": "off",
|
|
248
|
+
"yield-star-spacing": "off",
|
|
249
|
+
yoda: ["error", "never"],
|
|
250
|
+
},
|
|
251
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
printWidth: 80,
|
|
3
|
+
tabWidth: 2,
|
|
4
|
+
useTabs: false,
|
|
5
|
+
semi: true,
|
|
6
|
+
singleQuote: false,
|
|
7
|
+
quoteProps: "as-needed",
|
|
8
|
+
jsxSingleQuote: false,
|
|
9
|
+
trailingComma: "es5",
|
|
10
|
+
bracketSpacing: true,
|
|
11
|
+
bracketSameLine: false,
|
|
12
|
+
arrowParens: "always",
|
|
13
|
+
proseWrap: "preserve",
|
|
14
|
+
htmlWhitespaceSensitivity: "ignore",
|
|
15
|
+
endOfLine: "lf",
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// T-3235 - don't use this swc config for now (if swcrc can even be extended?)
|
|
2
|
+
module.exports = {
|
|
3
|
+
$schema: "https://json.schemastore.org/swcrc",
|
|
4
|
+
jsc: {
|
|
5
|
+
parser: {
|
|
6
|
+
syntax: "typescript",
|
|
7
|
+
jsx: true,
|
|
8
|
+
tsx: true,
|
|
9
|
+
dynamicImport: true,
|
|
10
|
+
decorators: true,
|
|
11
|
+
},
|
|
12
|
+
target: "esnext",
|
|
13
|
+
},
|
|
14
|
+
minify: false,
|
|
15
|
+
module: {
|
|
16
|
+
type: "es6",
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
$schema: "https://json.schemastore.org/tsconfig",
|
|
3
|
+
display: "dolmios",
|
|
4
|
+
compilerOptions: {
|
|
5
|
+
target: "es6",
|
|
6
|
+
lib: ["dom", "dom.iterable", "esnext"],
|
|
7
|
+
allowJs: true,
|
|
8
|
+
skipLibCheck: true,
|
|
9
|
+
strict: true,
|
|
10
|
+
forceConsistentCasingInFileNames: true,
|
|
11
|
+
noEmit: true,
|
|
12
|
+
esModuleInterop: true,
|
|
13
|
+
module: "esnext",
|
|
14
|
+
moduleResolution: "node",
|
|
15
|
+
resolveJsonModule: true,
|
|
16
|
+
isolatedModules: true,
|
|
17
|
+
jsx: "preserve",
|
|
18
|
+
incremental: true,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
$schema: "https://json.schemastore.org/tsconfig",
|
|
3
|
+
display: "dolmios",
|
|
4
|
+
compilerOptions: {
|
|
5
|
+
target: "es6",
|
|
6
|
+
lib: ["dom", "dom.iterable", "esnext"],
|
|
7
|
+
allowJs: true,
|
|
8
|
+
skipLibCheck: true,
|
|
9
|
+
strict: true,
|
|
10
|
+
forceConsistentCasingInFileNames: true,
|
|
11
|
+
noEmit: true,
|
|
12
|
+
esModuleInterop: true,
|
|
13
|
+
module: "esnext",
|
|
14
|
+
moduleResolution: "node",
|
|
15
|
+
resolveJsonModule: true,
|
|
16
|
+
isolatedModules: true,
|
|
17
|
+
jsx: "react-jsx",
|
|
18
|
+
incremental: true,
|
|
19
|
+
importHelpers: true,
|
|
20
|
+
declaration: true,
|
|
21
|
+
sourceMap: true,
|
|
22
|
+
noImplicitReturns: true,
|
|
23
|
+
noFallthroughCasesInSwitch: true,
|
|
24
|
+
noImplicitAny: true,
|
|
25
|
+
noImplicitThis: true,
|
|
26
|
+
noUnusedLocals: true,
|
|
27
|
+
noUnusedParameters: true,
|
|
28
|
+
allowSyntheticDefaultImports: true,
|
|
29
|
+
emitDecoratorMetadata: true,
|
|
30
|
+
},
|
|
31
|
+
};
|
package/index.js
CHANGED
|
@@ -1,211 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
extends: ['plugin:@typescript-eslint/recommended', 'plugin:import/recommended', 'eslint:recommended'],
|
|
8
|
-
parser: '@typescript-eslint/parser',
|
|
9
|
-
plugins: ['sort-keys-fix', '@typescript-eslint'],
|
|
10
|
-
root: true,
|
|
11
|
-
rules: {
|
|
12
|
-
'@typescript-eslint/brace-style': 'off',
|
|
13
|
-
'@typescript-eslint/comma-dangle': 'off',
|
|
14
|
-
'@typescript-eslint/comma-spacing': 'off',
|
|
15
|
-
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
16
|
-
'@typescript-eslint/func-call-spacing': 'off',
|
|
17
|
-
'@typescript-eslint/indent': 'off',
|
|
18
|
-
'@typescript-eslint/keyword-spacing': 'off',
|
|
19
|
-
'@typescript-eslint/member-delimiter-style': 'off',
|
|
20
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
21
|
-
'@typescript-eslint/no-extra-parens': 'off',
|
|
22
|
-
'@typescript-eslint/no-extra-semi': 'off',
|
|
23
|
-
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
24
|
-
'@typescript-eslint/no-unused-vars': [
|
|
25
|
-
'error',
|
|
26
|
-
{
|
|
27
|
-
args: 'none',
|
|
28
|
-
ignoreRestSiblings: true,
|
|
29
|
-
vars: 'all',
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
33
|
-
'@typescript-eslint/object-curly-spacing': 'off',
|
|
34
|
-
'@typescript-eslint/quotes': 0,
|
|
35
|
-
'@typescript-eslint/semi': 'off',
|
|
36
|
-
'@typescript-eslint/space-before-blocks': 'off',
|
|
37
|
-
'@typescript-eslint/space-before-function-paren': 'off',
|
|
38
|
-
'@typescript-eslint/space-infix-ops': 'off',
|
|
39
|
-
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
40
|
-
'array-bracket-newline': 'off',
|
|
41
|
-
'array-bracket-spacing': 'off',
|
|
42
|
-
'array-element-newline': 'off',
|
|
43
|
-
'arrow-parens': 'off',
|
|
44
|
-
'arrow-spacing': 'off',
|
|
45
|
-
'block-spacing': 'off',
|
|
46
|
-
'brace-style': 'off',
|
|
47
|
-
'camelcase': ['error', { properties: 'never' }],
|
|
48
|
-
'comma-dangle': 'off',
|
|
49
|
-
'comma-spacing': 'off',
|
|
50
|
-
'comma-style': 'off',
|
|
51
|
-
'computed-property-spacing': 'off',
|
|
52
|
-
'curly': 0,
|
|
53
|
-
'dot-location': 'off',
|
|
54
|
-
'eol-last': 'off',
|
|
55
|
-
'func-call-spacing': 'off',
|
|
56
|
-
'func-names': ['error', 'as-needed'],
|
|
57
|
-
'function-call-argument-newline': 'off',
|
|
58
|
-
'function-paren-newline': 'off',
|
|
59
|
-
'generator-star': 'off',
|
|
60
|
-
'generator-star-spacing': 'off',
|
|
61
|
-
'implicit-arrow-linebreak': 'off',
|
|
62
|
-
'import/export': 'error',
|
|
63
|
-
'import/first': 'warn',
|
|
64
|
-
'import/named': 'warn',
|
|
65
|
-
'import/namespace': 'error',
|
|
66
|
-
'import/no-deprecated': 'error',
|
|
67
|
-
'import/no-duplicates': 'error',
|
|
68
|
-
'import/no-extraneous-dependencies': [
|
|
69
|
-
'error',
|
|
70
|
-
{
|
|
71
|
-
devDependencies: true,
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
'import/no-named-as-default': 'off',
|
|
75
|
-
'import/no-unresolved': 'warn',
|
|
76
|
-
'import/order': [
|
|
77
|
-
'error',
|
|
78
|
-
{
|
|
79
|
-
'alphabetize': {
|
|
80
|
-
caseInsensitive: true,
|
|
81
|
-
order: 'asc',
|
|
82
|
-
},
|
|
83
|
-
'groups': ['builtin', 'external', 'parent', 'sibling', 'index'],
|
|
84
|
-
'newlines-between': 'always',
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
'indent': 'off',
|
|
88
|
-
'jsx-quotes': 'off',
|
|
89
|
-
'key-spacing': 'off',
|
|
90
|
-
'keyword-spacing': 'off',
|
|
91
|
-
'linebreak-style': 'off',
|
|
92
|
-
'lines-around-comment': 0,
|
|
93
|
-
'max-len': 0,
|
|
94
|
-
'multiline-ternary': 'off',
|
|
95
|
-
'new-parens': 'off',
|
|
96
|
-
'newline-per-chained-call': 'off',
|
|
97
|
-
'no-alert': 'error',
|
|
98
|
-
'no-array-constructor': 'error',
|
|
99
|
-
'no-arrow-condition': 'off',
|
|
100
|
-
'no-comma-dangle': 'off',
|
|
101
|
-
'no-confusing-arrow': 0,
|
|
102
|
-
'no-console': [
|
|
103
|
-
'warn',
|
|
104
|
-
{
|
|
105
|
-
allow: ['error', 'warn'],
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
|
|
109
|
-
'no-continue': 'error',
|
|
110
|
-
'no-duplicate-imports': ['error', { includeExports: true }],
|
|
111
|
-
'no-eq-null': 'error',
|
|
112
|
-
'no-eval': 'error',
|
|
113
|
-
'no-extend-native': 'error',
|
|
114
|
-
'no-extra-bind': 'error',
|
|
115
|
-
'no-extra-label': 'error',
|
|
116
|
-
'no-extra-parens': 'off',
|
|
117
|
-
'no-extra-semi': 'off',
|
|
118
|
-
'no-floating-decimal': 'off',
|
|
119
|
-
'no-invalid-this': 'error',
|
|
120
|
-
'no-iterator': 'error',
|
|
121
|
-
'no-label-var': 'error',
|
|
122
|
-
'no-labels': ['error', { allowLoop: false, allowSwitch: false }],
|
|
123
|
-
'no-lone-blocks': 'error',
|
|
124
|
-
'no-mixed-operators': [
|
|
125
|
-
'error',
|
|
126
|
-
{
|
|
127
|
-
allowSamePrecedence: false,
|
|
128
|
-
groups: [
|
|
129
|
-
['&', '|', '^', '~', '<<', '>>', '>>>'],
|
|
130
|
-
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
131
|
-
['&&', '||'],
|
|
132
|
-
['in', 'instanceof'],
|
|
133
|
-
],
|
|
134
|
-
},
|
|
135
|
-
],
|
|
136
|
-
'no-mixed-spaces-and-tabs': 'off',
|
|
137
|
-
'no-multi-spaces': 'off',
|
|
138
|
-
'no-multi-str': 'error',
|
|
139
|
-
'no-multiple-empty-lines': 'off',
|
|
140
|
-
'no-new': 'error',
|
|
141
|
-
'no-new-func': 'error',
|
|
142
|
-
'no-new-object': 'error',
|
|
143
|
-
'no-new-wrappers': 'error',
|
|
144
|
-
'no-octal-escape': 'error',
|
|
145
|
-
'no-proto': 'error',
|
|
146
|
-
'no-reserved-keys': 'off',
|
|
147
|
-
'no-space-before-semi': 'off',
|
|
148
|
-
'no-tabs': 0,
|
|
149
|
-
'no-template-curly-in-string': 'error',
|
|
150
|
-
'no-trailing-spaces': 'off',
|
|
151
|
-
'no-undef': 'off',
|
|
152
|
-
'no-unexpected-multiline': 0,
|
|
153
|
-
'no-unreachable-loop': 'error',
|
|
154
|
-
'no-unused-expressions': [
|
|
155
|
-
'error',
|
|
156
|
-
{
|
|
157
|
-
allowShortCircuit: true,
|
|
158
|
-
allowTernary: true,
|
|
159
|
-
enforceForJSX: true,
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
'no-use-before-define': ['error', { classes: true, functions: false }],
|
|
163
|
-
'no-useless-call': 'error',
|
|
164
|
-
'no-useless-concat': 'error',
|
|
165
|
-
'no-whitespace-before-property': 'off',
|
|
166
|
-
'no-wrap-func': 'off',
|
|
167
|
-
'nonblock-statement-body-position': 'off',
|
|
168
|
-
'object-curly-newline': 'off',
|
|
169
|
-
'object-curly-spacing': 'off',
|
|
170
|
-
'object-property-newline': 'off',
|
|
171
|
-
'one-var': [
|
|
172
|
-
'error',
|
|
173
|
-
{
|
|
174
|
-
initialized: 'never',
|
|
175
|
-
},
|
|
176
|
-
],
|
|
177
|
-
'one-var-declaration-per-line': 'off',
|
|
178
|
-
'operator-linebreak': 'off',
|
|
179
|
-
'padded-blocks': 'off',
|
|
180
|
-
'quote-props': 'off',
|
|
181
|
-
'quotes': 0,
|
|
182
|
-
'rest-spread-spacing': 'off',
|
|
183
|
-
'semi': 'off',
|
|
184
|
-
'semi-spacing': 'off',
|
|
185
|
-
'semi-style': 'off',
|
|
186
|
-
'sort-keys-fix/sort-keys-fix': 'error',
|
|
187
|
-
'space-after-function-name': 'off',
|
|
188
|
-
'space-after-keywords': 'off',
|
|
189
|
-
'space-before-blocks': 'off',
|
|
190
|
-
'space-before-function-paren': 'off',
|
|
191
|
-
'space-before-function-parentheses': 'off',
|
|
192
|
-
'space-before-keywords': 'off',
|
|
193
|
-
'space-in-brackets': 'off',
|
|
194
|
-
'space-in-parens': 'off',
|
|
195
|
-
'space-infix-ops': 'error',
|
|
196
|
-
'space-return-throw-case': 'off',
|
|
197
|
-
'space-unary-ops': ['error', { nonwords: false, words: true }],
|
|
198
|
-
'space-unary-word-ops': 'off',
|
|
199
|
-
'spaced-comment': ['error', 'always', { line: { exceptions: ['-'] } }],
|
|
200
|
-
'switch-colon-spacing': 'off',
|
|
201
|
-
'template-curly-spacing': ['error', 'never'],
|
|
202
|
-
'template-tag-spacing': 'off',
|
|
203
|
-
'unicode-bom': 'off',
|
|
204
|
-
'vue/html-self-closing': 0,
|
|
205
|
-
'vue/max-len': 0,
|
|
206
|
-
'wrap-iife': 'off',
|
|
207
|
-
'wrap-regex': 'off',
|
|
208
|
-
'yield-star-spacing': 'off',
|
|
209
|
-
'yoda': ['error', 'never'],
|
|
210
|
-
},
|
|
211
|
-
};
|
|
1
|
+
export { default } from "./configs/eslint/base";
|
|
2
|
+
export { default as prettierConfig } from "./configs/prettier/base";
|
|
3
|
+
export { default as tsConfigBase } from "./configs/tsconfig/base";
|
|
4
|
+
export { default as tsConfigLib } from "./configs/tsconfig/lib";
|
|
5
|
+
// todo: export { default as tsConfigNode } from "./configs/tsconfig/node";
|
|
6
|
+
// todo: export { default as swcConfig } from "./configs/swc/base";
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-dolmios",
|
|
3
3
|
"description": " A simple ESLint setup using @typescript-eslint",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.4",
|
|
5
5
|
"author": "Jackson Dolman <mail@dolmios.com>",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/dolmios/eslint-config-dolmios/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
11
|
-
"@typescript-eslint/parser": "^5.
|
|
12
|
-
"eslint": "^8.
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
|
11
|
+
"@typescript-eslint/parser": "^5.47.0",
|
|
12
|
+
"eslint": "^8.30.0",
|
|
13
13
|
"eslint-plugin-import": "^2.26.0",
|
|
14
14
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
15
15
|
"prettier": "^2.8.1",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"main": "index.js",
|
|
27
|
-
"packageManager": "yarn@3.3.0",
|
|
28
27
|
"repository": {
|
|
29
28
|
"type": "git",
|
|
30
29
|
"url": "git+https://github.com/dolmios/eslint-config-dolmios.git"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {
|
|
33
|
-
"
|
|
32
|
+
"lint": "eslint --ext .js",
|
|
33
|
+
"prettier": "prettier --write ."
|
|
34
34
|
}
|
|
35
35
|
}
|
package/.prettierrc.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"printWidth": 120,
|
|
3
|
-
"tabWidth": 2,
|
|
4
|
-
"useTabs": false,
|
|
5
|
-
"semi": true,
|
|
6
|
-
"singleQuote": true,
|
|
7
|
-
"quoteProps": "consistent",
|
|
8
|
-
"jsxSingleQuote": true,
|
|
9
|
-
"trailingComma": "es5",
|
|
10
|
-
"bracketSpacing": true,
|
|
11
|
-
"bracketSameLine": true,
|
|
12
|
-
"arrowParens": "always",
|
|
13
|
-
"proseWrap": "preserve",
|
|
14
|
-
"htmlWhitespaceSensitivity": "ignore"
|
|
15
|
-
}
|