-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslint-rules.js
62 lines (61 loc) · 1.6 KB
/
.eslint-rules.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
const path = require('path');
module.exports = {
curly: 'off',
'no-spaced-func': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'simple-import-sort/imports': [
'warn',
{
groups: [
// Side effect imports.
['^\\u0000'],
// `react` related packages.
[
'^react$',
'^react-native$',
'^@expo.*',
'^redux$',
'^@reduxjs.*',
'^react-redux$',
'^redux-persist.*',
'@react-navigation.*',
'^react-native.*',
'^react.*',
],
// Installed packages.
require(path.join(__dirname, '.all-dependencies')).map(d => `^${d}`),
// Internal packages.
['^@deps/.*'],
['^@[^a][^p][^p]\\w'],
// @app
['^@app/logger.*'],
['^@app/consts.*'],
['^@app/lib.*'],
['^@app/redux.*', '^@app/features.*'],
['^@app/data.*'],
['^@app/db.*'],
['^@app/utils.*'],
['^@app/modules.*'],
['^@app/navigation.*'],
['^@app/screens.*'],
['^@app/hooks.*'],
['^@app/components.*'],
['^@app/theme.*', '^@app/images.*'],
// Other packages.
['^@?\\w'],
// Parent imports. Put `..` last.
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
// Other relative imports. Put same-folder imports and `.` last.
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
],
},
],
'simple-import-sort/exports': 'warn',
};