@alexlit/config-eslint 39.0.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 +11 -0
- package/CHANGELOG.md +7 -0
- package/package.json +6 -3
- package/plugins/etc.js +15 -0
- package/plugins/no-explicit-type-exports.js +10 -0
- package/plugins/sort-class-members.js +132 -0
package/.eslintrc.js
CHANGED
|
@@ -30,6 +30,7 @@ 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',
|
|
@@ -40,6 +41,7 @@ module.exports = defineConfig({
|
|
|
40
41
|
'./plugins/security',
|
|
41
42
|
'./plugins/simple-import-sort',
|
|
42
43
|
'./plugins/sonar',
|
|
44
|
+
// './plugins/sort-class-members', // wip configuration
|
|
43
45
|
'./plugins/sort-destructure-keys',
|
|
44
46
|
'./plugins/sort-keys-fix',
|
|
45
47
|
'./plugins/spellcheck',
|
|
@@ -91,6 +93,15 @@ module.exports = defineConfig({
|
|
|
91
93
|
'global-require': 'off',
|
|
92
94
|
},
|
|
93
95
|
},
|
|
96
|
+
|
|
97
|
+
{
|
|
98
|
+
extends: [require.resolve('./plugins/etc')],
|
|
99
|
+
files: ['*.ts', '*.tsx'],
|
|
100
|
+
|
|
101
|
+
parserOptions: {
|
|
102
|
+
project: './tsconfig.json',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
94
105
|
],
|
|
95
106
|
|
|
96
107
|
parserOptions: {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
# [39.0.0](https://github.com/alex-lit/config-eslint/compare/v38.0.1...v39.0.0) (2022-01-11)
|
|
2
9
|
|
|
3
10
|
### Features
|
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": [
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"eslint-plugin-compat": "^4.0.1",
|
|
52
52
|
"eslint-plugin-decorator-position": "^4.0.1",
|
|
53
53
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
54
|
+
"eslint-plugin-etc": "^2.0.1",
|
|
54
55
|
"eslint-plugin-ext": "^0.1.0",
|
|
55
56
|
"eslint-plugin-filenames": "^1.3.2",
|
|
56
57
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"eslint-plugin-lit-a11y": "^2.2.0",
|
|
63
64
|
"eslint-plugin-more": "^1.0.5",
|
|
64
65
|
"eslint-plugin-no-constructor-bind": "^2.0.4",
|
|
66
|
+
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
|
|
65
67
|
"eslint-plugin-no-inferred-method-name": "^2.0.0",
|
|
66
68
|
"eslint-plugin-no-loops": "^0.3.0",
|
|
67
69
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
@@ -77,16 +79,17 @@
|
|
|
77
79
|
"eslint-plugin-security": "^1.4.0",
|
|
78
80
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
79
81
|
"eslint-plugin-sonarjs": "^0.11.0",
|
|
82
|
+
"eslint-plugin-sort-class-members": "^1.14.1",
|
|
80
83
|
"eslint-plugin-sort-destructure-keys": "^1.4.0",
|
|
81
84
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
82
85
|
"eslint-plugin-spellcheck": "^0.0.19",
|
|
83
|
-
"eslint-plugin-sql": "^2.
|
|
86
|
+
"eslint-plugin-sql": "^2.1.0",
|
|
84
87
|
"eslint-plugin-svelte3": "^3.3.0",
|
|
85
88
|
"eslint-plugin-testing-library": "^5.0.3",
|
|
86
89
|
"eslint-plugin-typescript-sort-keys": "^2.1.0",
|
|
87
90
|
"eslint-plugin-unicorn": "^40.0.0",
|
|
88
91
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
89
|
-
"eslint-plugin-vue": "^8.
|
|
92
|
+
"eslint-plugin-vue": "^8.3.0",
|
|
90
93
|
"eslint-plugin-vuejs-accessibility": "^1.1.1",
|
|
91
94
|
"eslint-plugin-vuetify": "^1.1.0",
|
|
92
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
|
+
};
|