@juuso.piikkila/eslint-config-typescript 3.0.0 → 3.0.2
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/.github/workflows/main.yml +2 -0
- package/CHANGELOG.md +12 -0
- package/configurations/base/index.cjs +68 -73
- package/configurations/typescript/index.cjs +25 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [3.0.2](https://github.com/juusopiikkila/eslint-config-typescript/compare/3.0.1...3.0.2) (2025-03-09)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* try updating plugins ([246c174](https://github.com/juusopiikkila/eslint-config-typescript/commit/246c17420b725e0debe79ed6a538dde5c414b052))
|
|
6
|
+
|
|
7
|
+
## [3.0.1](https://github.com/juusopiikkila/eslint-config-typescript/compare/3.0.0...3.0.1) (2025-03-06)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* sort by keys and fix typescript rules ([512cbf4](https://github.com/juusopiikkila/eslint-config-typescript/commit/512cbf4b1fb68f1c7f4cf7c91158393c489bfdc4))
|
|
12
|
+
|
|
1
13
|
## [3.0.0](https://github.com/juusopiikkila/eslint-config-typescript/compare/2.8.0...3.0.0) (2025-03-05)
|
|
2
14
|
|
|
3
15
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
const canonical = require('eslint-config-canonical/configurations/canonical');
|
|
2
3
|
const regexp = require('eslint-config-canonical/configurations/regexp');
|
|
3
4
|
|
|
@@ -6,13 +7,36 @@ module.exports = [
|
|
|
6
7
|
regexp.recommended,
|
|
7
8
|
{
|
|
8
9
|
files: [
|
|
9
|
-
'**/*.{
|
|
10
|
+
'**/*.{js,jsx,cjs,mjs,ts,tsx,vue}',
|
|
10
11
|
],
|
|
12
|
+
plugins: {
|
|
13
|
+
'@stylistic': require('@stylistic/eslint-plugin'),
|
|
14
|
+
canonical: require('eslint-plugin-canonical'),
|
|
15
|
+
import: require('eslint-plugin-import'),
|
|
16
|
+
perfectionist: require('eslint-plugin-perfectionist'),
|
|
17
|
+
unicorn: require('eslint-plugin-unicorn'),
|
|
18
|
+
},
|
|
11
19
|
rules: {
|
|
20
|
+
'@stylistic/array-bracket-newline': [
|
|
21
|
+
2,
|
|
22
|
+
'consistent',
|
|
23
|
+
],
|
|
24
|
+
'@stylistic/array-element-newline': [
|
|
25
|
+
'error',
|
|
26
|
+
'consistent',
|
|
27
|
+
],
|
|
28
|
+
'@stylistic/comma-dangle': [
|
|
29
|
+
'error',
|
|
30
|
+
'always-multiline',
|
|
31
|
+
],
|
|
12
32
|
'@stylistic/indent': [
|
|
13
33
|
'error',
|
|
14
34
|
4,
|
|
15
35
|
],
|
|
36
|
+
'@stylistic/no-extra-parens': [
|
|
37
|
+
'error',
|
|
38
|
+
'functions',
|
|
39
|
+
],
|
|
16
40
|
'@stylistic/object-curly-newline': [
|
|
17
41
|
2,
|
|
18
42
|
{
|
|
@@ -38,42 +62,15 @@ module.exports = [
|
|
|
38
62
|
},
|
|
39
63
|
},
|
|
40
64
|
],
|
|
41
|
-
'@stylistic/array-bracket-newline': [
|
|
42
|
-
2,
|
|
43
|
-
'consistent',
|
|
44
|
-
],
|
|
45
|
-
'max-len': [
|
|
46
|
-
'error',
|
|
47
|
-
{
|
|
48
|
-
code: 120,
|
|
49
|
-
ignoreComments: true,
|
|
50
|
-
ignoreUrls: true,
|
|
51
|
-
ignoreStrings: true,
|
|
52
|
-
ignoreTemplateLiterals: true,
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
65
|
'@stylistic/object-property-newline': [
|
|
56
66
|
2,
|
|
57
67
|
{
|
|
58
68
|
allowAllPropertiesOnSameLine: true,
|
|
59
69
|
},
|
|
60
70
|
],
|
|
61
|
-
'@stylistic/
|
|
62
|
-
2,
|
|
63
|
-
{
|
|
64
|
-
multiline: {
|
|
65
|
-
delimiter: 'none',
|
|
66
|
-
requireLast: true,
|
|
67
|
-
},
|
|
68
|
-
singleline: {
|
|
69
|
-
delimiter: 'semi',
|
|
70
|
-
requireLast: false,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
'arrow-body-style': [
|
|
71
|
+
'@stylistic/operator-linebreak': [
|
|
75
72
|
'error',
|
|
76
|
-
'
|
|
73
|
+
'before',
|
|
77
74
|
],
|
|
78
75
|
'@stylistic/space-before-function-paren': [
|
|
79
76
|
'error',
|
|
@@ -83,24 +80,11 @@ module.exports = [
|
|
|
83
80
|
asyncArrow: 'always',
|
|
84
81
|
},
|
|
85
82
|
],
|
|
86
|
-
'
|
|
87
|
-
'import/extensions': 'off',
|
|
88
|
-
'perfectionist/sort-objects': 'off',
|
|
89
|
-
'perfectionist/sort-object-types': 'off',
|
|
90
|
-
'perfectionist/sort-switch-case': 'off',
|
|
91
|
-
'perfectionist/sort-decorators': 'off',
|
|
92
|
-
'perfectionist/sort-interfaces': 'off',
|
|
93
|
-
'perfectionist/sort-modules': 'off',
|
|
94
|
-
'perfectionist/sort-enums': 'off',
|
|
95
|
-
'perfectionist/sort-union-types': 'off',
|
|
96
|
-
'@stylistic/operator-linebreak': [
|
|
97
|
-
'error',
|
|
98
|
-
'before',
|
|
99
|
-
],
|
|
100
|
-
'@stylistic/no-extra-parens': [
|
|
83
|
+
'arrow-body-style': [
|
|
101
84
|
'error',
|
|
102
|
-
'
|
|
85
|
+
'as-needed',
|
|
103
86
|
],
|
|
87
|
+
'canonical/destructuring-property-newline': 'off',
|
|
104
88
|
'canonical/filename-match-regex': [
|
|
105
89
|
'error',
|
|
106
90
|
{
|
|
@@ -109,6 +93,8 @@ module.exports = [
|
|
|
109
93
|
ignoreExporting: true,
|
|
110
94
|
},
|
|
111
95
|
],
|
|
96
|
+
'canonical/id-match': 'off',
|
|
97
|
+
'canonical/import-specifier-newline': 'off',
|
|
112
98
|
'func-style': [
|
|
113
99
|
'error',
|
|
114
100
|
'declaration',
|
|
@@ -116,29 +102,21 @@ module.exports = [
|
|
|
116
102
|
allowArrowFunctions: true,
|
|
117
103
|
},
|
|
118
104
|
],
|
|
119
|
-
'
|
|
105
|
+
'import/extensions': 'off',
|
|
106
|
+
'max-len': [
|
|
120
107
|
'error',
|
|
121
108
|
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
binary: {
|
|
128
|
-
minimumDigits: 0,
|
|
129
|
-
groupLength: 4,
|
|
130
|
-
},
|
|
131
|
-
octal: {
|
|
132
|
-
minimumDigits: 0,
|
|
133
|
-
groupLength: 4,
|
|
134
|
-
},
|
|
135
|
-
number: {
|
|
136
|
-
minimumDigits: 5,
|
|
137
|
-
groupLength: 3,
|
|
138
|
-
},
|
|
109
|
+
code: 120,
|
|
110
|
+
ignoreComments: true,
|
|
111
|
+
ignoreUrls: true,
|
|
112
|
+
ignoreStrings: true,
|
|
113
|
+
ignoreTemplateLiterals: true,
|
|
139
114
|
},
|
|
140
115
|
],
|
|
116
|
+
'no-warning-comments': 'off',
|
|
141
117
|
'perfectionist/sort-classes': 'off',
|
|
118
|
+
'perfectionist/sort-decorators': 'off',
|
|
119
|
+
'perfectionist/sort-enums': 'off',
|
|
142
120
|
'perfectionist/sort-imports': [
|
|
143
121
|
2,
|
|
144
122
|
{
|
|
@@ -169,17 +147,34 @@ module.exports = [
|
|
|
169
147
|
type: 'natural',
|
|
170
148
|
},
|
|
171
149
|
],
|
|
172
|
-
'
|
|
173
|
-
'
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
'
|
|
178
|
-
'
|
|
150
|
+
'perfectionist/sort-interfaces': 'off',
|
|
151
|
+
'perfectionist/sort-modules': 'off',
|
|
152
|
+
'perfectionist/sort-object-types': 'off',
|
|
153
|
+
'perfectionist/sort-objects': 'off',
|
|
154
|
+
'perfectionist/sort-switch-case': 'off',
|
|
155
|
+
'perfectionist/sort-union-types': 'off',
|
|
156
|
+
'unicorn/numeric-separators-style': [
|
|
179
157
|
'error',
|
|
180
|
-
|
|
158
|
+
{
|
|
159
|
+
onlyIfContainsSeparator: false,
|
|
160
|
+
hexadecimal: {
|
|
161
|
+
minimumDigits: 0,
|
|
162
|
+
groupLength: 2,
|
|
163
|
+
},
|
|
164
|
+
binary: {
|
|
165
|
+
minimumDigits: 0,
|
|
166
|
+
groupLength: 4,
|
|
167
|
+
},
|
|
168
|
+
octal: {
|
|
169
|
+
minimumDigits: 0,
|
|
170
|
+
groupLength: 4,
|
|
171
|
+
},
|
|
172
|
+
number: {
|
|
173
|
+
minimumDigits: 5,
|
|
174
|
+
groupLength: 3,
|
|
175
|
+
},
|
|
176
|
+
},
|
|
181
177
|
],
|
|
182
|
-
'canonical/id-match': 'off',
|
|
183
178
|
},
|
|
184
179
|
},
|
|
185
180
|
];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
const typescript = require('eslint-config-canonical/configurations/typescript');
|
|
2
3
|
const typescriptTypeChecking = require('eslint-config-canonical/configurations/typescript-type-checking');
|
|
3
4
|
|
|
@@ -6,28 +7,32 @@ module.exports = [
|
|
|
6
7
|
typescriptTypeChecking.recommended,
|
|
7
8
|
{
|
|
8
9
|
files: [
|
|
9
|
-
'**/*.{
|
|
10
|
+
'**/*.{js,jsx,cjs,mjs,ts,tsx,vue}',
|
|
10
11
|
],
|
|
11
12
|
plugins: {
|
|
13
|
+
'@stylistic': require('@stylistic/eslint-plugin'),
|
|
12
14
|
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
|
|
13
15
|
},
|
|
14
16
|
rules: {
|
|
15
|
-
'@
|
|
16
|
-
|
|
17
|
-
'@typescript-eslint/indent': 'off',
|
|
18
|
-
'@typescript-eslint/object-curly-spacing': 'off',
|
|
19
|
-
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
20
|
-
'@typescript-eslint/no-extraneous-class': [
|
|
21
|
-
'error',
|
|
17
|
+
'@stylistic/member-delimiter-style': [
|
|
18
|
+
2,
|
|
22
19
|
{
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
multiline: {
|
|
21
|
+
delimiter: 'none',
|
|
22
|
+
requireLast: true,
|
|
23
|
+
},
|
|
24
|
+
singleline: {
|
|
25
|
+
delimiter: 'semi',
|
|
26
|
+
requireLast: false,
|
|
27
|
+
},
|
|
25
28
|
},
|
|
26
29
|
],
|
|
27
30
|
'@typescript-eslint/consistent-type-definitions': [
|
|
28
31
|
'error',
|
|
29
32
|
'interface',
|
|
30
33
|
],
|
|
34
|
+
'@typescript-eslint/func-call-spacing': 'off',
|
|
35
|
+
'@typescript-eslint/indent': 'off',
|
|
31
36
|
'@typescript-eslint/naming-convention': [
|
|
32
37
|
'error',
|
|
33
38
|
{
|
|
@@ -77,10 +82,20 @@ module.exports = [
|
|
|
77
82
|
format: ['camelCase', 'PascalCase'],
|
|
78
83
|
},
|
|
79
84
|
],
|
|
85
|
+
'@typescript-eslint/no-extraneous-class': [
|
|
86
|
+
'error',
|
|
87
|
+
{
|
|
88
|
+
allowWithDecorator: true,
|
|
89
|
+
allowConstructorOnly: true,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
93
|
+
'@typescript-eslint/object-curly-spacing': 'off',
|
|
80
94
|
'@typescript-eslint/return-await': [
|
|
81
95
|
'error',
|
|
82
96
|
'in-try-catch',
|
|
83
97
|
],
|
|
98
|
+
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
84
99
|
},
|
|
85
100
|
},
|
|
86
101
|
];
|