@alexlit/config-eslint 86.7.0 → 87.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/plugins/prettier.js +2 -2
- package/plugins/typescript.js +88 -86
- package/utils/create-config.js +63 -63
package/package.json
CHANGED
package/plugins/prettier.js
CHANGED
package/plugins/typescript.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-null */
|
|
2
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');
|
|
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
6
|
|
|
7
7
|
module.exports = {
|
|
8
8
|
extends: ['plugin:@typescript-eslint/recommended'],
|
|
@@ -52,89 +52,91 @@ module.exports = {
|
|
|
52
52
|
|
|
53
53
|
'@typescript-eslint/method-signature-style': ['error', 'method'],
|
|
54
54
|
|
|
55
|
-
'@typescript-eslint/naming-convention':
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
],
|
|
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
|
+
// ],
|
|
138
140
|
|
|
139
141
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
140
142
|
|
package/utils/create-config.js
CHANGED
|
@@ -3,27 +3,9 @@
|
|
|
3
3
|
const { defineConfig } = require('eslint-define-config');
|
|
4
4
|
|
|
5
5
|
const DEFAULT_PLUGINS = {
|
|
6
|
-
/** @see [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func) */
|
|
7
|
-
'array-func': true,
|
|
8
|
-
|
|
9
|
-
/** @see [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) */
|
|
10
|
-
compat: true,
|
|
11
|
-
|
|
12
6
|
/** @see [eslint-plugin-decorator-position](https://github.com/NullVoxPopuli/eslint-plugin-decorator-position) */
|
|
13
7
|
'decorator-position': true,
|
|
14
8
|
|
|
15
|
-
/** @see [eslint-plugin-eslint-comments](hhttps://github.com/mysticatea/eslint-plugin-eslint-comments) */
|
|
16
|
-
'eslint-comments': true,
|
|
17
|
-
|
|
18
|
-
/** @see [eslint-plugin-etc](https://github.com/cartant/eslint-plugin-etc) */
|
|
19
|
-
etc: true,
|
|
20
|
-
|
|
21
|
-
/** @see [eslint-plugin-ext](https://github.com/jiangfengming/eslint-plugin-ext) */
|
|
22
|
-
ext: true,
|
|
23
|
-
|
|
24
|
-
/** @see [eslint-plugin-filenames](https://github.com/selaux/eslint-plugin-filenames) */
|
|
25
|
-
filenames: true,
|
|
26
|
-
|
|
27
9
|
/**
|
|
28
10
|
* @see [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import)
|
|
29
11
|
* @see [eslint-import-resolver-alias](https://github.com/johvin/eslint-import-resolver-alias)
|
|
@@ -33,39 +15,6 @@ const DEFAULT_PLUGINS = {
|
|
|
33
15
|
/** @see [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) */
|
|
34
16
|
jsdoc: true,
|
|
35
17
|
|
|
36
|
-
/** @see [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) */
|
|
37
|
-
'jsx-a11y': true,
|
|
38
|
-
|
|
39
|
-
/** @see [eslint-plugin-lit](https://github.com/43081j/eslint-plugin-lit) */
|
|
40
|
-
lit: true,
|
|
41
|
-
|
|
42
|
-
/** @see [eslint-plugin-lit-a11y](https://www.npmjs.com/package/eslint-plugin-lit-a11y) */
|
|
43
|
-
'lit-a11y': true,
|
|
44
|
-
|
|
45
|
-
/** @see [eslint-plugin-more](https://github.com/WebbyLab/eslint-plugin-more) */
|
|
46
|
-
more: true,
|
|
47
|
-
|
|
48
|
-
/** @see [eslint-plugin-no-await-in-promise](https://github.com/hugo-vrijswijk/eslint-plugin-no-await-in-promise/) */
|
|
49
|
-
'no-await-in-promise': true,
|
|
50
|
-
|
|
51
|
-
/** @see [eslint-plugin-no-constructor-bind](https://github.com/markalfred/eslint-plugin-no-constructor-bind) */
|
|
52
|
-
'no-constructor-bind': true,
|
|
53
|
-
|
|
54
|
-
/** @see [eslint-plugin-no-explicit-type-exports](https://github.com/intuit/eslint-plugin-no-explicit-type-exports) */
|
|
55
|
-
'no-explicit-type-exports': true,
|
|
56
|
-
|
|
57
|
-
/** @see [eslint-plugin-no-loops](https://github.com/buildo/eslint-plugin-no-loops) */
|
|
58
|
-
'no-loops': true,
|
|
59
|
-
|
|
60
|
-
/** @see [eslint-plugin-no-secrets](https://github.com/nickdeis/eslint-plugin-no-secrets) */
|
|
61
|
-
'no-secrets': true,
|
|
62
|
-
|
|
63
|
-
/** @see [eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native) */
|
|
64
|
-
'no-use-extend-native': true,
|
|
65
|
-
|
|
66
|
-
/** @see [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) */
|
|
67
|
-
promise: true,
|
|
68
|
-
|
|
69
18
|
/** @see [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) */
|
|
70
19
|
regexp: true,
|
|
71
20
|
|
|
@@ -84,12 +33,6 @@ const DEFAULT_PLUGINS = {
|
|
|
84
33
|
/** @see [eslint-plugin-sort-keys-fix](https://github.com/leo-buneev/eslint-plugin-sort-keys-fix) */
|
|
85
34
|
'sort-keys-fix': true,
|
|
86
35
|
|
|
87
|
-
/** @see [eslint-plugin-spellcheck](https://github.com/aotaduy/eslint-plugin-spellcheck) */
|
|
88
|
-
spellcheck: true,
|
|
89
|
-
|
|
90
|
-
/** @see [eslint-plugin-sql](https://github.com/gajus/eslint-plugin-sql) */
|
|
91
|
-
sql: true,
|
|
92
|
-
|
|
93
36
|
/** @see [@tanstack/query](https://tanstack.com/query/v4/docs/react/eslint/eslint-plugin-query) */
|
|
94
37
|
'tanstack-query': true,
|
|
95
38
|
|
|
@@ -119,20 +62,77 @@ const DEFAULT_PLUGINS = {
|
|
|
119
62
|
|
|
120
63
|
/** @see [eslint-plugin-vuejs-accessibility](https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility) */
|
|
121
64
|
'vuejs-accessibility': true,
|
|
122
|
-
|
|
123
|
-
/** @see [eslint-plugin-wc](https://github.com/43081j/eslint-plugin-wc) */
|
|
124
|
-
wc: true,
|
|
125
|
-
|
|
126
|
-
/** @see [eslint-plugin-write-good-comments](https://github.com/kantord/eslint-plugin-write-good-comments) */
|
|
127
|
-
'write-good-comments': true,
|
|
128
65
|
};
|
|
129
66
|
|
|
130
67
|
const OPTIONAL_PLUGINS = {
|
|
68
|
+
/** @see [eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func) */
|
|
69
|
+
'array-func': false,
|
|
70
|
+
|
|
71
|
+
/** @see [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) */
|
|
72
|
+
compat: false,
|
|
73
|
+
|
|
74
|
+
/** @see [eslint-plugin-eslint-comments](https://github.com/mysticatea/eslint-plugin-eslint-comments) */
|
|
75
|
+
'eslint-comments': false,
|
|
76
|
+
|
|
77
|
+
/** @see [eslint-plugin-etc](https://github.com/cartant/eslint-plugin-etc) */
|
|
78
|
+
etc: false,
|
|
79
|
+
|
|
80
|
+
/** @see [eslint-plugin-ext](https://github.com/jiangfengming/eslint-plugin-ext) */
|
|
81
|
+
ext: false,
|
|
82
|
+
|
|
83
|
+
/** @see [eslint-plugin-filenames](https://github.com/selaux/eslint-plugin-filenames) */
|
|
84
|
+
filenames: false,
|
|
85
|
+
|
|
86
|
+
/** @see [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) */
|
|
87
|
+
'jsx-a11y': false,
|
|
88
|
+
|
|
89
|
+
/** @see [eslint-plugin-lit](https://github.com/43081j/eslint-plugin-lit) */
|
|
90
|
+
lit: false,
|
|
91
|
+
|
|
92
|
+
/** @see [eslint-plugin-lit-a11y](https://www.npmjs.com/package/eslint-plugin-lit-a11y) */
|
|
93
|
+
'lit-a11y': false,
|
|
94
|
+
|
|
95
|
+
/** @see [eslint-plugin-more](https://github.com/WebbyLab/eslint-plugin-more) */
|
|
96
|
+
more: false,
|
|
97
|
+
|
|
98
|
+
/** @see [eslint-plugin-no-await-in-promise](https://github.com/hugo-vrijswijk/eslint-plugin-no-await-in-promise/) */
|
|
99
|
+
'no-await-in-promise': false,
|
|
100
|
+
|
|
101
|
+
/** @see [eslint-plugin-no-constructor-bind](https://github.com/markalfred/eslint-plugin-no-constructor-bind) */
|
|
102
|
+
'no-constructor-bind': false,
|
|
103
|
+
|
|
104
|
+
/** @see [eslint-plugin-no-explicit-type-exports](https://github.com/intuit/eslint-plugin-no-explicit-type-exports) */
|
|
105
|
+
'no-explicit-type-exports': false,
|
|
106
|
+
|
|
107
|
+
/** @see [eslint-plugin-no-loops](https://github.com/buildo/eslint-plugin-no-loops) */
|
|
108
|
+
'no-loops': false,
|
|
109
|
+
|
|
110
|
+
/** @see [eslint-plugin-no-secrets](https://github.com/nickdeis/eslint-plugin-no-secrets) */
|
|
111
|
+
'no-secrets': false,
|
|
112
|
+
|
|
113
|
+
/** @see [eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native) */
|
|
114
|
+
'no-use-extend-native': false,
|
|
115
|
+
|
|
131
116
|
/** @see [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) */
|
|
132
117
|
node: false,
|
|
133
118
|
|
|
119
|
+
/** @see [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) */
|
|
120
|
+
promise: false,
|
|
121
|
+
|
|
134
122
|
/** @see [eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security) */
|
|
135
123
|
security: false,
|
|
124
|
+
|
|
125
|
+
/** @see [eslint-plugin-spellcheck](https://github.com/aotaduy/eslint-plugin-spellcheck) */
|
|
126
|
+
spellcheck: false,
|
|
127
|
+
|
|
128
|
+
/** @see [eslint-plugin-sql](https://github.com/gajus/eslint-plugin-sql) */
|
|
129
|
+
sql: false,
|
|
130
|
+
|
|
131
|
+
/** @see [eslint-plugin-wc](https://github.com/43081j/eslint-plugin-wc) */
|
|
132
|
+
wc: false,
|
|
133
|
+
|
|
134
|
+
/** @see [eslint-plugin-write-good-comments](https://github.com/kantord/eslint-plugin-write-good-comments) */
|
|
135
|
+
'write-good-comments': false,
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
const CODESTYLE_PLUGINS = {
|