-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreact-native.js
40 lines (36 loc) · 1.2 KB
/
react-native.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
import { FlatCompat } from "@eslint/eslintrc"
import reactConfig from "eslint-plugin-react"
import reactNative from "eslint-plugin-react-native"
import globals from "globals"
import tsEslint from "typescript-eslint"
const compat = new FlatCompat()
/** Untested */
export default tsEslint.config(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
reactConfig.configs.flat.recommended,
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
reactConfig.configs.flat["jsx-runtime"],
...compat.config({
extends: ["plugin:react-hooks/recommended", "plugin:react-native/all"],
}),
{
languageOptions: {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
globals: {
...globals.browser,
...globals.node,
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
...reactNative.environments["react-native"].globals,
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
"react/no-unescaped-entities": "off",
"react-native/no-inline-styles": "off",
},
}
)