Skip to content

Commit 9539325

Browse files
authored
Merge pull request #121 from onmotion/4.x
4.x
2 parents 5d4d830 + 9577853 commit 9539325

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+16383
-11483
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
lib/

.eslintrc.js

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,69 @@
11
module.exports = {
22
root: true,
3-
extends: ['@react-native', 'plugin:prettier/recommended', 'prettier'],
4-
plugins: ['react', 'unused-imports', 'prettier'],
3+
extends: ['plugin:prettier/recommended', '@react-native'],
4+
parser: '@typescript-eslint/parser',
5+
plugins: ['react-native', 'prettier', '@typescript-eslint', 'unused-imports', 'simple-import-sort', 'import'],
6+
env: {
7+
'react-native/react-native': true,
8+
},
59
parserOptions: {
610
ecmaFeatures: {
7-
jsx: true
11+
jsx: true,
812
},
9-
requireConfigFile: false
13+
},
14+
settings: {
15+
'react-native/style-sheet-object-names': ['ScaledSheet'],
1016
},
1117
rules: {
18+
'react-native/no-unused-styles': 2,
1219
'@typescript-eslint/no-unused-vars': 'off', // or "no-unused-vars": "off",
1320
'unused-imports/no-unused-imports': 'error',
14-
'unused-imports/no-unused-vars': [
15-
'warn',
16-
{
17-
vars: 'all',
18-
varsIgnorePattern: '^_',
19-
args: 'after-used',
20-
argsIgnorePattern: '^_'
21-
}
22-
],
21+
'unused-imports/no-unused-vars': 0,
22+
semi: ['warn', 'never'],
2323
'prettier/prettier': [
2424
'error',
2525
{
26-
printWidth: 110,
26+
singleQuote: true,
27+
semi: false,
2728
arrowParens: 'avoid',
2829
bracketSameLine: true,
2930
bracketSpacing: true,
30-
singleQuote: true,
31-
trailingComma: 'none',
32-
tabWidth: 2,
33-
useTabs: false,
34-
semi: false
35-
}
31+
trailingComma: 'all',
32+
printWidth: 120,
33+
},
3634
],
37-
semi: 'off',
38-
'comma-dangle': ['warn', 'never'],
39-
'react-native/no-inline-styles': 'off',
40-
'react-hooks/exhaustive-deps': 'off'
41-
}
35+
'comma-dangle': 0,
36+
'simple-import-sort/imports': 'off',
37+
'simple-import-sort/exports': 'error',
38+
'import/order': [
39+
'error',
40+
{
41+
pathGroups: [
42+
{
43+
pattern: 'react',
44+
group: 'builtin',
45+
position: 'before',
46+
},
47+
],
48+
pathGroupsExcludedImportTypes: ['react'],
49+
},
50+
],
51+
'import/first': 'error',
52+
'import/newline-after-import': 'off',
53+
'import/no-duplicates': 'error',
54+
'react/display-name': 'off',
55+
'@typescript-eslint/consistent-type-imports': 'error',
56+
},
57+
overrides: [
58+
{
59+
files: ['*.ts', '*.tsx'],
60+
rules: {
61+
'@typescript-eslint/no-shadow': ['error'],
62+
'no-shadow': 'off',
63+
'no-undef': 'off',
64+
'react-hooks/exhaustive-deps': 'warn',
65+
'react-native/no-unused-styles': 'warn',
66+
},
67+
},
68+
],
4269
}

0 commit comments

Comments
 (0)