Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 378fad3

Browse files
committed
fix: more touches to aliases and importing
1 parent 28c11ff commit 378fad3

File tree

2 files changed

+42
-18
lines changed

2 files changed

+42
-18
lines changed

base.cjs

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,30 @@ module.exports = {
3737
props: {
3838
properties: false,
3939
},
40+
params: {
41+
parameters: false,
42+
},
43+
el: {
44+
elt: true,
45+
element: true,
46+
},
47+
elt: {
48+
element: false,
49+
},
50+
req: {
51+
request: false,
52+
},
53+
res: {
54+
resp: true,
55+
response: true,
56+
result: true,
57+
},
58+
resp: {
59+
response: false,
60+
},
61+
str: {
62+
string: false,
63+
},
4064

4165
// Not part of `eslint-plugin-unicorn`
4266
application: {
@@ -54,9 +78,6 @@ module.exports = {
5478
error: true,
5579
event: true,
5680
},
57-
el: {
58-
element: true,
59-
},
6081
elem: {
6182
element: true,
6283
},
@@ -78,25 +99,13 @@ module.exports = {
7899
param: {
79100
parameter: true,
80101
},
81-
params: {
82-
parameters: true,
83-
},
84102
prev: {
85103
previous: true,
86104
},
87-
req: {
88-
request: true,
89-
},
90-
res: {
91-
response: true,
92-
result: true,
93-
},
105+
94106
ret: {
95107
returnValue: true,
96108
},
97-
str: {
98-
string: true,
99-
},
100109
temp: {
101110
temporary: true,
102111
},
@@ -107,12 +116,14 @@ module.exports = {
107116
value: true,
108117
},
109118
err: {
110-
error: true,
119+
error: false,
111120
},
112121
},
113122
},
114123
],
115124

125+
'unicorn/no-useless-undefined': 'off',
126+
116127
'unicorn/better-regex': [
117128
'error',
118129
{
@@ -172,9 +183,13 @@ module.exports = {
172183
'import/order': [
173184
'error',
174185
{
175-
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
186+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
176187
'newlines-between': 'never',
177188
warnOnUnassignedImports: true,
189+
alphabetize: {
190+
order: 'asc',
191+
orderImportKind: 'asc',
192+
},
178193
},
179194
],
180195
'import/no-unassigned-import': [

typescript.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ module.exports = {
4040
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
4141
},
4242
],
43+
'@typescript-eslint/consistent-type-imports': [
44+
'error',
45+
{
46+
disallowTypeAnnotations: true,
47+
fixStyle: 'inline-type-imports',
48+
prefer: 'type-imports',
49+
},
50+
],
51+
'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
4352
'import/extensions': [
4453
'error',
4554
'ignorePackages',

0 commit comments

Comments
 (0)