-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.eslintrc.js
More file actions
65 lines (64 loc) · 1.6 KB
/
Copy path.eslintrc.js
File metadata and controls
65 lines (64 loc) · 1.6 KB
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
64
65
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'plugin:react/recommended',
'@react-native-community',
'airbnb-base',
'prettier',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'prettier', 'import'],
rules: {
'prettier/prettier': 2, // Means error
'import/extensions': [0, 'never'],
'import/no-unresolved': [0, 'never'],
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 0,
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@react-native-async-storage/async-storage',
message: "Please use 'useStorage' instead!",
},
{
name: 'react-native-encrypted-storage',
message: "Please use 'useSecureStorage' instead!",
},
{
name: 'react',
importNames: ['useContext'],
message: 'Please do not import contexts directly. Use corresponding hook instead!',
},
],
patterns: [
{
group: ['@moneyboy/contexts/*'],
message: 'Please do not import contexts directly. Use corresponding hook instead!',
},
],
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};