-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
45 lines (45 loc) · 1.19 KB
/
eslint.config.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
import reactPlugin from 'eslint-plugin-react';
import reactNativePlugin from 'eslint-plugin-react-native';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import prettierPlugin from 'eslint-plugin-prettier';
export default [
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
module: 'readonly',
},
parser: typescriptParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
react: reactPlugin,
'react-native': reactNativePlugin,
'@typescript-eslint': typescriptPlugin,
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': ['error'],
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
'react-native/no-inline-styles': 'off',
'react-native/no-raw-text': 'off',
},
settings: {
react: {
version: 'detect',
},
},
},
];