@wolf-tp/react-native-boilerplate
Version:
React Native Template
109 lines (108 loc) • 2.54 kB
JavaScript
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['import', 'react', 'react-hooks'],
parserOptions: {
sourceType: 'module',
},
settings: {
'import/resolver': {
node: {
extensions: [
'.js',
'.jsx',
'.ts',
'.tsx',
'.d.ts',
'.android.js',
'.android.jsx',
'.android.ts',
'.android.tsx',
'.ios.js',
'.ios.jsx',
'.ios.ts',
'.ios.tsx',
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
],
},
},
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
quotes: [
'error',
'single',
{
avoidEscape: true,
},
],
'no-empty-pattern': 1,
'@typescript-eslint/no-explicit-any': 1,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-unused-vars': 2,
'react-native/no-raw-text': 0,
'import/no-extraneous-dependencies': 2,
'import/extensions': ['error', 'never', { svg: 'always' }],
'no-shadow': 0,
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
},
],
'import/order': [
'error',
{
groups: [
'internal',
'external',
'builtin',
'index',
'sibling',
'parent',
],
pathGroups: [
{
pattern: 'react+(|-native)',
group: 'external',
position: 'before',
},
{
pattern: 'react+(|-*)',
group: 'external',
position: 'before',
},
],
pathGroupsExcludedImportTypes: [],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/no-duplicates': 2,
'import/no-useless-path-segments': 2,
'import/prefer-default-export': 0,
'import/named': 0,
'import/namespace': 0,
'import/default': 0,
'import/no-named-as-default-member': 0,
'import/no-named-as-default': 0,
'import/no-unused-modules': 0,
'import/no-deprecated': 0,
'@typescript-eslint/indent': 0,
'import/no-anonymous-default-export': 2,
'react-hooks/exhaustive-deps': 2,
'prefer-destructuring': 2,
'no-nested-ternary': 2,
'comma-dangle': 0,
},
env: {
node: true,
es2020: true,
},
};