Skip to content

Commit bfc2308

Browse files
author
joshua-burbidge
committed
add eslint config for mjs
1 parent 89557bb commit bfc2308

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

eslint.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,21 @@ export default [
161161
},
162162
},
163163

164+
// Configuration for .mjs files (ES modules in Node.js environment)
165+
{
166+
files: ["**/*.mjs"],
167+
languageOptions: {
168+
ecmaVersion: "latest",
169+
sourceType: "module",
170+
globals: {
171+
...nodeGlobals,
172+
},
173+
},
174+
rules: {
175+
"no-undef": "error",
176+
},
177+
},
178+
164179
// Specific overrides for ALL test files (JS and TS)
165180
{
166181
files: ["**/*.test.js", "**/*.test.jsx", "**/*.test.ts", "**/*.test.tsx"],

0 commit comments

Comments
 (0)