@cenk1cenk2/eslint-config 2.7.59 → 3.0.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/.prettierrc.js +1 -1
- package/CHANGELOG.md +19 -0
- package/base.js +152 -0
- package/eslint.config.js +9 -0
- package/import-strict.js +12 -13
- package/import.js +16 -48
- package/jsconfig.json +7 -0
- package/package.json +12 -8
- package/react-typescript.js +19 -17
- package/react.js +59 -57
- package/release.config.js +2 -2
- package/svelte-typescript.js +23 -18
- package/typescript-dynamic.js +28 -26
- package/typescript.js +229 -307
- package/utils.js +15 -17
- package/vue-typescript.js +8 -11
- package/vue.js +24 -25
- package/constants.js +0 -3
- package/index.js +0 -141
package/vue.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
1
|
+
import base from './base.js'
|
|
2
|
+
|
|
3
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
4
|
+
export default [
|
|
5
|
+
...base,
|
|
6
|
+
{
|
|
7
|
+
files: ['*.vue'],
|
|
8
|
+
extends: ['@nuxtjs'],
|
|
9
|
+
rules: {
|
|
10
|
+
'vue/singleline-html-element-content-newline': 0,
|
|
11
|
+
'vue/multiline-html-element-content-newline': 0,
|
|
12
|
+
'vue/html-self-closing': 0,
|
|
13
|
+
'vue/no-v-html': 0,
|
|
14
|
+
'array-element-newline': ['error', 'consistent'],
|
|
15
|
+
'array-bracket-spacing': [
|
|
16
|
+
'error',
|
|
17
|
+
'always',
|
|
18
|
+
{
|
|
19
|
+
objectsInArrays: true,
|
|
20
|
+
arraysInArrays: true
|
|
21
|
+
}
|
|
22
|
+
]
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
}
|
|
25
|
+
]
|
package/constants.js
DELETED
package/index.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/** @type {import("eslint").Linter.Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
es6: true,
|
|
6
|
-
node: true
|
|
7
|
-
},
|
|
8
|
-
parserOptions: {
|
|
9
|
-
createDefaultProgram: true,
|
|
10
|
-
ecmaVersion: 'latest',
|
|
11
|
-
sourceType: 'module'
|
|
12
|
-
},
|
|
13
|
-
extends: [ 'eslint:recommended', './import' ],
|
|
14
|
-
rules: {
|
|
15
|
-
semi: [ 'error', 'never' ],
|
|
16
|
-
'linebreak-style': [ 'error', 'unix' ],
|
|
17
|
-
'sort-imports': 'off',
|
|
18
|
-
indent: [ 'error', 2 ],
|
|
19
|
-
'brace-style': [ 'error', '1tbs', { allowSingleLine: true } ],
|
|
20
|
-
'comma-spacing': [ 'error', { before: false, after: true } ],
|
|
21
|
-
'func-call-spacing': [ 'error', 'never' ],
|
|
22
|
-
'max-len': [
|
|
23
|
-
'error',
|
|
24
|
-
{
|
|
25
|
-
code: 180,
|
|
26
|
-
comments: 180
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
'no-multi-spaces': 'error',
|
|
30
|
-
'no-multiple-empty-lines': [
|
|
31
|
-
'error',
|
|
32
|
-
{
|
|
33
|
-
max: 1
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
'space-before-function-paren': 'error',
|
|
37
|
-
'object-curly-newline': [
|
|
38
|
-
'error',
|
|
39
|
-
{
|
|
40
|
-
ObjectExpression: {
|
|
41
|
-
multiline: true,
|
|
42
|
-
minProperties: 3,
|
|
43
|
-
consistent: true
|
|
44
|
-
},
|
|
45
|
-
ObjectPattern: 'never',
|
|
46
|
-
ImportDeclaration: {
|
|
47
|
-
multiline: true,
|
|
48
|
-
minProperties: 10
|
|
49
|
-
},
|
|
50
|
-
ExportDeclaration: {
|
|
51
|
-
multiline: true,
|
|
52
|
-
minProperties: 10
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
'object-curly-spacing': [ 'error', 'always' ],
|
|
57
|
-
'comma-dangle': [ 'error', 'never' ],
|
|
58
|
-
'array-element-newline': [ 'error', 'consistent' ],
|
|
59
|
-
'array-bracket-newline': [ 'error', 'consistent' ],
|
|
60
|
-
'array-bracket-spacing': [
|
|
61
|
-
'error',
|
|
62
|
-
'always',
|
|
63
|
-
{
|
|
64
|
-
objectsInArrays: true,
|
|
65
|
-
arraysInArrays: true
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
curly: [ 'error', 'all' ],
|
|
69
|
-
complexity: [ 'error', 25 ],
|
|
70
|
-
'constructor-super': 'error',
|
|
71
|
-
'dot-notation': 'error',
|
|
72
|
-
eqeqeq: [ 'error', 'smart' ],
|
|
73
|
-
quotes: [ 'error', 'single' ],
|
|
74
|
-
'quote-props': [ 'error', 'as-needed' ],
|
|
75
|
-
'guard-for-in': 'error',
|
|
76
|
-
'id-blacklist': 'off',
|
|
77
|
-
'id-match': 'off',
|
|
78
|
-
'max-classes-per-file': 'off',
|
|
79
|
-
'new-parens': 'error',
|
|
80
|
-
'no-bitwise': 'error',
|
|
81
|
-
'no-caller': 'error',
|
|
82
|
-
'no-prototype-builtins': 'off',
|
|
83
|
-
'no-console': 'warn',
|
|
84
|
-
'no-debugger': 'warn',
|
|
85
|
-
'no-empty': 'warn',
|
|
86
|
-
'no-eval': 'error',
|
|
87
|
-
'no-invalid-this': 'off',
|
|
88
|
-
'no-new-wrappers': 'error',
|
|
89
|
-
'no-shadow': [
|
|
90
|
-
'off',
|
|
91
|
-
{
|
|
92
|
-
hoist: 'all'
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
'no-throw-literal': 'error',
|
|
96
|
-
'no-trailing-spaces': 'error',
|
|
97
|
-
'no-undef-init': 'error',
|
|
98
|
-
'no-underscore-dangle': 'error',
|
|
99
|
-
'no-unsafe-finally': 'error',
|
|
100
|
-
'no-unused-expressions': 'warn',
|
|
101
|
-
'no-unused-vars': 'error',
|
|
102
|
-
'object-shorthand': 'error',
|
|
103
|
-
'one-var': [ 'error', 'never' ],
|
|
104
|
-
'template-curly-spacing': [ 'error', 'never' ],
|
|
105
|
-
radix: 'error',
|
|
106
|
-
'spaced-comment': 'error',
|
|
107
|
-
'use-isnan': 'error',
|
|
108
|
-
'valid-typeof': 'warn',
|
|
109
|
-
'arrow-parens': [ 'error', 'always' ],
|
|
110
|
-
'keyword-spacing': 'error',
|
|
111
|
-
'lines-between-class-members': 'off',
|
|
112
|
-
'padding-line-between-statements': [
|
|
113
|
-
'error',
|
|
114
|
-
{
|
|
115
|
-
blankLine: 'always',
|
|
116
|
-
prev: '*',
|
|
117
|
-
next: 'return'
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
blankLine: 'always',
|
|
121
|
-
prev: [ 'const', 'let', 'var' ],
|
|
122
|
-
next: '*'
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
blankLine: 'any',
|
|
126
|
-
prev: [ 'const', 'let', 'var' ],
|
|
127
|
-
next: [ 'const', 'let', 'var' ]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
blankLine: 'always',
|
|
131
|
-
prev: [ 'case', 'default' ],
|
|
132
|
-
next: '*'
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
blankLine: 'always',
|
|
136
|
-
prev: '*',
|
|
137
|
-
next: [ 'function', 'if', 'try', 'break', 'class', 'for', 'while', 'do' ]
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
}
|