Skip to content

Commit

Permalink
eslint migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bgv2 committed Oct 1, 2024
1 parent fd55cef commit f7e7838
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 6 deletions.
29 changes: 29 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.node,
...globals.commonjs,
},

ecmaVersion: 11,
sourceType: "commonjs",
},

rules: {
"no-unused-vars": "warn",
},
}];
39 changes: 33 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
},
"homepage": "https://quotobot.js.org",
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.11.1",
"eslint": "^9.11.1",
"globals": "^15.9.0",
"nodemon": "^3.1.7"
},
"dependencies": {
Expand Down

0 comments on commit f7e7838

Please sign in to comment.