Skip to content

Commit 4b21475

Browse files
committed
try to update to v3
1 parent ce63141 commit 4b21475

File tree

3 files changed

+38
-16
lines changed

3 files changed

+38
-16
lines changed

.eslintrc.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/eslint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
env:
4040
SARIF_ESLINT_IGNORE_SUPPRESSED: "true"
4141
run: npx eslint .
42-
--config .eslintrc.json
4342
--format @microsoft/eslint-formatter-sarif
4443
--output-file eslint-results.sarif
4544
continue-on-error: true

eslint.config.mjs

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

0 commit comments

Comments
 (0)