-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
44 lines (44 loc) · 1.1 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true, // if using React with browser environment
es2021: true,
mocha: true,
node: true,
// jest: true,
},
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "import"],
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
ecmaFeatures: {
jsx: true, // Enable this if you're using React
},
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
// "plugin:jest/recommended",
],
rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"comma-dangle": ["error", "always-multiline"],
"semi": ["error", "always"],
// "quotes": ["error", "double"],
"space-before-function-paren": [
"error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always",
},
],
},
ignorePatterns: ["lib/*", "src/react-app-env.d.ts"],
settings: {
react: {
version: "detect", // Helps linting with correct React version
},
},
};