-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
38 lines (38 loc) · 1.18 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
module.exports = {
env: {
es2021: true,
node: true,
"react-native/react-native": true,
},
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react-native/all",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.eslint.json"],
react: {
version: "detect",
},
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "react-native", "@typescript-eslint"],
rules: {
"react/jsx-filename-extension": [1, { extensions: [".tsx", ".jsx"] }],
"import/extensions": ["error", "never"],
"react/jsx-uses-react": "off", // Importing React in components are not required since React 17
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off", // defaultProps are being phased out of React
},
};