forked from ihmpavel/expo-video-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
63 lines (63 loc) · 2.09 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
// https://robertcooper.me/post/using-eslint-and-prettier-in-a-typescript-project
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, classes: false, variables: false, typedefs: true },
],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/prefer-interface': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
semi: 'off',
eqeqeq: 'error',
'arrow-parens': ['error', 'as-needed'],
'no-use-before-define': ['error', { functions: false, classes: false, variables: false }],
'prefer-arrow-callback': 1,
'no-use-before-define': 0,
'max-len': ['warn', { code: 100, ignoreComments: true, ignorePattern: '^import .*' }],
'new-parens': 'error',
'no-bitwise': 'error',
'no-console': ['warn', { allow: ['warn', 'info', 'error'] }],
'no-caller': 'error',
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
'quote-props': ['error', 'as-needed'],
'sort-imports-es6-autofix/sort-imports-es6': [
2,
{
ignoreCase: false,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'no-irregular-whitespace': 'warn',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
},
plugins: ['sort-imports-es6-autofix', 'react-hooks'],
settings: {
react: {
version: 'detect',
},
},
}