-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
30 lines (30 loc) · 1.02 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
module.exports = {
root: true,
extends: ['@react-native-community', 'eslint:recommended', 'plugin:react/recommended', 'prettier'],
rules: {
// 自定义规则
// indent: ['error', 2],
// 'no-console': 'error',
// 'no-undef': 'off', // TypeScript 会做这方面的校验
// 'no-unneeded-ternary': 'error',
// 'no-useless-escape': 'error',
// 'no-useless-return': 'error',
// 'max-params': 'off',
// 'prefer-const': 'error',
// 'prefer-template': 'error',
// quotes: ['error', 'single'],
// 'sort-imports': [
// 'error',
// {
// ignoreCase: false,
// ignoreDeclarationSort: true,
// ignoreMemberSort: false,
// memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
// },
// ],
// 'react/iframe-missing-sandbox': 'off',
// '@typescript-eslint/no-duplicate-imports': 'error',
// '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
// '@typescript-eslint/triple-slash-reference': 'off',
},
};