-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
32 lines (32 loc) · 1.11 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: { browser: true, node: true, es2022: true },
extends: [
"airbnb-base",
"airbnb-typescript/base",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:json/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs", "public"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json", "./tsconfig.node.json"],
tsconfigRootDir: "./",
sourceType: "module",
extraFileExtensions: [".json"],
ecmaVersion: "latest",
},
plugins: ["react-refresh", "prettier"],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"no-new": "off",
"no-console": "off",
"import/extensions": ["error", "ignorePackages", { "": "never", ts: "never", tsx: "never" }], // Allow imports without extensions
"no-return-await": "off",
"@typescript-eslint/return-await": "always",
},
};