-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy patheslint.config.js
40 lines (39 loc) · 979 Bytes
/
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
const prettier = require('eslint-plugin-prettier');
const reactHooks = require('eslint-plugin-react-hooks');
const reactNative = require('eslint-plugin-react-native');
module.exports = [
{
files: ['src/**/*.{js,jsx,ts,tsx}'],
ignores: [
'node_modules/',
'lib/',
'example/',
'demo/',
'*.config.js',
'tsconfig.json',
],
plugins: {
prettier,
'react-hooks': reactHooks,
'react-native': reactNative,
},
rules: {
'react/react-in-jsx-scope': 'off',
'prettier/prettier': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react-native/no-inline-styles': 'warn',
},
languageOptions: {
parser: require('@typescript-eslint/parser'),
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
},
},
},
];