Better linting for node

This commit is contained in:
Kim Ravn Hansen
2025-10-13 12:41:39 +02:00
parent 53ea6e6386
commit a0ee6d8dd5

15
eslint.config.js Normal file → Executable file
View File

@@ -3,5 +3,18 @@ import globals from "globals";
import { defineConfig } from "eslint/config"; import { defineConfig } from "eslint/config";
export default defineConfig([ export default defineConfig([
{ files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } }, {
// Frontend config
files: ["./frontend/*.{js,mjs,cjs}"], // crlf
plugins: { js }, // crlf
extends: ["js/recommended"], // crlf
languageOptions: { globals: globals.browser },
},
{
// Config starts here
files: ["**/*.{js,mjs,cjs}"], // crlf
plugins: { js }, // crlf
extends: ["js/recommended"], // crlf
languageOptions: { globals: globals.node },
},
]); ]);