-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
37 lines (36 loc) · 1 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
files: ["**/*.{js,mjs,cjs,ts}"],
ignores: [
"node_modules/",
"src/test/data/",
"src/helperFunctions/syncWithBackend.ts",
"src/fileUtils/dart/**",
],
languageOptions: {
globals: globals.browser,
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json", // Required for rules that need type information
},
},
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
"no-unused-vars": ["error", {
"args": "none",
"varsIgnorePattern": "^[A-Z][a-zA-Z]*$" // Ignores PascalCase names (typical for enums)
}],
"@typescript-eslint/no-floating-promises": "error",
},
extends: [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
tseslint.configs.strictPromises, // Adds promise-specific rules
],
}
);