Skip to content

Commit

Permalink
Replace eslintrc with new flat config file
Browse files Browse the repository at this point in the history
  • Loading branch information
dabico committed Apr 8, 2024
1 parent b2ec649 commit 7bd09b9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 41 deletions.
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

34 changes: 34 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import js from "@eslint/js";
import globals from "globals";

export default [
js.configs.recommended,
{
files: [
"**/*.js",
"**/*.ts",
"**/*.cjs",
"**/*.mjs",
],
languageOptions: {
sourceType: "module",
ecmaVersion: 2024,
globals: {
...globals.node,
...globals.es2021,
...globals.browser,
}
},
rules: {
"semi": ["error", "always"],
"indent": ["error", 4],
"quotes": ["error", "double"],
"linebreak-style": ["error", "unix"],
"no-unused-vars": ["error" , {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
}],
}
},
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"lint": "npm-run-all --parallel lint:*",
"lint:js": "eslint routes/* util/*",
"lint:js": "eslint .",
"lint:css": "stylelint stylelint public/css/*.css",
"lint:md": "markdownlint *.md",
"minify": "npm-run-all --parallel minify:*",
Expand Down

0 comments on commit 7bd09b9

Please sign in to comment.