Skip to content

Commit

Permalink
npx @eslint/migrate-config .eslintrc.json
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Dec 28, 2024
1 parent 7b1e96f commit e1e6563
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 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.commonjs,
...globals.node,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},

ecmaVersion: 2018,
sourceType: "commonjs",
},

rules: {},
}];
23 changes: 19 additions & 4 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 @@ -28,8 +28,11 @@
"qrcode": "^1.4.4"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@vercel/ncc": "^0.38.3",
"eslint": "^9.17.0",
"globals": "^15.14.0",
"jest": "^29.7.0"
}
}

0 comments on commit e1e6563

Please sign in to comment.