You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eslint.config.mjs
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,14 @@ export default defineConfig([
86
86
{
87
87
name: 'lodash',
88
88
message:
89
-
"Named import from lodash should be avoided for performance reasons. Use a default import instead. E.g. `import merge from 'lodash/merge.js';` instead of `import { merge } from 'lodash';`.",
89
+
"Named import from lodash should be avoided for performance reasons. Use a default import instead. E.g. `import merge from 'lodash/merge.js';` (note the file extension) instead of `import { merge } from 'lodash';`.",
90
+
},
91
+
],
92
+
patterns: [
93
+
{
94
+
regex: 'lodash/(?![a-zA-Z]*\\.js$)',
95
+
message:
96
+
'Always specify the file extension when importing from lodash or it will cause runtime issues for ESM environments.',
0 commit comments