@useinsider/eslint-config 1.0.0-beta.3 → 1.0.1-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/package.json +27 -40
- package/src/dom.cjs +15 -0
- package/src/node.cjs +12 -0
- package/src/rules/{core.cjs → agnostic.cjs} +3 -11
- package/src/rules/stylistic.cjs +0 -5
- package/src/rules/typescript.cjs +11 -1
- package/src/rules/vue.cjs +175 -161
- package/src/{typescript-dom/index.cjs → typescript.cjs} +8 -10
- package/src/{vue3-typescript/index.cjs → vue3.cjs} +6 -22
- package/README.md +0 -85
- package/src/config/README.md +0 -56
- package/src/dom/README.md +0 -56
- package/src/dom/index.cjs +0 -19
- package/src/node/README.md +0 -56
- package/src/node/index.cjs +0 -18
- package/src/rules/README.md +0 -6
- package/src/typescript/README.md +0 -64
- package/src/typescript/index.cjs +0 -43
- package/src/typescript-dom/README.md +0 -85
- package/src/vue3/README.md +0 -84
- package/src/vue3/index.cjs +0 -28
- package/src/vue3-typescript/README.md +0 -93
- /package/src/{config/index.cjs → config.cjs} +0 -0
package/package.json
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/eslint-config",
|
|
3
|
-
"version": "1.0.0-beta.3",
|
|
4
|
-
"keywords": [
|
|
5
|
-
"useinsider",
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslint-config"
|
|
8
|
-
],
|
|
9
3
|
"author": "Sahin Deniz <sahin.deniz@useinsider.com>",
|
|
10
4
|
"license": "MIT",
|
|
5
|
+
"version": "1.0.1-beta.1",
|
|
11
6
|
"packageManager": "pnpm@8.11.0",
|
|
12
7
|
"scripts": {
|
|
13
|
-
"lint": "eslint ./",
|
|
14
|
-
"lint:
|
|
15
|
-
"lint:fix": "pnpm lint --fix",
|
|
16
|
-
"release": "semantic-release -e semantic-release-monorepo"
|
|
8
|
+
"lint": "eslint --ext .js,.cjs ./",
|
|
9
|
+
"lint:fix": "pnpm lint --fix"
|
|
17
10
|
},
|
|
18
11
|
"homepage": "https://github.com/useinsider/eslint-config#readme",
|
|
19
12
|
"repository": {
|
|
@@ -24,48 +17,42 @@
|
|
|
24
17
|
"url": "https://github.com/useinsider/eslint-config/issues"
|
|
25
18
|
},
|
|
26
19
|
"exports": {
|
|
27
|
-
".": "./src/node
|
|
28
|
-
"./
|
|
29
|
-
"./
|
|
30
|
-
"./dom": "./src/dom
|
|
31
|
-
"./
|
|
32
|
-
"./
|
|
33
|
-
"./
|
|
34
|
-
"./vue3-typescript": "./src/vue3-typescript/index.cjs"
|
|
20
|
+
".": "./src/node.cjs",
|
|
21
|
+
"./dom": "./src/dom.cjs",
|
|
22
|
+
"./typescript": "./src/typescript.cjs",
|
|
23
|
+
"./typescript-dom": "./src/typescript-dom.cjs",
|
|
24
|
+
"./vue3": "./src/vue3.cjs",
|
|
25
|
+
"./node": "./src/node.cjs",
|
|
26
|
+
"./config": "./src/config.cjs"
|
|
35
27
|
},
|
|
36
28
|
"files": [
|
|
37
29
|
"src/**/*"
|
|
38
30
|
],
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": "^16.0.0 || >=18.0.0"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@cspell/eslint-plugin": "6.19.2",
|
|
44
|
-
"@stylistic/eslint-plugin": "1.4.1",
|
|
45
|
-
"@stylistic/eslint-plugin-migrate": "1.4.1",
|
|
46
|
-
"eslint-config-airbnb-base": "15.0.0",
|
|
47
|
-
"eslint-plugin-import": "2.29.0",
|
|
48
|
-
"eslint-plugin-jsdoc": "46.9.0"
|
|
49
|
-
},
|
|
50
31
|
"devDependencies": {
|
|
51
32
|
"@semantic-release/changelog": "6.0.3",
|
|
52
33
|
"@semantic-release/git": "10.0.1",
|
|
34
|
+
"semantic-release": "22.0.8",
|
|
53
35
|
"@types/eslint": "8.44.8",
|
|
54
|
-
"@types/node": "20.10.
|
|
55
|
-
"@useinsider/release-config": "workspace:*",
|
|
56
|
-
"semantic-release": "19.0.5",
|
|
57
|
-
"semantic-release-monorepo": "7.0.5"
|
|
36
|
+
"@types/node": "20.10.1"
|
|
58
37
|
},
|
|
59
|
-
"
|
|
60
|
-
"@
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@cspell/eslint-plugin": ">=8.1.0",
|
|
61
40
|
"@stylistic/eslint-plugin": ">=1.4.1",
|
|
62
41
|
"@stylistic/eslint-plugin-migrate": ">=1.4.1",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
42
|
+
"eslint-config-airbnb-base": ">=15.0.0",
|
|
43
|
+
"eslint-plugin-import": ">=2.29.0",
|
|
44
|
+
"eslint-plugin-jsdoc": ">=46.9.0"
|
|
45
|
+
},
|
|
46
|
+
"optionalDependencies": {
|
|
47
|
+
"@rushstack/eslint-patch": "1.6.0",
|
|
48
|
+
"@stylistic/eslint-plugin": "1.4.1",
|
|
49
|
+
"@stylistic/eslint-plugin-migrate": "1.4.1",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "6.13.1",
|
|
65
51
|
"eslint": ">=8.54.0",
|
|
66
|
-
"eslint-
|
|
67
|
-
"eslint-plugin-vue
|
|
68
|
-
"vue-
|
|
52
|
+
"@vue/eslint-config-typescript": "12.0.0",
|
|
53
|
+
"eslint-plugin-vue": "9.19.2",
|
|
54
|
+
"eslint-plugin-vue-scoped-css": "2.5.1",
|
|
55
|
+
"vue-eslint-parser": "9.3.2"
|
|
69
56
|
},
|
|
70
57
|
"publishConfig": {
|
|
71
58
|
"access": "restricted"
|
package/src/dom.cjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @type {import("eslint").Linter.Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
extends: [
|
|
4
|
+
require.resolve('./base.cjs'),
|
|
5
|
+
'airbnb-base',
|
|
6
|
+
'plugin:jsdoc/recommended',
|
|
7
|
+
'plugin:@cspell/recommended',
|
|
8
|
+
require.resolve('./rules/agnostic.cjs'),
|
|
9
|
+
require.resolve('./rules/stylistic.cjs'),
|
|
10
|
+
require.resolve('./rules/jsdoc.cjs'),
|
|
11
|
+
],
|
|
12
|
+
env: {
|
|
13
|
+
browser: true,
|
|
14
|
+
},
|
|
15
|
+
};
|
package/src/node.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @type {import("eslint").Linter.Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
extends: [
|
|
4
|
+
require.resolve('./base.cjs'),
|
|
5
|
+
'airbnb-base',
|
|
6
|
+
'plugin:jsdoc/recommended',
|
|
7
|
+
'plugin:@cspell/recommended',
|
|
8
|
+
require.resolve('./rules/agnostic.cjs'),
|
|
9
|
+
require.resolve('./rules/stylistic.cjs'),
|
|
10
|
+
require.resolve('./rules/jsdoc.cjs'),
|
|
11
|
+
],
|
|
12
|
+
};
|
|
@@ -13,13 +13,7 @@ module.exports = {
|
|
|
13
13
|
'guard-for-in': 'error',
|
|
14
14
|
'handle-callback-err': ['error'],
|
|
15
15
|
'import/extensions': ['error', {
|
|
16
|
-
css: 'always',
|
|
17
16
|
js: 'never',
|
|
18
|
-
json: 'always',
|
|
19
|
-
jsx: 'never',
|
|
20
|
-
sass: 'always',
|
|
21
|
-
scss: 'always',
|
|
22
|
-
svg: 'always',
|
|
23
17
|
ts: 'never',
|
|
24
18
|
tsx: 'never',
|
|
25
19
|
vue: 'always',
|
|
@@ -68,7 +62,6 @@ module.exports = {
|
|
|
68
62
|
}],
|
|
69
63
|
'no-invalid-regexp': ['error'],
|
|
70
64
|
'no-iterator': ['error'],
|
|
71
|
-
'no-mixed-operators': 'off',
|
|
72
65
|
'no-multi-str': ['error'],
|
|
73
66
|
'no-native-reassign': 'error',
|
|
74
67
|
'no-nested-ternary': ['error'],
|
|
@@ -127,18 +120,18 @@ module.exports = {
|
|
|
127
120
|
},
|
|
128
121
|
{
|
|
129
122
|
blankLine: 'always',
|
|
130
|
-
next: ['multiline-block-like'],
|
|
131
123
|
prev: ['*'],
|
|
124
|
+
next: ['multiline-block-like'],
|
|
132
125
|
},
|
|
133
126
|
{
|
|
134
127
|
blankLine: 'always',
|
|
135
|
-
next: ['*'],
|
|
136
128
|
prev: ['multiline-block-like'],
|
|
129
|
+
next: ['*'],
|
|
137
130
|
},
|
|
138
131
|
{
|
|
139
132
|
blankLine: 'any',
|
|
140
|
-
next: ['case'],
|
|
141
133
|
prev: ['case'],
|
|
134
|
+
next: ['case'],
|
|
142
135
|
},
|
|
143
136
|
{
|
|
144
137
|
blankLine: 'any',
|
|
@@ -151,7 +144,6 @@ module.exports = {
|
|
|
151
144
|
}],
|
|
152
145
|
'prefer-destructuring': ['error'],
|
|
153
146
|
radix: ['error', 'as-needed'],
|
|
154
|
-
semi: 'off',
|
|
155
147
|
'space-before-function-paren': 'off',
|
|
156
148
|
strict: ['error'],
|
|
157
149
|
'use-isnan': ['error'],
|
package/src/rules/stylistic.cjs
CHANGED
|
@@ -24,10 +24,6 @@ module.exports = {
|
|
|
24
24
|
'@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
|
|
25
25
|
'@stylistic/indent': ['error', 4, {
|
|
26
26
|
SwitchCase: 1,
|
|
27
|
-
ignoredNodes: [
|
|
28
|
-
'PropertyDefinition[decorators]',
|
|
29
|
-
'TSUnionType',
|
|
30
|
-
],
|
|
31
27
|
}],
|
|
32
28
|
'@stylistic/key-spacing': ['error'],
|
|
33
29
|
'@stylistic/keyword-spacing': ['error'],
|
|
@@ -57,7 +53,6 @@ module.exports = {
|
|
|
57
53
|
'@stylistic/multiline-ternary': ['error', 'always-multiline'],
|
|
58
54
|
'@stylistic/new-parens': ['error', 'always'],
|
|
59
55
|
'@stylistic/no-extra-parens': ['error', 'all', {
|
|
60
|
-
allowParensAfterCommentPattern: '@type',
|
|
61
56
|
enforceForArrowConditionals: false,
|
|
62
57
|
nestedBinaryExpressions: false,
|
|
63
58
|
returnAssign: false,
|
package/src/rules/typescript.cjs
CHANGED
|
@@ -24,7 +24,13 @@ module.exports = {
|
|
|
24
24
|
'no-useless-constructor': 'off',
|
|
25
25
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
26
26
|
'@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],
|
|
27
|
-
'@typescript-eslint/indent': '
|
|
27
|
+
'@typescript-eslint/indent': ['error', 4, {
|
|
28
|
+
SwitchCase: 1,
|
|
29
|
+
ignoredNodes: [
|
|
30
|
+
'PropertyDefinition[decorators]',
|
|
31
|
+
'TSUnionType',
|
|
32
|
+
],
|
|
33
|
+
}],
|
|
28
34
|
semi: 'off',
|
|
29
35
|
'@typescript-eslint/semi': ['error', 'always'],
|
|
30
36
|
'@typescript-eslint/no-misused-promises': ['error', {
|
|
@@ -36,5 +42,9 @@ module.exports = {
|
|
|
36
42
|
'@typescript-eslint/lines-between-class-members': ['error', 'always', {
|
|
37
43
|
exceptAfterSingleLine: true,
|
|
38
44
|
}],
|
|
45
|
+
|
|
46
|
+
// TODO enable after SD-80950
|
|
47
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
48
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
39
49
|
},
|
|
40
50
|
};
|
package/src/rules/vue.cjs
CHANGED
|
@@ -1,166 +1,180 @@
|
|
|
1
|
+
/** @type {import("eslint").Linter.RulesRecord} */
|
|
2
|
+
const vueRules = {
|
|
3
|
+
'vue/array-bracket-newline': ['error'],
|
|
4
|
+
'vue/array-bracket-spacing': ['error', 'never'],
|
|
5
|
+
'vue/arrow-spacing': ['error'],
|
|
6
|
+
'vue/attribute-hyphenation': ['error', 'always'],
|
|
7
|
+
'vue/attributes-order': ['error', {
|
|
8
|
+
alphabetical: false,
|
|
9
|
+
order: [
|
|
10
|
+
'DEFINITION',
|
|
11
|
+
'LIST_RENDERING',
|
|
12
|
+
'CONDITIONALS',
|
|
13
|
+
'RENDER_MODIFIERS',
|
|
14
|
+
'GLOBAL',
|
|
15
|
+
'UNIQUE',
|
|
16
|
+
'TWO_WAY_BINDING',
|
|
17
|
+
'OTHER_DIRECTIVES',
|
|
18
|
+
'OTHER_ATTR',
|
|
19
|
+
'EVENTS',
|
|
20
|
+
'CONTENT',
|
|
21
|
+
],
|
|
22
|
+
}],
|
|
23
|
+
'vue/brace-style': ['error', '1tbs'],
|
|
24
|
+
'vue/comma-dangle': ['error', {
|
|
25
|
+
arrays: 'always-multiline',
|
|
26
|
+
exports: 'always-multiline',
|
|
27
|
+
functions: 'never',
|
|
28
|
+
imports: 'always-multiline',
|
|
29
|
+
objects: 'always-multiline',
|
|
30
|
+
}],
|
|
31
|
+
'vue/comma-spacing': ['error'],
|
|
32
|
+
'vue/comma-style': ['error', 'last'],
|
|
33
|
+
'vue/component-definition-name-casing': ['error', 'PascalCase'],
|
|
34
|
+
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
|
35
|
+
registeredComponentsOnly: false,
|
|
36
|
+
ignores: [
|
|
37
|
+
'component',
|
|
38
|
+
'transition',
|
|
39
|
+
],
|
|
40
|
+
}],
|
|
41
|
+
'vue/component-tags-order': ['error', {
|
|
42
|
+
order: [
|
|
43
|
+
'script[setup]',
|
|
44
|
+
'template',
|
|
45
|
+
'script:not([setup])',
|
|
46
|
+
'style',
|
|
47
|
+
],
|
|
48
|
+
}],
|
|
49
|
+
'vue/dot-location': ['error'],
|
|
50
|
+
'vue/dot-notation': ['error'],
|
|
51
|
+
'vue/eqeqeq': ['error'],
|
|
52
|
+
'vue/func-call-spacing': ['error'],
|
|
53
|
+
'vue/html-closing-bracket-newline': ['error', {
|
|
54
|
+
multiline: 'never',
|
|
55
|
+
singleline: 'never',
|
|
56
|
+
}],
|
|
57
|
+
'vue/html-end-tags': ['error'],
|
|
58
|
+
'vue/html-indent': ['error', 4],
|
|
59
|
+
'vue/html-quotes': ['error', 'double'],
|
|
60
|
+
'vue/html-self-closing': ['error'],
|
|
61
|
+
'vue/html-closing-bracket-spacing': ['error'],
|
|
62
|
+
'vue/key-spacing': ['error'],
|
|
63
|
+
'vue/keyword-spacing': ['error'],
|
|
64
|
+
'vue/max-attributes-per-line': ['error', {
|
|
65
|
+
multiline: {
|
|
66
|
+
max: 1,
|
|
67
|
+
},
|
|
68
|
+
singleline: 1,
|
|
69
|
+
}],
|
|
70
|
+
'vue/max-len': ['error', 120, {
|
|
71
|
+
ignoreComments: true,
|
|
72
|
+
ignoreRegExpLiterals: true,
|
|
73
|
+
ignoreTemplateLiterals: true,
|
|
74
|
+
ignoreTrailingComments: true,
|
|
75
|
+
ignoreUrls: true,
|
|
76
|
+
}],
|
|
77
|
+
'vue/multi-word-component-names': 'off',
|
|
78
|
+
'vue/mustache-interpolation-spacing': ['error', 'always'],
|
|
79
|
+
'vue/no-bare-strings-in-template': ['error'],
|
|
80
|
+
'vue/no-constant-condition': ['error'],
|
|
81
|
+
'vue/no-empty-component-block': ['error'],
|
|
82
|
+
'vue/no-empty-pattern': ['error'],
|
|
83
|
+
'vue/no-extra-parens': ['error'],
|
|
84
|
+
'vue/no-irregular-whitespace': ['error'],
|
|
85
|
+
'vue/no-multi-spaces': ['error'],
|
|
86
|
+
'vue/no-multiple-objects-in-class': ['error'],
|
|
87
|
+
'vue/no-potential-component-option-typo': ['error'],
|
|
88
|
+
'vue/no-reserved-component-names': ['error'],
|
|
89
|
+
'vue/no-restricted-syntax': ['error'],
|
|
90
|
+
'vue/no-spaces-around-equal-signs-in-attribute': ['error'],
|
|
91
|
+
'vue/no-sparse-arrays': ['error'],
|
|
92
|
+
'vue/no-undef-components': ['error'],
|
|
93
|
+
'vue/no-unsupported-features': ['error'],
|
|
94
|
+
'vue/no-unused-properties': ['error'],
|
|
95
|
+
'vue/no-unused-refs': ['error'],
|
|
96
|
+
'vue/no-use-computed-property-like-method': ['error'],
|
|
97
|
+
'vue/no-use-v-if-with-v-for': 'error',
|
|
98
|
+
'vue/no-useless-concat': ['error'],
|
|
99
|
+
'vue/no-useless-mustaches': ['error'],
|
|
100
|
+
'vue/no-useless-v-bind': ['error'],
|
|
101
|
+
'vue/no-v-text': ['error'],
|
|
102
|
+
'vue/object-curly-newline': ['error', {
|
|
103
|
+
consistent: true,
|
|
104
|
+
}],
|
|
105
|
+
'vue/object-curly-spacing': ['error', 'always'],
|
|
106
|
+
'vue/object-property-newline': ['error', {
|
|
107
|
+
allowAllPropertiesOnSameLine: true,
|
|
108
|
+
}],
|
|
109
|
+
'vue/object-shorthand': ['error', 'always'],
|
|
110
|
+
'vue/order-in-components': ['error', {
|
|
111
|
+
order: [
|
|
112
|
+
'el',
|
|
113
|
+
'name',
|
|
114
|
+
'parent',
|
|
115
|
+
'functional',
|
|
116
|
+
['delimiters', 'comments'],
|
|
117
|
+
['components', 'directives', 'filters'],
|
|
118
|
+
'extends',
|
|
119
|
+
'mixins',
|
|
120
|
+
'inheritAttrs',
|
|
121
|
+
'model',
|
|
122
|
+
['props', 'propsData'],
|
|
123
|
+
'data',
|
|
124
|
+
'computed',
|
|
125
|
+
'watch',
|
|
126
|
+
'LIFECYCLE_HOOKS',
|
|
127
|
+
'methods',
|
|
128
|
+
['template', 'render'],
|
|
129
|
+
'renderError',
|
|
130
|
+
],
|
|
131
|
+
}],
|
|
132
|
+
'vue/padding-line-between-blocks': ['error'],
|
|
133
|
+
'vue/prefer-separate-static-class': ['error'],
|
|
134
|
+
'vue/prefer-template': ['error'],
|
|
135
|
+
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
136
|
+
'vue/prop-name-casing': ['error', 'camelCase'],
|
|
137
|
+
'vue/quote-props': ['error', 'as-needed'],
|
|
138
|
+
'vue/require-default-prop': ['error'],
|
|
139
|
+
'vue/require-prop-type-constructor': 'error',
|
|
140
|
+
'vue/require-prop-types': ['error'],
|
|
141
|
+
'vue/script-indent': ['error', 4, {
|
|
142
|
+
switchCase: 1,
|
|
143
|
+
}],
|
|
144
|
+
'vue/space-in-parens': ['error', 'never'],
|
|
145
|
+
'vue/space-infix-ops': ['error'],
|
|
146
|
+
'vue/space-unary-ops': ['error'],
|
|
147
|
+
'vue/template-curly-spacing': ['error'],
|
|
148
|
+
'vue/this-in-template': ['error', 'never'],
|
|
149
|
+
'vue/v-bind-style': ['error', 'shorthand'],
|
|
150
|
+
'vue/v-on-function-call': 'off',
|
|
151
|
+
'vue/v-on-style': ['error', 'shorthand'],
|
|
152
|
+
'vue/v-on-event-hyphenation': 'off',
|
|
153
|
+
'vue/no-setup-props-destructure': 'off',
|
|
154
|
+
'vue/block-tag-newline': ['error', {
|
|
155
|
+
singleline: 'always',
|
|
156
|
+
multiline: 'always',
|
|
157
|
+
}],
|
|
158
|
+
'vue/require-explicit-emits': ['error'],
|
|
159
|
+
'vue/no-required-prop-with-default': ['error'],
|
|
160
|
+
'vue/no-ref-object-destructure': ['error'],
|
|
161
|
+
'vue/no-template-target-blank': ['error'],
|
|
162
|
+
'vue/define-emits-declaration': ['error', 'type-based'],
|
|
163
|
+
'vue/define-props-declaration': ['error', 'type-based'],
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// Following rules will be refactored within SD-71639
|
|
167
|
+
const vueCSSRules = {
|
|
168
|
+
'vue-scoped-css/enforce-style-type': 'off',
|
|
169
|
+
'vue-scoped-css/require-v-deep-argument': 'off',
|
|
170
|
+
'vue-scoped-css/no-unused-selector': 'off',
|
|
171
|
+
'vue-scoped-css/no-deprecated-deep-combinator': ['error'],
|
|
172
|
+
};
|
|
173
|
+
|
|
1
174
|
/** @type {import("eslint").Linter.Config} */
|
|
2
175
|
module.exports = {
|
|
3
176
|
rules: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'vue/arrow-spacing': ['error'],
|
|
7
|
-
'vue/attribute-hyphenation': ['error', 'always'],
|
|
8
|
-
'vue/attributes-order': ['error', {
|
|
9
|
-
alphabetical: false,
|
|
10
|
-
order: [
|
|
11
|
-
'DEFINITION',
|
|
12
|
-
'LIST_RENDERING',
|
|
13
|
-
'CONDITIONALS',
|
|
14
|
-
'RENDER_MODIFIERS',
|
|
15
|
-
'GLOBAL',
|
|
16
|
-
'UNIQUE',
|
|
17
|
-
'TWO_WAY_BINDING',
|
|
18
|
-
'OTHER_DIRECTIVES',
|
|
19
|
-
'OTHER_ATTR',
|
|
20
|
-
'EVENTS',
|
|
21
|
-
'CONTENT',
|
|
22
|
-
],
|
|
23
|
-
}],
|
|
24
|
-
'vue/brace-style': ['error', '1tbs'],
|
|
25
|
-
'vue/comma-dangle': ['error', {
|
|
26
|
-
arrays: 'always-multiline',
|
|
27
|
-
exports: 'always-multiline',
|
|
28
|
-
functions: 'never',
|
|
29
|
-
imports: 'always-multiline',
|
|
30
|
-
objects: 'always-multiline',
|
|
31
|
-
}],
|
|
32
|
-
'vue/comma-spacing': ['error'],
|
|
33
|
-
'vue/comma-style': ['error', 'last'],
|
|
34
|
-
'vue/component-definition-name-casing': ['error', 'PascalCase'],
|
|
35
|
-
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
|
36
|
-
registeredComponentsOnly: false,
|
|
37
|
-
ignores: [
|
|
38
|
-
'component',
|
|
39
|
-
'transition',
|
|
40
|
-
],
|
|
41
|
-
}],
|
|
42
|
-
'vue/component-tags-order': ['error', {
|
|
43
|
-
order: [
|
|
44
|
-
'script[setup]',
|
|
45
|
-
'template',
|
|
46
|
-
'script:not([setup])',
|
|
47
|
-
'style',
|
|
48
|
-
],
|
|
49
|
-
}],
|
|
50
|
-
'vue/dot-location': ['error'],
|
|
51
|
-
'vue/dot-notation': ['error'],
|
|
52
|
-
'vue/eqeqeq': ['error'],
|
|
53
|
-
'vue/func-call-spacing': ['error'],
|
|
54
|
-
'vue/html-closing-bracket-newline': ['error', {
|
|
55
|
-
multiline: 'never',
|
|
56
|
-
singleline: 'never',
|
|
57
|
-
}],
|
|
58
|
-
'vue/html-end-tags': ['error'],
|
|
59
|
-
'vue/html-indent': ['error', 4],
|
|
60
|
-
'vue/html-quotes': ['error', 'double'],
|
|
61
|
-
'vue/html-self-closing': ['error'],
|
|
62
|
-
'vue/html-closing-bracket-spacing': ['error'],
|
|
63
|
-
'vue/key-spacing': ['error'],
|
|
64
|
-
'vue/keyword-spacing': ['error'],
|
|
65
|
-
'vue/max-attributes-per-line': ['error', {
|
|
66
|
-
multiline: {
|
|
67
|
-
max: 1,
|
|
68
|
-
},
|
|
69
|
-
singleline: 1,
|
|
70
|
-
}],
|
|
71
|
-
'vue/max-len': ['error', 120, {
|
|
72
|
-
ignoreComments: true,
|
|
73
|
-
ignoreRegExpLiterals: true,
|
|
74
|
-
ignoreTemplateLiterals: true,
|
|
75
|
-
ignoreTrailingComments: true,
|
|
76
|
-
ignoreUrls: true,
|
|
77
|
-
}],
|
|
78
|
-
'vue/multi-word-component-names': 'off',
|
|
79
|
-
'vue/mustache-interpolation-spacing': ['error', 'always'],
|
|
80
|
-
'vue/no-bare-strings-in-template': ['error'],
|
|
81
|
-
'vue/no-constant-condition': ['error'],
|
|
82
|
-
'vue/no-empty-component-block': ['error'],
|
|
83
|
-
'vue/no-empty-pattern': ['error'],
|
|
84
|
-
'vue/no-extra-parens': ['error'],
|
|
85
|
-
'vue/no-irregular-whitespace': ['error'],
|
|
86
|
-
'vue/no-multi-spaces': ['error'],
|
|
87
|
-
'vue/no-multiple-objects-in-class': ['error'],
|
|
88
|
-
'vue/no-potential-component-option-typo': ['error'],
|
|
89
|
-
'vue/no-reserved-component-names': ['error'],
|
|
90
|
-
'vue/no-restricted-syntax': ['error'],
|
|
91
|
-
'vue/no-spaces-around-equal-signs-in-attribute': ['error'],
|
|
92
|
-
'vue/no-sparse-arrays': ['error'],
|
|
93
|
-
'vue/no-undef-components': ['error'],
|
|
94
|
-
'vue/no-unsupported-features': ['error'],
|
|
95
|
-
'vue/no-unused-properties': ['error'],
|
|
96
|
-
'vue/no-unused-refs': ['error'],
|
|
97
|
-
'vue/no-use-computed-property-like-method': ['error'],
|
|
98
|
-
'vue/no-use-v-if-with-v-for': 'error',
|
|
99
|
-
'vue/no-useless-concat': ['error'],
|
|
100
|
-
'vue/no-useless-mustaches': ['error'],
|
|
101
|
-
'vue/no-useless-v-bind': ['error'],
|
|
102
|
-
'vue/no-v-text': ['error'],
|
|
103
|
-
'vue/object-curly-newline': ['error', {
|
|
104
|
-
consistent: true,
|
|
105
|
-
}],
|
|
106
|
-
'vue/object-curly-spacing': ['error', 'always'],
|
|
107
|
-
'vue/object-property-newline': ['error', {
|
|
108
|
-
allowAllPropertiesOnSameLine: true,
|
|
109
|
-
}],
|
|
110
|
-
'vue/object-shorthand': ['error', 'always'],
|
|
111
|
-
'vue/order-in-components': ['error', {
|
|
112
|
-
order: [
|
|
113
|
-
'el',
|
|
114
|
-
'name',
|
|
115
|
-
'parent',
|
|
116
|
-
'functional',
|
|
117
|
-
['delimiters', 'comments'],
|
|
118
|
-
['components', 'directives', 'filters'],
|
|
119
|
-
'extends',
|
|
120
|
-
'mixins',
|
|
121
|
-
'inheritAttrs',
|
|
122
|
-
'model',
|
|
123
|
-
['props', 'propsData'],
|
|
124
|
-
'data',
|
|
125
|
-
'computed',
|
|
126
|
-
'watch',
|
|
127
|
-
'LIFECYCLE_HOOKS',
|
|
128
|
-
'methods',
|
|
129
|
-
['template', 'render'],
|
|
130
|
-
'renderError',
|
|
131
|
-
],
|
|
132
|
-
}],
|
|
133
|
-
'vue/padding-line-between-blocks': ['error'],
|
|
134
|
-
'vue/prefer-separate-static-class': ['error'],
|
|
135
|
-
'vue/prefer-template': ['error'],
|
|
136
|
-
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
137
|
-
'vue/prop-name-casing': ['error', 'camelCase'],
|
|
138
|
-
'vue/quote-props': ['error', 'as-needed'],
|
|
139
|
-
'vue/require-default-prop': ['error'],
|
|
140
|
-
'vue/require-prop-type-constructor': 'error',
|
|
141
|
-
'vue/require-prop-types': ['error'],
|
|
142
|
-
'vue/script-indent': ['error', 4, {
|
|
143
|
-
switchCase: 1,
|
|
144
|
-
}],
|
|
145
|
-
'vue/space-in-parens': ['error', 'never'],
|
|
146
|
-
'vue/space-infix-ops': ['error'],
|
|
147
|
-
'vue/space-unary-ops': ['error'],
|
|
148
|
-
'vue/template-curly-spacing': ['error'],
|
|
149
|
-
'vue/this-in-template': ['error', 'never'],
|
|
150
|
-
'vue/v-bind-style': ['error', 'shorthand'],
|
|
151
|
-
'vue/v-on-function-call': 'off',
|
|
152
|
-
'vue/v-on-style': ['error', 'shorthand'],
|
|
153
|
-
'vue/v-on-event-hyphenation': 'off',
|
|
154
|
-
'vue/no-setup-props-destructure': 'off',
|
|
155
|
-
'vue/block-tag-newline': ['error', {
|
|
156
|
-
singleline: 'always',
|
|
157
|
-
multiline: 'always',
|
|
158
|
-
}],
|
|
159
|
-
'vue/require-explicit-emits': ['error'],
|
|
160
|
-
'vue/no-required-prop-with-default': ['error'],
|
|
161
|
-
'vue/no-ref-object-destructure': ['error'],
|
|
162
|
-
'vue/no-template-target-blank': ['error'],
|
|
163
|
-
'vue/define-emits-declaration': ['error', 'type-based'],
|
|
164
|
-
'vue/define-props-declaration': ['error', 'type-based'],
|
|
177
|
+
...vueRules,
|
|
178
|
+
...vueCSSRules,
|
|
165
179
|
},
|
|
166
180
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
/** @type {import("eslint").Linter.Config} */
|
|
2
2
|
module.exports = {
|
|
3
3
|
extends: [
|
|
4
|
-
require.resolve('
|
|
5
|
-
'airbnb-base',
|
|
4
|
+
require.resolve('./base.cjs'),
|
|
6
5
|
'airbnb-typescript/base',
|
|
7
|
-
'plugin:@cspell/recommended',
|
|
8
6
|
'plugin:jsdoc/recommended',
|
|
7
|
+
'plugin:@cspell/recommended',
|
|
9
8
|
'plugin:jsdoc/recommended-typescript-error',
|
|
10
9
|
'plugin:@typescript-eslint/recommended',
|
|
11
10
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
12
|
-
require.resolve('
|
|
13
|
-
require.resolve('
|
|
14
|
-
require.resolve('
|
|
15
|
-
require.resolve('
|
|
11
|
+
require.resolve('./rules/agnostic.cjs'),
|
|
12
|
+
require.resolve('./rules/stylistic.cjs'),
|
|
13
|
+
require.resolve('./rules/jsdoc.cjs'),
|
|
14
|
+
require.resolve('./rules/typescript.cjs'),
|
|
16
15
|
],
|
|
16
|
+
plugins: ['@typescript-eslint'],
|
|
17
17
|
env: {
|
|
18
18
|
browser: true,
|
|
19
19
|
es2021: true,
|
|
20
20
|
},
|
|
21
|
-
plugins: ['@typescript-eslint'],
|
|
22
21
|
parser: '@typescript-eslint/parser',
|
|
23
22
|
parserOptions: {
|
|
24
23
|
ecmaVersion: 'latest',
|
|
@@ -26,13 +25,12 @@ module.exports = {
|
|
|
26
25
|
ecmaFeatures: {
|
|
27
26
|
jsx: true,
|
|
28
27
|
},
|
|
28
|
+
extraFileExtensions: ['.vue', 'gs'],
|
|
29
29
|
},
|
|
30
30
|
rules: {
|
|
31
31
|
'jsdoc/require-param': 'off',
|
|
32
32
|
'jsdoc/require-jsdoc': 'off',
|
|
33
33
|
'jsdoc/require-returns': 'off',
|
|
34
|
-
'jsdoc/require-param-type': 'off',
|
|
35
|
-
'jsdoc/check-param-names': 'off',
|
|
36
34
|
},
|
|
37
35
|
settings: {
|
|
38
36
|
jsdoc: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @type {import("eslint").Linter.Config} */
|
|
2
2
|
module.exports = {
|
|
3
3
|
extends: [
|
|
4
|
-
require.resolve('
|
|
4
|
+
require.resolve('./base.cjs'),
|
|
5
5
|
'airbnb-typescript/base',
|
|
6
6
|
'plugin:vue/vue3-recommended',
|
|
7
7
|
'plugin:vue-scoped-css/vue3-recommended',
|
|
@@ -10,11 +10,11 @@ module.exports = {
|
|
|
10
10
|
'plugin:@cspell/recommended',
|
|
11
11
|
'@vue/eslint-config-typescript',
|
|
12
12
|
'plugin:@typescript-eslint/recommended',
|
|
13
|
-
require.resolve('
|
|
14
|
-
require.resolve('
|
|
15
|
-
require.resolve('
|
|
16
|
-
require.resolve('
|
|
17
|
-
require.resolve('
|
|
13
|
+
require.resolve('./rules/agnostic.cjs'),
|
|
14
|
+
require.resolve('./rules/stylistic.cjs'),
|
|
15
|
+
require.resolve('./rules/jsdoc.cjs'),
|
|
16
|
+
require.resolve('./rules/vue.cjs'),
|
|
17
|
+
require.resolve('./rules/typescript.cjs'),
|
|
18
18
|
],
|
|
19
19
|
plugins: ['@typescript-eslint'],
|
|
20
20
|
env: {
|
|
@@ -30,20 +30,4 @@ module.exports = {
|
|
|
30
30
|
},
|
|
31
31
|
extraFileExtensions: ['.vue'],
|
|
32
32
|
},
|
|
33
|
-
rules: {
|
|
34
|
-
'jsdoc/require-param': 'off',
|
|
35
|
-
'jsdoc/require-jsdoc': 'off',
|
|
36
|
-
'jsdoc/require-returns': 'off',
|
|
37
|
-
'jsdoc/require-param-type': 'off',
|
|
38
|
-
'jsdoc/check-param-names': 'off',
|
|
39
|
-
},
|
|
40
|
-
settings: {
|
|
41
|
-
jsdoc: {
|
|
42
|
-
mode: 'typescript',
|
|
43
|
-
tagNamePreference: {
|
|
44
|
-
callback: 'watch',
|
|
45
|
-
desc: 'use',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
33
|
};
|