Skip to content

Commit bac38c3

Browse files
Update dependency eslint to v9 (#53)
* Update dependency eslint to v9 * Migrate eslint.config * npm audit * remove google rules --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kevin Chiu <[email protected]>
1 parent 52b4df3 commit bac38c3

File tree

4 files changed

+391
-351
lines changed

4 files changed

+391
-351
lines changed

functions/.eslintrc.js

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

functions/eslint.config.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
const {
2+
defineConfig,
3+
globalIgnores,
4+
} = require("eslint/config");
5+
6+
const globals = require("globals");
7+
8+
const {
9+
fixupConfigRules,
10+
fixupPluginRules,
11+
} = require("@eslint/compat");
12+
13+
const tsParser = require("@typescript-eslint/parser");
14+
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
15+
const _import = require("eslint-plugin-import");
16+
const js = require("@eslint/js");
17+
18+
const {
19+
FlatCompat,
20+
} = require("@eslint/eslintrc");
21+
22+
const compat = new FlatCompat({
23+
baseDirectory: __dirname,
24+
recommendedConfig: js.configs.recommended,
25+
allConfig: js.configs.all
26+
});
27+
28+
module.exports = defineConfig([{
29+
languageOptions: {
30+
globals: {
31+
...globals.node,
32+
},
33+
34+
parser: tsParser,
35+
sourceType: "module",
36+
37+
parserOptions: {
38+
project: ["tsconfig.json"],
39+
},
40+
},
41+
42+
extends: fixupConfigRules(compat.extends(
43+
"eslint:recommended",
44+
"plugin:import/errors",
45+
"plugin:import/warnings",
46+
"plugin:import/typescript",
47+
"plugin:@typescript-eslint/recommended",
48+
)),
49+
50+
plugins: {
51+
"@typescript-eslint": fixupPluginRules(typescriptEslint),
52+
import: fixupPluginRules(_import),
53+
},
54+
55+
rules: {
56+
"quotes": ["error", "double"],
57+
"import/no-unresolved": 0,
58+
"max-len": 0,
59+
},
60+
}, globalIgnores(["lib/**/*"])]);

0 commit comments

Comments
 (0)