@polyv/eslint-config 0.6.0-beta.5 → 0.7.0-beta.1
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/.nvmrc +1 -0
- package/lib/for-js.js +28 -17
- package/lib/for-ts.js +8 -6
- package/package.json +18 -32
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20
|
package/lib/for-js.js
CHANGED
|
@@ -25,9 +25,27 @@ module.exports = {
|
|
|
25
25
|
'plugin:sonarjs/recommended'
|
|
26
26
|
],
|
|
27
27
|
rules: {
|
|
28
|
+
semi: ['error', 'always'],
|
|
29
|
+
'space-before-function-paren': ['error', {
|
|
30
|
+
anonymous: 'never',
|
|
31
|
+
named: 'never',
|
|
32
|
+
asyncArrow: 'always'
|
|
33
|
+
}],
|
|
34
|
+
'operator-linebreak': ['error', 'after', {
|
|
35
|
+
overrides: {
|
|
36
|
+
'?': 'before',
|
|
37
|
+
':': 'before'
|
|
38
|
+
}
|
|
39
|
+
}],
|
|
40
|
+
'comma-dangle': ['error', 'only-multiline'],
|
|
41
|
+
'no-trailing-spaces': ['error', { ignoreComments: true }],
|
|
42
|
+
'no-multiple-empty-lines': ['error', { max: 2 }],
|
|
43
|
+
'wrap-iife': ['error', 'inside'],
|
|
44
|
+
'no-confusing-arrow': 'error',
|
|
45
|
+
'padded-blocks': 'off',
|
|
46
|
+
|
|
47
|
+
camelcase: 'error',
|
|
28
48
|
'no-debugger': devWarnProdError,
|
|
29
|
-
'semi': ['error', 'always'],
|
|
30
|
-
'camelcase': 'error',
|
|
31
49
|
'no-unused-vars': [devWarnProdError, {
|
|
32
50
|
vars: 'all',
|
|
33
51
|
args: 'after-used',
|
|
@@ -39,30 +57,23 @@ module.exports = {
|
|
|
39
57
|
classes: false,
|
|
40
58
|
variables: true
|
|
41
59
|
}],
|
|
42
|
-
'space-before-function-paren': ['error', {
|
|
43
|
-
anonymous: 'never',
|
|
44
|
-
named: 'never',
|
|
45
|
-
asyncArrow: 'always'
|
|
46
|
-
}],
|
|
47
|
-
'operator-linebreak': ['error', 'after'],
|
|
48
|
-
'padded-blocks': 'off',
|
|
49
|
-
'comma-dangle': ['error', 'only-multiline'],
|
|
50
60
|
'no-loop-func': 'error',
|
|
51
61
|
'no-script-url': 'error',
|
|
52
62
|
'no-new': 'off',
|
|
53
63
|
'no-constant-condition': devWarnProdError,
|
|
54
|
-
'no-empty': [devWarnProdError, {
|
|
64
|
+
'no-empty': [devWarnProdError, { allowEmptyCatch: true }],
|
|
55
65
|
'no-lonely-if': 'off',
|
|
56
|
-
'wrap-iife': ['error', 'inside'],
|
|
57
66
|
'no-var': 'error',
|
|
58
|
-
'prefer-promise-reject-errors': 'error',
|
|
59
67
|
'no-template-curly-in-string': 'off',
|
|
60
|
-
'
|
|
68
|
+
'prefer-promise-reject-errors': 'error',
|
|
69
|
+
|
|
61
70
|
'import/no-unresolved': 'off',
|
|
62
71
|
'import/no-duplicates': 'error',
|
|
63
|
-
|
|
64
|
-
'
|
|
65
|
-
|
|
72
|
+
|
|
73
|
+
'promise/prefer-await-to-then': 'warn',
|
|
74
|
+
|
|
75
|
+
'sonarjs/cognitive-complexity': ['error', 20],
|
|
76
|
+
'sonarjs/no-duplicate-string': ['error', { threshold: 5 }],
|
|
66
77
|
'sonarjs/prefer-single-boolean-return': 'off',
|
|
67
78
|
'sonarjs/no-collection-size-mischeck': 'off',
|
|
68
79
|
'sonarjs/no-nested-template-literals': 'warn'
|
package/lib/for-ts.js
CHANGED
|
@@ -12,12 +12,14 @@ module.exports = {
|
|
|
12
12
|
'plugin:import/typescript'
|
|
13
13
|
],
|
|
14
14
|
rules: {
|
|
15
|
-
'
|
|
15
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
16
|
+
|
|
17
|
+
semi: 'off',
|
|
16
18
|
'@typescript-eslint/semi': ['error', 'always'],
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
indent: 'off',
|
|
19
21
|
'@typescript-eslint/indent': ['error', 2, {
|
|
20
|
-
|
|
22
|
+
SwitchCase: 1
|
|
21
23
|
}],
|
|
22
24
|
|
|
23
25
|
'comma-spacing': 'off',
|
|
@@ -28,9 +30,9 @@ module.exports = {
|
|
|
28
30
|
|
|
29
31
|
'no-use-before-define': 'off',
|
|
30
32
|
'@typescript-eslint/no-use-before-define': ['error', {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
functions: false,
|
|
34
|
+
classes: false,
|
|
35
|
+
variables: true
|
|
34
36
|
}],
|
|
35
37
|
|
|
36
38
|
'no-unused-vars': 'off',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polyv/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-beta.1",
|
|
4
4
|
"description": "Standard ESLint configuration for Polyv projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polyv",
|
|
@@ -9,39 +9,25 @@
|
|
|
9
9
|
],
|
|
10
10
|
"homepage": "https://www.polyv.net/",
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"@babel/eslint-parser": ">=7.19.0",
|
|
15
|
-
"@typescript-eslint/eslint-plugin": ">=5.0.0",
|
|
16
|
-
"@typescript-eslint/parser": ">=5.0.0",
|
|
17
|
-
"@vue/eslint-config-standard": ">=8.0.0",
|
|
18
|
-
"eslint": ">=8.0.0",
|
|
19
|
-
"eslint-config-standard": "17.0.0",
|
|
20
|
-
"eslint-import-resolver-typescript": ">=3.5.0",
|
|
21
|
-
"eslint-plugin-import": ">=2.0.0",
|
|
22
|
-
"eslint-plugin-n": ">=15.7.0",
|
|
23
|
-
"eslint-plugin-promise": ">=6.1.0",
|
|
24
|
-
"eslint-plugin-sonarjs": ">=0.18.0",
|
|
25
|
-
"eslint-plugin-vue": ">=9.0.0",
|
|
26
|
-
"typescript": ">=4.0.0",
|
|
27
|
-
"vue-eslint-parser": ">=9.0.0"
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20.0.0"
|
|
28
14
|
},
|
|
29
|
-
"
|
|
30
|
-
"@babel/core": "^7.
|
|
31
|
-
"@babel/eslint-parser": "^7.
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
33
|
-
"@typescript-eslint/parser": "^
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@babel/core": "^7.24.9",
|
|
17
|
+
"@babel/eslint-parser": "^7.24.8",
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
19
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
34
20
|
"@vue/eslint-config-standard": "^8.0.1",
|
|
35
|
-
"eslint": "^8.
|
|
36
|
-
"eslint-config-standard": "^17.
|
|
37
|
-
"eslint-import-resolver-typescript": "^3.
|
|
38
|
-
"eslint-plugin-import": "^2.
|
|
39
|
-
"eslint-plugin-n": "^
|
|
40
|
-
"eslint-plugin-promise": "^6.
|
|
41
|
-
"eslint-plugin-sonarjs": "^0.
|
|
42
|
-
"eslint-plugin-vue": "^9.
|
|
43
|
-
"typescript": "^5.
|
|
44
|
-
"vue-eslint-parser": "^9.
|
|
21
|
+
"eslint": "^8.57.0",
|
|
22
|
+
"eslint-config-standard": "^17.1.0",
|
|
23
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
24
|
+
"eslint-plugin-import": "^2.29.1",
|
|
25
|
+
"eslint-plugin-n": "^16.6.2",
|
|
26
|
+
"eslint-plugin-promise": "^6.6.0",
|
|
27
|
+
"eslint-plugin-sonarjs": "^0.25.1",
|
|
28
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
29
|
+
"typescript": "^5.5.3",
|
|
30
|
+
"vue-eslint-parser": "^9.4.3"
|
|
45
31
|
},
|
|
46
32
|
"scripts": {
|
|
47
33
|
"print-config": "eslint --print-config ./lib/for-vue.js > config.txt"
|