Skip to content

Commit ba6fe66

Browse files
committed
finish eslitn mgiration
1 parent 7612117 commit ba6fe66

File tree

3 files changed

+68
-6
lines changed

3 files changed

+68
-6
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import prettier from "eslint-plugin-prettier";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default [...compat.extends("eslint:recommended"), {
17+
plugins: {
18+
prettier,
19+
},
20+
21+
languageOptions: {
22+
globals: {
23+
...globals.node,
24+
...globals.commonjs,
25+
...globals.jest,
26+
},
27+
28+
ecmaVersion: 2020,
29+
sourceType: "commonjs",
30+
},
31+
32+
rules: {
33+
"prettier/prettier": "error",
34+
"linebreak-style": ["error", "unix"],
35+
semi: ["error", "always"],
36+
"no-console": "off",
37+
},
38+
}];

wrongsecrets-balancer/package-lock.json

Lines changed: 27 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wrongsecrets-balancer/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@
3434
"winston": "^3.14.2"
3535
},
3636
"devDependencies": {
37+
"@eslint/eslintrc": "^3.1.0",
38+
"@eslint/js": "^9.12.0",
3739
"cookie-signature": "^1.2.1",
3840
"eslint": "^9.12.0",
3941
"eslint-plugin-prettier": "^5.2.1",
42+
"globals": "^15.11.0",
4043
"jest": "^29.7.0",
4144
"jest-date-mock": "^1.0.10",
4245
"minimatch": "^10.0.1",

0 commit comments

Comments
 (0)