Skip to content
Snippets Groups Projects
Commit f7879dd9 authored by Subliminal Guy's avatar Subliminal Guy
Browse files

New Linting Rules

parent 1d11cdbe
No related branches found
No related tags found
No related merge requests found
import globals from "globals";
import pluginJs from "@eslint/js";
import js from "@eslint/js";
import airbnbBase from "eslint-config-airbnb-base";
import importPlugin from "eslint-plugin-import";
const airbnbRules = airbnbBase.rules;
/** @type {import('eslint').Linter.Config[]} */
/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
{
languageOptions: { globals: globals.browser },
"rules": {
languageOptions: {
globals: {
...globals.browser
},
parserOptions: {
ecmaVersion: 2022,
sourceType: "module"
}
},
plugins: {
import: importPlugin
},
rules: {
...airbnbRules,
// Your custom rules (these will override Airbnb rules)
"max-len": ["error", { "code": 80 }],
"indent": ["error", 2]
}
},
pluginJs.configs.recommended,
js.configs.recommended,
{
rules: {
"max-len": ["error", { "code": 80 }],
"indent": ["error", 2] // Any additional rules or overrides
}
}
];
\ No newline at end of file
......@@ -10,7 +10,7 @@
</head>
<body>
<button class="main-button" type="button">Click</button>
<button class="main-button" type="button">Click</button>
<script type="module" src="index.js"></script>
</body>
......
......@@ -5,7 +5,7 @@
"main": "index.html",
"scripts": {
"test": "npm run dev",
"lint": "eslint",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix"
},
"author": "subliminalguy",
......@@ -14,6 +14,8 @@
"@eslint/js": "^9.19.0",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.31.0",
"globals": "^15.14.0"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment