-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
67 lines (63 loc) · 1.95 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
module.exports = {
extends: [
"next",
"airbnb",
"plugin:@next/next/recommended",
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
"prettier",
"prettier/@typescript-eslint",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
plugins: ["@typescript-eslint", "react", "react-hooks", "prettier"],
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 6, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
ecmaFeatures: {
jsx: true // Allows for the parsing of JSX
},
project: "tsconfig.json",
tsconfigRootDir: __dirname
},
settings: {
react: {
version: "detect" // Tells eslint-plugin-react to automatically detect the version of React to use
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"]
}
}
},
rules: {
"linebreak-style": [
"error",
process.platform === "win32" ? "windows" : "unix"
],
"no-use-before-define": "off",
"max-len": "warn",
camelcase: "off",
"no-console": "off",
"import/extensions": "off",
"prettier/prettier": "error",
// REACT
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": "off",
"react/require-default-props": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-wrap-multilines": "off",
"react/react-in-jsx-scope": "off",
// NEXT
"@next/next/link-passhref": "off",
// TYPESCRIPT
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
// '@typescript-eslint/no-empty-interface': 'off',
},
env: { jest: true, browser: true, node: true }
};