Skip to content

Commit da45755

Browse files
committed
fix: add unicorn/import-style rule to ESLint configuration
- Introduced a new rule to enforce import styles for specific modules, ensuring named imports for 'node:path', 'node:util', 'path', and 'util' are used consistently.
1 parent 304d0eb commit da45755

File tree

1 file changed

+20
-0
lines changed
  • packages/eslint-config/src/config/plugins

1 file changed

+20
-0
lines changed

packages/eslint-config/src/config/plugins/unicorn.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,26 @@ export default createConfig<
6262
},
6363
],
6464

65+
"unicorn/import-style": [
66+
"error",
67+
{
68+
styles: {
69+
"node:path": {
70+
named: true,
71+
},
72+
"node:util": {
73+
named: true,
74+
},
75+
path: {
76+
named: true,
77+
},
78+
util: {
79+
named: true,
80+
},
81+
},
82+
},
83+
],
84+
6585
"unicorn/no-abusive-eslint-disable": "error",
6686

6787
"unicorn/no-array-for-each": "off",

0 commit comments

Comments
 (0)