-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
21 lines (20 loc) · 899 Bytes
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import globals from "globals";
import pluginJs from "@eslint/js";
/** @type {import('eslint').Linter.Config} */
export default {
files: ["**/*.js"], // Target JavaScript files
languageOptions: {
sourceType: "script", // Treat the source as script (can switch to 'module' for ES6+ modules)
globals: globals.browser, // Define global variables (e.g., for browser)
},
plugins: "prettier", // Use Prettier plugin for ESLint
extends: [
"eslint:recommended", // Use ESLint's recommended rules
"plugin:prettier/recommended" // Integrate Prettier's recommended settings
],
rules: {
"prettier/prettier": "error", // Treat Prettier formatting issues as errors
"max-len": ["error", { "code": 1000 }] // Allow lines up to 1000 characters (adjust if needed)
},
...pluginJs.configs.recommended, // Use the recommended ESLint config for JavaScript
};