@alexlit/lint-kit 123.0.0 → 124.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/package.json +1 -1
- package/packages/config-eslint/README.md +14 -29
- package/packages/config-eslint/_legacy/LICENSE +20 -0
- package/packages/config-eslint/_legacy/README.md +48 -0
- package/packages/config-eslint/_legacy/index.js +12 -0
- package/packages/config-eslint/_legacy/package.json +97 -0
- package/packages/config-eslint/_legacy/plugins/jsdoc.js +32 -0
- package/packages/config-eslint/_legacy/plugins/regexp.js +7 -0
- package/packages/config-eslint/_legacy/plugins/sonar.js +5 -0
- package/packages/config-eslint/_legacy/plugins/tanstack-query.js +4 -0
- package/packages/config-eslint/_legacy/plugins/typescript.js +157 -0
- package/packages/config-eslint/_legacy/plugins/unicorn.js +70 -0
- package/packages/config-eslint/_legacy/plugins/vitest.js +16 -0
- package/packages/config-eslint/_legacy/plugins/vue-i18n.js +34 -0
- package/packages/config-eslint/_legacy/plugins/vue.js +291 -0
- package/packages/config-eslint/{utils → _legacy/utils}/create-config.js +9 -9
- package/packages/config-eslint/index.js +44 -8
- package/packages/config-eslint/package.json +11 -53
- package/packages/config-eslint/plugins/javascript.js +143 -0
- package/packages/config-eslint/plugins/jsdoc.js +28 -26
- package/packages/config-eslint/plugins/perfectionist.js +17 -0
- package/packages/config-eslint/plugins/regexp.js +3 -6
- package/packages/config-eslint/plugins/sonar.js +10 -4
- package/packages/config-eslint/plugins/tanstack-query.js +4 -4
- package/packages/config-eslint/plugins/typescript.js +6 -156
- package/packages/config-eslint/plugins/unicorn.js +49 -66
- package/packages/config-eslint/plugins/vitest.js +17 -14
- package/packages/config-eslint/plugins/vue-accessibility.js +22 -0
- package/packages/config-eslint/plugins/vue-i18n.js +30 -28
- package/packages/config-eslint/plugins/vue.js +168 -287
- package/packages/config-hooks/package.json +2 -2
- package/packages/config-htmllint/package.json +2 -2
- package/packages/config-stylelint/package.json +3 -3
- package/scripts/lint.eslint.sh +1 -1
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/index.js +0 -17
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/license.md +0 -21
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/package.json +0 -57
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/readme.md +0 -91
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/rules/no-use-extend-native.js +0 -150
- /package/packages/config-eslint/{TODO.md → _legacy/TODO.md} +0 -0
- /package/packages/config-eslint/{constants → _legacy/constants}/allow-boolean-property-list.js +0 -0
- /package/packages/config-eslint/{constants → _legacy/constants}/boolean-prefixes.js +0 -0
- /package/packages/config-eslint/{constants → _legacy/constants}/english-verbs.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/index.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/bash.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/django.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/elixir.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/go.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/java.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/latex.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/lua.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/php.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/python.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/ruby.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/rust.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/scala.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/specialized/html-symbol-entities.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/specialized/lorem-ipsum.js +0 -0
- /package/packages/config-eslint/{legacy.js → _legacy/legacy.js} +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/array-func.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/compat.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/decorator-position.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/eslint-comments.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/etc.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/ext.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/filenames.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/import.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/jsx-a11y.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/lit-a11y.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/lit.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/more.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-await-in-promise.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-constructor-bind.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-explicit-type-exports.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-loops.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-secrets.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-use-extend-native.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/node.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/prettier.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/promise.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/security.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/simple-import-sort.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sort-class-members.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sort-destructure-keys.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sort-keys-fix.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/spellcheck.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sql.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/testing-library.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/typescript-sort-keys.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/unused-imports.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/vuejs-accessibility.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/wc.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/write-good-comments.js +0 -0
- /package/packages/config-eslint/{utils → _legacy/utils}/extend-spell-checker.js +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# ESLint Configuration
|
|
2
2
|
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> For **eslint version < 9** use
|
|
5
|
+
> [@alexlit/config-eslint@90](https://www.npmjs.com/package/@alexlit/config-eslint?activeTab=versions)
|
|
6
|
+
> or lower.
|
|
7
|
+
|
|
3
8
|
## Installation
|
|
4
9
|
|
|
5
10
|
```sh
|
|
@@ -9,40 +14,20 @@ npm i @alexlit/config-eslint -D
|
|
|
9
14
|
## Connection
|
|
10
15
|
|
|
11
16
|
- Default
|
|
12
|
-
([see plugins enabled by default](https://github.com/alex-lit/lint-kit/blob/master/packages/config-eslint/index.js))
|
|
13
17
|
|
|
14
18
|
```js
|
|
15
|
-
// .
|
|
16
|
-
|
|
19
|
+
// eslint.config.js
|
|
20
|
+
import { config } from '@alexlit/config-eslint';
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
export default [...config];
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
-
|
|
25
|
+
- Pick some plugins
|
|
26
|
+
([available plugins](https://github.com/alex-lit/lint-kit/blob/master/packages/config-eslint/index.js))
|
|
22
27
|
|
|
23
28
|
```js
|
|
24
|
-
// .
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = require('@alexlit/config-eslint');
|
|
29
|
-
|
|
30
|
-
module.exports = createConfig(
|
|
31
|
-
{
|
|
32
|
-
// disable some default plugins
|
|
33
|
-
vitest: false,
|
|
34
|
-
|
|
35
|
-
// enable some optional plugins
|
|
36
|
-
node: true,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
// add custom rules
|
|
40
|
-
rules: {
|
|
41
|
-
'no-implicit-coercion': 'warn',
|
|
42
|
-
'spellcheck/spell-checker': extendSpellChecker({
|
|
43
|
-
skipWords: ['word1', 'word2'],
|
|
44
|
-
}),
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
);
|
|
29
|
+
// eslint.config.js
|
|
30
|
+
import { typescript, unicorn, vitest } from '@alexlit/config-eslint';
|
|
31
|
+
|
|
32
|
+
export default [...typescript, ...unicorn, ...vitest];
|
|
48
33
|
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Alexey Litovchenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ESLint Configuration
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm i @alexlit/config-eslint -D
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Connection
|
|
10
|
+
|
|
11
|
+
- Default
|
|
12
|
+
([see plugins enabled by default](https://github.com/alex-lit/lint-kit/blob/master/packages/config-eslint/index.js))
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
// .eslintrc.js
|
|
16
|
+
const { createConfig } = require('@alexlit/config-eslint');
|
|
17
|
+
|
|
18
|
+
module.exports = createConfig();
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- Custom
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
// .eslintrc.js
|
|
25
|
+
const {
|
|
26
|
+
createConfig,
|
|
27
|
+
extendSpellChecker,
|
|
28
|
+
} = require('@alexlit/config-eslint');
|
|
29
|
+
|
|
30
|
+
module.exports = createConfig(
|
|
31
|
+
{
|
|
32
|
+
// disable some default plugins
|
|
33
|
+
vitest: false,
|
|
34
|
+
|
|
35
|
+
// enable some optional plugins
|
|
36
|
+
node: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
// add custom rules
|
|
40
|
+
rules: {
|
|
41
|
+
'no-implicit-coercion': 'warn',
|
|
42
|
+
'spellcheck/spell-checker': extendSpellChecker({
|
|
43
|
+
skipWords: ['word1', 'word2'],
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { FlatCompat } = require('@eslint/eslintrc');
|
|
2
|
+
|
|
3
|
+
const { createConfig } = require('./utils/create-config');
|
|
4
|
+
const { extendSpellChecker } = require('./utils/extend-spell-checker');
|
|
5
|
+
|
|
6
|
+
const compat = new FlatCompat({
|
|
7
|
+
baseDirectory: __dirname,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const createFlatConfig = () => [...compat.extends('./legacy.js')];
|
|
11
|
+
|
|
12
|
+
module.exports = { createConfig, createFlatConfig, extendSpellChecker };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alexlit/config-eslint",
|
|
3
|
+
"version": "90.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Eslint config",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"eslint",
|
|
8
|
+
"config"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/alex-lit/lint-kit#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/alex-lit/lint-kit/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/alex-lit/lint-kit.git",
|
|
17
|
+
"directory": "packages/config-eslint"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Alexey Litovchenko",
|
|
21
|
+
"maintainers": [
|
|
22
|
+
"Alexey Litovchenko <alex.lit@outlook.com> (https://alexlit.gitlab.io)"
|
|
23
|
+
],
|
|
24
|
+
"type": "commonjs",
|
|
25
|
+
"main": "index.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"README.md",
|
|
28
|
+
"constants",
|
|
29
|
+
"dictionaries",
|
|
30
|
+
"index.js",
|
|
31
|
+
"legacy.js",
|
|
32
|
+
"plugins",
|
|
33
|
+
"utils"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"release": "../../scripts/release.sh",
|
|
37
|
+
"semver": "../../scripts/semver.sh",
|
|
38
|
+
"up": "../../scripts/up.sh"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@babel/eslint-parser": "^7.25.1",
|
|
42
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
43
|
+
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
|
|
44
|
+
"@tanstack/eslint-plugin-query": "^5.51.15",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
46
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
47
|
+
"eslint": "^9.8.0",
|
|
48
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
49
|
+
"eslint-config-prettier": "^9.1.0",
|
|
50
|
+
"eslint-define-config": "^2.1.0",
|
|
51
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
52
|
+
"eslint-plugin-array-func": "^4.0.0",
|
|
53
|
+
"eslint-plugin-compat": "^6.0.0",
|
|
54
|
+
"eslint-plugin-decorator-position": "^5.0.2",
|
|
55
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
56
|
+
"eslint-plugin-etc": "^2.0.3",
|
|
57
|
+
"eslint-plugin-ext": "^0.1.0",
|
|
58
|
+
"eslint-plugin-filenames": "^1.3.2",
|
|
59
|
+
"eslint-plugin-import": "^2.29.1",
|
|
60
|
+
"eslint-plugin-jsdoc": "^48.9.2",
|
|
61
|
+
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
62
|
+
"eslint-plugin-lit": "^1.14.0",
|
|
63
|
+
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
64
|
+
"eslint-plugin-more": "^1.0.5",
|
|
65
|
+
"eslint-plugin-no-await-in-promise": "^2.0.1",
|
|
66
|
+
"eslint-plugin-no-constructor-bind": "^2.0.4",
|
|
67
|
+
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
|
|
68
|
+
"eslint-plugin-no-loops": "^0.4.0",
|
|
69
|
+
"eslint-plugin-no-secrets": "^1.0.2",
|
|
70
|
+
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
71
|
+
"eslint-plugin-node": "^11.1.0",
|
|
72
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
73
|
+
"eslint-plugin-promise": "^7.0.0",
|
|
74
|
+
"eslint-plugin-regexp": "^2.6.0",
|
|
75
|
+
"eslint-plugin-security": "^3.0.1",
|
|
76
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
77
|
+
"eslint-plugin-sonarjs": "^1.0.4",
|
|
78
|
+
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
79
|
+
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
80
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
81
|
+
"eslint-plugin-spellcheck": "^0.0.20",
|
|
82
|
+
"eslint-plugin-sql": "^2.5.0",
|
|
83
|
+
"eslint-plugin-testing-library": "^6.2.2",
|
|
84
|
+
"eslint-plugin-typescript-sort-keys": "^3.2.0",
|
|
85
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
86
|
+
"eslint-plugin-unused-imports": "^4.0.1",
|
|
87
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
88
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
89
|
+
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
90
|
+
"eslint-plugin-wc": "^2.1.0",
|
|
91
|
+
"eslint-plugin-write-good-comments": "^0.2.0",
|
|
92
|
+
"typescript": "^5.5.4"
|
|
93
|
+
},
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">=18.18"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['plugin:jsdoc/recommended'],
|
|
3
|
+
|
|
4
|
+
plugins: ['jsdoc'],
|
|
5
|
+
|
|
6
|
+
rules: {
|
|
7
|
+
'jsdoc/no-undefined-types': 'off',
|
|
8
|
+
|
|
9
|
+
'jsdoc/require-jsdoc': [
|
|
10
|
+
'warn',
|
|
11
|
+
{
|
|
12
|
+
enableFixer: false,
|
|
13
|
+
|
|
14
|
+
require: {
|
|
15
|
+
ArrowFunctionExpression: false,
|
|
16
|
+
ClassDeclaration: true,
|
|
17
|
+
ClassExpression: false,
|
|
18
|
+
FunctionDeclaration: false,
|
|
19
|
+
FunctionExpression: false,
|
|
20
|
+
MethodDefinition: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
'jsdoc/require-param-description': 'off',
|
|
26
|
+
'jsdoc/require-param-type': 'off',
|
|
27
|
+
'jsdoc/require-returns': 'off',
|
|
28
|
+
'jsdoc/require-returns-description': 'off',
|
|
29
|
+
'jsdoc/require-returns-type': 'off',
|
|
30
|
+
'jsdoc/tag-lines': 'off',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* eslint-disable unicorn/no-null */
|
|
2
|
+
|
|
3
|
+
// const ALLOW_BOOLEAN_PROPERTY_LIST = require('../constants/allow-boolean-property-list');
|
|
4
|
+
// const BOOLEAN_PREFIXES = require('../constants/boolean-prefixes');
|
|
5
|
+
// const ENGLISH_VERBS = require('../constants/english-verbs');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
extends: ['plugin:@typescript-eslint/recommended'],
|
|
9
|
+
|
|
10
|
+
overrides: [
|
|
11
|
+
{
|
|
12
|
+
files: ['*.d.ts', '.*'],
|
|
13
|
+
|
|
14
|
+
rules: {
|
|
15
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
files: ['**/store/**/*', '**/vuex/**/*', '**/pinia/**/*'],
|
|
20
|
+
|
|
21
|
+
rules: {
|
|
22
|
+
'@typescript-eslint/no-shadow': 'off',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
|
|
27
|
+
plugins: ['@typescript-eslint'],
|
|
28
|
+
|
|
29
|
+
rules: {
|
|
30
|
+
'@typescript-eslint/array-type': ['error', { default: 'array' }],
|
|
31
|
+
|
|
32
|
+
'@typescript-eslint/consistent-type-assertions': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
assertionStyle: 'as',
|
|
36
|
+
objectLiteralTypeAssertions: 'allow-as-parameter',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
|
|
40
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
41
|
+
|
|
42
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
43
|
+
'error',
|
|
44
|
+
{ prefer: 'type-imports' },
|
|
45
|
+
],
|
|
46
|
+
|
|
47
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
48
|
+
|
|
49
|
+
'@typescript-eslint/indent': 'off',
|
|
50
|
+
|
|
51
|
+
'@typescript-eslint/member-ordering': 'off', // delegate to sort-class-members plugin
|
|
52
|
+
|
|
53
|
+
'@typescript-eslint/method-signature-style': ['error', 'method'],
|
|
54
|
+
|
|
55
|
+
'@typescript-eslint/naming-convention': 'off', // slow
|
|
56
|
+
|
|
57
|
+
// '@typescript-eslint/naming-convention': [
|
|
58
|
+
// 'error',
|
|
59
|
+
// {
|
|
60
|
+
// format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
61
|
+
// selector: 'default',
|
|
62
|
+
// },
|
|
63
|
+
// {
|
|
64
|
+
// format: ['camelCase'],
|
|
65
|
+
// selector: 'variable',
|
|
66
|
+
// },
|
|
67
|
+
// {
|
|
68
|
+
// format: ['camelCase'],
|
|
69
|
+
// leadingUnderscore: 'allow',
|
|
70
|
+
// selector: 'parameter',
|
|
71
|
+
// },
|
|
72
|
+
// {
|
|
73
|
+
// format: ['camelCase'],
|
|
74
|
+
// leadingUnderscore: 'require',
|
|
75
|
+
// modifiers: ['private'],
|
|
76
|
+
// selector: 'memberLike',
|
|
77
|
+
// },
|
|
78
|
+
// {
|
|
79
|
+
// format: ['PascalCase'],
|
|
80
|
+
// selector: ['typeLike'],
|
|
81
|
+
// },
|
|
82
|
+
// {
|
|
83
|
+
// format: ['UPPER_CASE'],
|
|
84
|
+
// selector: ['enumMember'],
|
|
85
|
+
// },
|
|
86
|
+
// {
|
|
87
|
+
// custom: {
|
|
88
|
+
// match: false,
|
|
89
|
+
// regex: '^I[A-Z]',
|
|
90
|
+
// },
|
|
91
|
+
|
|
92
|
+
// format: ['PascalCase'],
|
|
93
|
+
// selector: 'interface',
|
|
94
|
+
// },
|
|
95
|
+
// {
|
|
96
|
+
// format: null,
|
|
97
|
+
// leadingUnderscore: 'allow',
|
|
98
|
+
// selector: 'objectLiteralProperty',
|
|
99
|
+
// },
|
|
100
|
+
// {
|
|
101
|
+
// format: null,
|
|
102
|
+
// selector: 'objectLiteralMethod',
|
|
103
|
+
// },
|
|
104
|
+
// {
|
|
105
|
+
// format: null,
|
|
106
|
+
// modifiers: ['destructured'],
|
|
107
|
+
// selector: 'parameter',
|
|
108
|
+
// },
|
|
109
|
+
// {
|
|
110
|
+
// format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
|
|
111
|
+
// modifiers: ['const'],
|
|
112
|
+
// selector: 'variable',
|
|
113
|
+
// },
|
|
114
|
+
// {
|
|
115
|
+
// filter: {
|
|
116
|
+
// match: false,
|
|
117
|
+
// regex: `(${ALLOW_BOOLEAN_PROPERTY_LIST.join('|')})`,
|
|
118
|
+
// },
|
|
119
|
+
|
|
120
|
+
// format: ['PascalCase'],
|
|
121
|
+
|
|
122
|
+
// leadingUnderscore: 'allow',
|
|
123
|
+
|
|
124
|
+
// prefix: BOOLEAN_PREFIXES,
|
|
125
|
+
|
|
126
|
+
// selector: ['accessor', 'parameter', 'variable'],
|
|
127
|
+
|
|
128
|
+
// types: ['boolean'],
|
|
129
|
+
// },
|
|
130
|
+
// {
|
|
131
|
+
// format: ['PascalCase'],
|
|
132
|
+
|
|
133
|
+
// leadingUnderscore: 'allow',
|
|
134
|
+
|
|
135
|
+
// prefix: [...ENGLISH_VERBS, 'on'],
|
|
136
|
+
|
|
137
|
+
// selector: ['classMethod', 'function'],
|
|
138
|
+
// },
|
|
139
|
+
// ],
|
|
140
|
+
|
|
141
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
142
|
+
|
|
143
|
+
'@typescript-eslint/no-inferrable-types': [
|
|
144
|
+
'error',
|
|
145
|
+
{
|
|
146
|
+
ignoreParameters: true,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
|
|
150
|
+
'@typescript-eslint/no-shadow': ['error'],
|
|
151
|
+
'@typescript-eslint/no-unused-vars': 'off', // delegate to eslint-plugin-unused-imports
|
|
152
|
+
'@typescript-eslint/no-use-before-define': ['warn'],
|
|
153
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
154
|
+
'@typescript-eslint/sort-type-constituents': ['error'],
|
|
155
|
+
'@typescript-eslint/unified-signatures': ['error'],
|
|
156
|
+
},
|
|
157
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
module.exports = {
|
|
3
|
+
extends: ['plugin:unicorn/recommended'],
|
|
4
|
+
|
|
5
|
+
overrides: [
|
|
6
|
+
{
|
|
7
|
+
files: ['.*'],
|
|
8
|
+
|
|
9
|
+
rules: {
|
|
10
|
+
'unicorn/no-null': 'off',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
files: ['*.d.ts'],
|
|
15
|
+
|
|
16
|
+
rules: {
|
|
17
|
+
'unicorn/prefer-export-from': 'off',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
|
|
22
|
+
plugins: ['unicorn'],
|
|
23
|
+
|
|
24
|
+
rules: {
|
|
25
|
+
'unicorn/better-regex': 'off',
|
|
26
|
+
|
|
27
|
+
'unicorn/consistent-destructuring': 'warn',
|
|
28
|
+
|
|
29
|
+
'unicorn/consistent-function-scoping': [
|
|
30
|
+
'error',
|
|
31
|
+
{ checkArrowFunctions: false },
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
'unicorn/no-array-for-each': 'off',
|
|
35
|
+
|
|
36
|
+
'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
|
|
37
|
+
|
|
38
|
+
'unicorn/no-empty-file': 'off',
|
|
39
|
+
|
|
40
|
+
'unicorn/prefer-module': 'off',
|
|
41
|
+
|
|
42
|
+
'unicorn/prefer-node-protocol': 'off',
|
|
43
|
+
|
|
44
|
+
'unicorn/prevent-abbreviations': [
|
|
45
|
+
'warn',
|
|
46
|
+
{
|
|
47
|
+
allowList: {
|
|
48
|
+
ImportMetaEnv: true,
|
|
49
|
+
ProcessEnv: true,
|
|
50
|
+
Props: true,
|
|
51
|
+
args: true,
|
|
52
|
+
attrs: true,
|
|
53
|
+
env: true,
|
|
54
|
+
i18n: true,
|
|
55
|
+
params: true,
|
|
56
|
+
props: true,
|
|
57
|
+
ref: true,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
checkFilenames: false, // delegate to eslint-plugin-filenames
|
|
61
|
+
|
|
62
|
+
replacements: {
|
|
63
|
+
index18n: {
|
|
64
|
+
i18n: true,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
overrides: [
|
|
3
|
+
{
|
|
4
|
+
extends: ['plugin:vitest/legacy-all'],
|
|
5
|
+
files: ['*.{test,spec}.{js,ts}'],
|
|
6
|
+
plugins: ['vitest'],
|
|
7
|
+
|
|
8
|
+
rules: {
|
|
9
|
+
'vitest/no-conditional-in-test': 'off',
|
|
10
|
+
'vitest/no-conditional-tests': 'off',
|
|
11
|
+
'vitest/no-hooks': 'off',
|
|
12
|
+
'vitest/require-to-throw-message': 'off',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['plugin:@intlify/vue-i18n/recommended'],
|
|
3
|
+
|
|
4
|
+
plugins: ['@intlify/vue-i18n'],
|
|
5
|
+
|
|
6
|
+
rules: {
|
|
7
|
+
'@intlify/vue-i18n/key-format-style': [
|
|
8
|
+
'error',
|
|
9
|
+
'snake_case',
|
|
10
|
+
{
|
|
11
|
+
allowArray: false,
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
|
|
15
|
+
'@intlify/vue-i18n/no-duplicate-keys-in-locale': [
|
|
16
|
+
'error',
|
|
17
|
+
{
|
|
18
|
+
ignoreI18nBlock: false,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
|
|
22
|
+
'@intlify/vue-i18n/no-dynamic-keys': 'warn',
|
|
23
|
+
'@intlify/vue-i18n/no-raw-text': 'off',
|
|
24
|
+
'@intlify/vue-i18n/no-unused-keys': 'warn',
|
|
25
|
+
'@intlify/vue-i18n/prefer-sfc-lang-attr': 'error',
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
settings: {
|
|
29
|
+
'vue-i18n': {
|
|
30
|
+
localeDir: './src/locales/*.{json,json5,yaml,yml}',
|
|
31
|
+
messageSyntaxVersion: '^9.0.0',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|