@alexlit/config-eslint 37.2.0 → 40.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/.eslintrc.js +13 -0
- package/CHANGELOG.md +23 -0
- package/package.json +10 -5
- package/plugins/etc.js +15 -0
- package/plugins/no-explicit-type-exports.js +10 -0
- package/plugins/quasar.js +8 -0
- package/plugins/sort-class-members.js +132 -0
- package/plugins/unicorn.js +1 -0
- package/plugins/vue-i18n.js +37 -0
package/.eslintrc.js
CHANGED
|
@@ -30,15 +30,18 @@ module.exports = defineConfig({
|
|
|
30
30
|
'./plugins/lit-a11y',
|
|
31
31
|
'./plugins/more',
|
|
32
32
|
'./plugins/no-constructor-bind',
|
|
33
|
+
'./plugins/no-explicit-type-exports',
|
|
33
34
|
'./plugins/no-loops',
|
|
34
35
|
'./plugins/no-secrets',
|
|
35
36
|
'./plugins/no-use-extend-native',
|
|
36
37
|
'./plugins/nuxt',
|
|
37
38
|
'./plugins/promise',
|
|
39
|
+
'./plugins/quasar',
|
|
38
40
|
'./plugins/regexp',
|
|
39
41
|
'./plugins/security',
|
|
40
42
|
'./plugins/simple-import-sort',
|
|
41
43
|
'./plugins/sonar',
|
|
44
|
+
// './plugins/sort-class-members', // wip configuration
|
|
42
45
|
'./plugins/sort-destructure-keys',
|
|
43
46
|
'./plugins/sort-keys-fix',
|
|
44
47
|
'./plugins/spellcheck',
|
|
@@ -49,6 +52,7 @@ module.exports = defineConfig({
|
|
|
49
52
|
'./plugins/unicorn',
|
|
50
53
|
'./plugins/unused-imports',
|
|
51
54
|
'./plugins/vue',
|
|
55
|
+
'./plugins/vue-i18n',
|
|
52
56
|
'./plugins/vuejs-accessibility',
|
|
53
57
|
'./plugins/wc',
|
|
54
58
|
'./plugins/write-good-comments',
|
|
@@ -89,6 +93,15 @@ module.exports = defineConfig({
|
|
|
89
93
|
'global-require': 'off',
|
|
90
94
|
},
|
|
91
95
|
},
|
|
96
|
+
|
|
97
|
+
{
|
|
98
|
+
extends: [require.resolve('./plugins/etc')],
|
|
99
|
+
files: ['*.ts', '*.tsx'],
|
|
100
|
+
|
|
101
|
+
parserOptions: {
|
|
102
|
+
project: './tsconfig.json',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
92
105
|
],
|
|
93
106
|
|
|
94
107
|
parserOptions: {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
# [40.0.0](https://github.com/alex-lit/config-eslint/compare/v39.0.0...v40.0.0) (2022-01-12)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **plugins:** add etc and explicit-type-exports plugins
|
|
6
|
+
([f46347d](https://github.com/alex-lit/config-eslint/commit/f46347d375b911eef06f4dd9361882d42a250beb))
|
|
7
|
+
|
|
8
|
+
# [39.0.0](https://github.com/alex-lit/config-eslint/compare/v38.0.1...v39.0.0) (2022-01-11)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
- **plugin:** add quasar
|
|
13
|
+
([42e725a](https://github.com/alex-lit/config-eslint/commit/42e725ac9ac3ff5f62c61e4f332000c95f2d82f4))
|
|
14
|
+
|
|
15
|
+
## [38.0.1](https://github.com/alex-lit/config-eslint/compare/v38.0.0...v38.0.1) (2022-01-10)
|
|
16
|
+
|
|
17
|
+
# [38.0.0](https://github.com/alex-lit/config-eslint/compare/v37.2.0...v38.0.0) (2022-01-10)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- add vue-i18n plugin
|
|
22
|
+
([43c5777](https://github.com/alex-lit/config-eslint/commit/43c577794025a1e502c270f68988d660f023e781))
|
|
23
|
+
|
|
1
24
|
# [37.2.0](https://github.com/alex-lit/config-eslint/compare/v37.1.0...v37.2.0) (2022-01-10)
|
|
2
25
|
|
|
3
26
|
# [37.1.0](https://github.com/alex-lit/config-eslint/compare/v37.0.0...v37.1.0) (2022-01-09)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "40.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
"version": "./node_modules/@alexlit/lint-kit/scripts/version.sh"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@typescript-eslint/
|
|
42
|
+
"@intlify/eslint-plugin-vue-i18n": "^1.2.0",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
44
|
+
"@typescript-eslint/parser": "^5.9.1",
|
|
44
45
|
"eslint": "^8.6.0",
|
|
45
46
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
46
47
|
"eslint-config-prettier": "^8.3.0",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"eslint-plugin-compat": "^4.0.1",
|
|
51
52
|
"eslint-plugin-decorator-position": "^4.0.1",
|
|
52
53
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
54
|
+
"eslint-plugin-etc": "^2.0.1",
|
|
53
55
|
"eslint-plugin-ext": "^0.1.0",
|
|
54
56
|
"eslint-plugin-filenames": "^1.3.2",
|
|
55
57
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"eslint-plugin-lit-a11y": "^2.2.0",
|
|
62
64
|
"eslint-plugin-more": "^1.0.5",
|
|
63
65
|
"eslint-plugin-no-constructor-bind": "^2.0.4",
|
|
66
|
+
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
|
|
64
67
|
"eslint-plugin-no-inferred-method-name": "^2.0.0",
|
|
65
68
|
"eslint-plugin-no-loops": "^0.3.0",
|
|
66
69
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
@@ -69,22 +72,24 @@
|
|
|
69
72
|
"eslint-plugin-nuxt": "^3.1.0",
|
|
70
73
|
"eslint-plugin-prettier": "^4.0.0",
|
|
71
74
|
"eslint-plugin-promise": "^6.0.0",
|
|
75
|
+
"eslint-plugin-quasar": "^1.1.0",
|
|
72
76
|
"eslint-plugin-react": "^7.28.0",
|
|
73
77
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
74
78
|
"eslint-plugin-regexp": "^1.5.1",
|
|
75
79
|
"eslint-plugin-security": "^1.4.0",
|
|
76
80
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
77
81
|
"eslint-plugin-sonarjs": "^0.11.0",
|
|
82
|
+
"eslint-plugin-sort-class-members": "^1.14.1",
|
|
78
83
|
"eslint-plugin-sort-destructure-keys": "^1.4.0",
|
|
79
84
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
80
85
|
"eslint-plugin-spellcheck": "^0.0.19",
|
|
81
|
-
"eslint-plugin-sql": "^2.
|
|
86
|
+
"eslint-plugin-sql": "^2.1.0",
|
|
82
87
|
"eslint-plugin-svelte3": "^3.3.0",
|
|
83
88
|
"eslint-plugin-testing-library": "^5.0.3",
|
|
84
89
|
"eslint-plugin-typescript-sort-keys": "^2.1.0",
|
|
85
90
|
"eslint-plugin-unicorn": "^40.0.0",
|
|
86
91
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
87
|
-
"eslint-plugin-vue": "^8.
|
|
92
|
+
"eslint-plugin-vue": "^8.3.0",
|
|
88
93
|
"eslint-plugin-vuejs-accessibility": "^1.1.1",
|
|
89
94
|
"eslint-plugin-vuetify": "^1.1.0",
|
|
90
95
|
"eslint-plugin-wc": "^1.3.2",
|
package/plugins/etc.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see [eslint-plugin-etc](https://github.com/cartant/eslint-plugin-etc)
|
|
3
|
+
*/
|
|
4
|
+
module.exports = {
|
|
5
|
+
extends: ['plugin:etc/recommended'],
|
|
6
|
+
|
|
7
|
+
plugins: ['etc'],
|
|
8
|
+
|
|
9
|
+
rules: {
|
|
10
|
+
'etc/no-misused-generics': 'error',
|
|
11
|
+
'etc/no-t': 'error',
|
|
12
|
+
'etc/prefer-less-than': 'error',
|
|
13
|
+
'etc/underscore-internal': 'error',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see [eslint-plugin-no-explicit-type-exports](https://github.com/intuit/eslint-plugin-no-explicit-type-exports)
|
|
3
|
+
*/
|
|
4
|
+
module.exports = {
|
|
5
|
+
plugins: ['eslint-plugin-no-explicit-type-exports'],
|
|
6
|
+
|
|
7
|
+
rules: {
|
|
8
|
+
'no-explicit-type-exports/no-explicit-type-exports': 'error',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see [eslint-plugin-sort-class-members](https://github.com/bryanrsmith/eslint-plugin-sort-class-members)
|
|
3
|
+
*/
|
|
4
|
+
module.exports = {
|
|
5
|
+
plugins: ['sort-class-members'],
|
|
6
|
+
|
|
7
|
+
rules: {
|
|
8
|
+
'sort-class-members/sort-class-members': [
|
|
9
|
+
'error',
|
|
10
|
+
{
|
|
11
|
+
accessorPairPositioning: 'getThenSet',
|
|
12
|
+
|
|
13
|
+
groups: {
|
|
14
|
+
'async-conventional-private-methods': [
|
|
15
|
+
{
|
|
16
|
+
async: true,
|
|
17
|
+
name: '/_.+/',
|
|
18
|
+
sort: 'alphabetical',
|
|
19
|
+
type: 'method',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
|
|
23
|
+
'static-accessor-pairs': [
|
|
24
|
+
{
|
|
25
|
+
accessorPair: true,
|
|
26
|
+
sort: 'alphabetical',
|
|
27
|
+
static: true,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
|
|
31
|
+
'static-arrow-function-properties': [
|
|
32
|
+
{
|
|
33
|
+
propertyType: 'ArrowFunctionExpression',
|
|
34
|
+
sort: 'alphabetical',
|
|
35
|
+
static: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
'static-async-conventional-private-methods': [
|
|
40
|
+
{
|
|
41
|
+
async: true,
|
|
42
|
+
name: '/_.+/',
|
|
43
|
+
sort: 'alphabetical',
|
|
44
|
+
static: true,
|
|
45
|
+
type: 'method',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
|
|
49
|
+
'static-async-methods': [
|
|
50
|
+
{
|
|
51
|
+
async: true,
|
|
52
|
+
sort: 'alphabetical',
|
|
53
|
+
static: true,
|
|
54
|
+
type: 'method',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
|
|
58
|
+
'static-conventional-private-methods': [
|
|
59
|
+
{
|
|
60
|
+
name: '/_.+/',
|
|
61
|
+
sort: 'alphabetical',
|
|
62
|
+
static: true,
|
|
63
|
+
type: 'method',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
|
|
67
|
+
'static-conventional-private-properties': [
|
|
68
|
+
{
|
|
69
|
+
name: '/_.+/',
|
|
70
|
+
sort: 'alphabetical',
|
|
71
|
+
static: true,
|
|
72
|
+
type: 'property',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
|
|
76
|
+
'static-getters': [
|
|
77
|
+
{
|
|
78
|
+
kind: 'get',
|
|
79
|
+
sort: 'alphabetical',
|
|
80
|
+
static: true,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
|
|
84
|
+
'static-setters': [
|
|
85
|
+
{
|
|
86
|
+
kind: 'set',
|
|
87
|
+
sort: 'alphabetical',
|
|
88
|
+
static: true,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
order: [
|
|
94
|
+
// static
|
|
95
|
+
'[static-properties]',
|
|
96
|
+
'[static-arrow-function-properties]',
|
|
97
|
+
'[static-accessor-pairs]',
|
|
98
|
+
'[static-getters]',
|
|
99
|
+
'[static-setters]',
|
|
100
|
+
'[static-methods]',
|
|
101
|
+
'[static-async-methods]',
|
|
102
|
+
|
|
103
|
+
// properties
|
|
104
|
+
'[properties]',
|
|
105
|
+
'[arrow-function-properties]',
|
|
106
|
+
|
|
107
|
+
// constructor
|
|
108
|
+
'constructor',
|
|
109
|
+
|
|
110
|
+
// accessor
|
|
111
|
+
'[accessor-pairs]',
|
|
112
|
+
'[getters]',
|
|
113
|
+
'[setters]',
|
|
114
|
+
|
|
115
|
+
// methods
|
|
116
|
+
'[methods]',
|
|
117
|
+
'[async-methods]',
|
|
118
|
+
|
|
119
|
+
// static private
|
|
120
|
+
'[static-conventional-private-properties]',
|
|
121
|
+
'[static-conventional-private-methods]',
|
|
122
|
+
'[static-async-conventional-private-methods]',
|
|
123
|
+
|
|
124
|
+
// private
|
|
125
|
+
'[conventional-private-properties]',
|
|
126
|
+
'[conventional-private-methods]',
|
|
127
|
+
'[async-conventional-private-methods]',
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
};
|
package/plugins/unicorn.js
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see [eslint-plugin-vue-i18n](https://eslint-plugin-vue-i18n.intlify.dev/)
|
|
3
|
+
*/
|
|
4
|
+
module.exports = {
|
|
5
|
+
extends: ['plugin:@intlify/vue-i18n/recommended'],
|
|
6
|
+
|
|
7
|
+
plugins: ['@intlify/vue-i18n'],
|
|
8
|
+
|
|
9
|
+
rules: {
|
|
10
|
+
'@intlify/vue-i18n/key-format-style': [
|
|
11
|
+
'error',
|
|
12
|
+
'snake_case',
|
|
13
|
+
{
|
|
14
|
+
allowArray: false,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
'@intlify/vue-i18n/no-duplicate-keys-in-locale': [
|
|
19
|
+
'error',
|
|
20
|
+
{
|
|
21
|
+
ignoreI18nBlock: false,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
'@intlify/vue-i18n/no-dynamic-keys': 'warn',
|
|
26
|
+
'@intlify/vue-i18n/no-raw-text': 'off',
|
|
27
|
+
'@intlify/vue-i18n/no-unused-keys': 'warn',
|
|
28
|
+
'@intlify/vue-i18n/prefer-sfc-lang-attr': 'error',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
settings: {
|
|
32
|
+
'vue-i18n': {
|
|
33
|
+
localeDir: './src/locales/*.{json,json5,yaml,yml}',
|
|
34
|
+
messageSyntaxVersion: '^9.0.0',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|