-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.mjs
44 lines (37 loc) · 1.08 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
38
39
40
41
42
43
44
import globals from "globals";
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from "eslint-config-prettier";
const config = tseslint.config(
// Files to be scanned by the linter.
{files: ["**/*.{js,ts,jsx,tsx}"]},
// Ignore built files.
{ignores: [
"**/node_modules/",
"**/out/",
"**/.next/"
]},
// Supported browsers.
{languageOptions: { globals: globals.browser }},
// Typescript support.
tseslint.configs.recommended,
// Prettier rules to be applied (defined in the .prettierrc file).
eslintConfigPrettier,
// Changes to the default rules:
{
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-object-type": "off",
"no-console": ["error", { allow: ["warn", "error"] }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_[^_].*$|^_$",
"varsIgnorePattern": "^_[^_].*$|^_$",
"caughtErrorsIgnorePattern": "^_[^_].*$|^_$"
}
]
}
}
);
export default config;