@alexlit/config-eslint 90.0.0 → 91.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/README.md +14 -29
- package/index.js +44 -8
- package/package.json +11 -53
- package/constants/allow-boolean-property-list.js +0 -38
- package/constants/boolean-prefixes.js +0 -11
- package/constants/english-verbs.js +0 -3368
- package/dictionaries/index.js +0 -467
- package/dictionaries/programming/bash.js +0 -25
- package/dictionaries/programming/django.js +0 -2345
- package/dictionaries/programming/elixir.js +0 -64
- package/dictionaries/programming/go.js +0 -7748
- package/dictionaries/programming/java.js +0 -33527
- package/dictionaries/programming/latex.js +0 -675
- package/dictionaries/programming/lua.js +0 -394
- package/dictionaries/programming/php.js +0 -9788
- package/dictionaries/programming/python.js +0 -367
- package/dictionaries/programming/ruby.js +0 -357
- package/dictionaries/programming/rust.js +0 -115
- package/dictionaries/programming/scala.js +0 -2755
- package/dictionaries/specialized/html-symbol-entities.js +0 -1118
- package/dictionaries/specialized/lorem-ipsum.js +0 -359
- package/legacy.js +0 -3
- package/plugins/array-func.js +0 -20
- package/plugins/compat.js +0 -7
- package/plugins/decorator-position.js +0 -15
- package/plugins/eslint-comments.js +0 -9
- package/plugins/etc.js +0 -13
- package/plugins/ext.js +0 -12
- package/plugins/filenames.js +0 -38
- package/plugins/import.js +0 -133
- package/plugins/jsdoc.js +0 -32
- package/plugins/jsx-a11y.js +0 -5
- package/plugins/lit-a11y.js +0 -5
- package/plugins/lit.js +0 -9
- package/plugins/more.js +0 -17
- package/plugins/no-await-in-promise.js +0 -5
- package/plugins/no-constructor-bind.js +0 -8
- package/plugins/no-explicit-type-exports.js +0 -7
- package/plugins/no-loops.js +0 -7
- package/plugins/no-secrets.js +0 -12
- package/plugins/no-use-extend-native.js +0 -5
- package/plugins/node.js +0 -5
- package/plugins/prettier.js +0 -24
- package/plugins/promise.js +0 -10
- package/plugins/regexp.js +0 -7
- package/plugins/security.js +0 -10
- package/plugins/simple-import-sort.js +0 -7
- package/plugins/sonar.js +0 -5
- package/plugins/sort-class-members.js +0 -298
- package/plugins/sort-destructure-keys.js +0 -10
- package/plugins/sort-keys-fix.js +0 -7
- package/plugins/spellcheck.js +0 -9
- package/plugins/sql.js +0 -26
- package/plugins/tanstack-query.js +0 -4
- package/plugins/testing-library.js +0 -9
- package/plugins/typescript-sort-keys.js +0 -5
- package/plugins/typescript.js +0 -157
- package/plugins/unicorn.js +0 -70
- package/plugins/unused-imports.js +0 -17
- package/plugins/vitest.js +0 -16
- package/plugins/vue-i18n.js +0 -34
- package/plugins/vue.js +0 -291
- package/plugins/vuejs-accessibility.js +0 -20
- package/plugins/wc.js +0 -5
- package/plugins/write-good-comments.js +0 -7
- package/utils/create-config.js +0 -377
- package/utils/extend-spell-checker.js +0 -23
package/README.md
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
|
```
|
package/index.js
CHANGED
|
@@ -1,12 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-restricted-imports */
|
|
2
|
+
import globals from 'globals';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import { javascript } from './plugins/javascript.js';
|
|
5
|
+
import { jsdoc } from './plugins/jsdoc.js';
|
|
6
|
+
import { perfectionist } from './plugins/perfectionist.js';
|
|
7
|
+
import { regexp } from './plugins/regexp.js';
|
|
8
|
+
import { sonar } from './plugins/sonar.js';
|
|
9
|
+
import { tanstackQuery } from './plugins/tanstack-query.js';
|
|
10
|
+
import { typescript } from './plugins/typescript.js';
|
|
11
|
+
import { unicorn } from './plugins/unicorn.js';
|
|
12
|
+
import { vitest } from './plugins/vitest.js';
|
|
13
|
+
import { vueAccessibility } from './plugins/vue-accessibility.js';
|
|
14
|
+
import { vueI18n } from './plugins/vue-i18n.js';
|
|
15
|
+
import { vue } from './plugins/vue.js';
|
|
5
16
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
}
|
|
17
|
+
export const config = [
|
|
18
|
+
{ files: ['**/*.{js,mjs,cjs,typescript,vue}'] },
|
|
19
|
+
{ languageOptions: { globals: globals.browser } },
|
|
9
20
|
|
|
10
|
-
|
|
21
|
+
...javascript,
|
|
22
|
+
...jsdoc,
|
|
23
|
+
...perfectionist,
|
|
24
|
+
...regexp,
|
|
25
|
+
...sonar,
|
|
26
|
+
...tanstackQuery,
|
|
27
|
+
...typescript,
|
|
28
|
+
...unicorn,
|
|
29
|
+
...vitest,
|
|
30
|
+
...vue,
|
|
31
|
+
...vueAccessibility,
|
|
32
|
+
...vueI18n,
|
|
33
|
+
];
|
|
11
34
|
|
|
12
|
-
|
|
35
|
+
export {
|
|
36
|
+
javascript,
|
|
37
|
+
jsdoc,
|
|
38
|
+
perfectionist,
|
|
39
|
+
regexp,
|
|
40
|
+
sonar,
|
|
41
|
+
tanstackQuery,
|
|
42
|
+
typescript,
|
|
43
|
+
unicorn,
|
|
44
|
+
vitest,
|
|
45
|
+
vue,
|
|
46
|
+
vueAccessibility,
|
|
47
|
+
vueI18n,
|
|
48
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "91.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -21,16 +21,11 @@
|
|
|
21
21
|
"maintainers": [
|
|
22
22
|
"Alexey Litovchenko <alex.lit@outlook.com> (https://alexlit.gitlab.io)"
|
|
23
23
|
],
|
|
24
|
-
"type": "
|
|
24
|
+
"type": "module",
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"files": [
|
|
27
27
|
"README.md",
|
|
28
|
-
"
|
|
29
|
-
"dictionaries",
|
|
30
|
-
"index.js",
|
|
31
|
-
"legacy.js",
|
|
32
|
-
"plugins",
|
|
33
|
-
"utils"
|
|
28
|
+
"index.js"
|
|
34
29
|
],
|
|
35
30
|
"scripts": {
|
|
36
31
|
"release": "../../scripts/release.sh",
|
|
@@ -38,58 +33,21 @@
|
|
|
38
33
|
"up": "../../scripts/up.sh"
|
|
39
34
|
},
|
|
40
35
|
"dependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
36
|
+
"@eslint/js": "^9.8.0",
|
|
43
37
|
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
|
|
44
|
-
"@tanstack/eslint-plugin-query": "^5.51.
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"eslint": "^
|
|
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.8.3",
|
|
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",
|
|
38
|
+
"@tanstack/eslint-plugin-query": "^5.51.15",
|
|
39
|
+
"eslint": "^9.8.0",
|
|
40
|
+
"eslint-plugin-jsdoc": "^48.10.1",
|
|
41
|
+
"eslint-plugin-perfectionist": "^3.0.0",
|
|
74
42
|
"eslint-plugin-regexp": "^2.6.0",
|
|
75
|
-
"eslint-plugin-security": "^3.0.1",
|
|
76
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
77
43
|
"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
44
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
86
|
-
"eslint-plugin-unused-imports": "^4.0.1",
|
|
87
45
|
"eslint-plugin-vitest": "^0.5.4",
|
|
88
46
|
"eslint-plugin-vue": "^9.27.0",
|
|
89
47
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"typescript": "^
|
|
48
|
+
"globals": "^15.8.0",
|
|
49
|
+
"typescript": "^5.5.4",
|
|
50
|
+
"typescript-eslint": "^7.18.0"
|
|
93
51
|
},
|
|
94
52
|
"engines": {
|
|
95
53
|
"node": ">=18.18"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
module.exports = [
|
|
2
|
-
// html attributes
|
|
3
|
-
'allowfullscreen',
|
|
4
|
-
'allowpaymentrequest',
|
|
5
|
-
'async',
|
|
6
|
-
'autofocus',
|
|
7
|
-
'autoplay',
|
|
8
|
-
'checked',
|
|
9
|
-
'controls',
|
|
10
|
-
'default',
|
|
11
|
-
'defer',
|
|
12
|
-
'disabled',
|
|
13
|
-
'formnovalidate',
|
|
14
|
-
'hidden',
|
|
15
|
-
'ismap',
|
|
16
|
-
'itemscope',
|
|
17
|
-
'multiple',
|
|
18
|
-
'muted',
|
|
19
|
-
'nomodule',
|
|
20
|
-
'novalidate',
|
|
21
|
-
'open',
|
|
22
|
-
'playsinline',
|
|
23
|
-
'readonly',
|
|
24
|
-
'required',
|
|
25
|
-
'reversed',
|
|
26
|
-
'selected',
|
|
27
|
-
'truespeed',
|
|
28
|
-
|
|
29
|
-
// vuex store module registration
|
|
30
|
-
'namespaced',
|
|
31
|
-
|
|
32
|
-
// other
|
|
33
|
-
'enabled',
|
|
34
|
-
'invalid',
|
|
35
|
-
'loading',
|
|
36
|
-
'valid',
|
|
37
|
-
'value',
|
|
38
|
-
];
|