|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + es6: true, |
| 4 | + node: true, |
| 5 | + jest: true, |
| 6 | + }, |
| 7 | + extends: [ |
| 8 | + 'plugin:@typescript-eslint/recommended', |
| 9 | + 'prettier', |
| 10 | + 'plugin:prettier/recommended', |
| 11 | + 'prettier/react', |
| 12 | + 'prettier/@typescript-eslint', |
| 13 | + ], |
| 14 | + |
| 15 | + parser: '@typescript-eslint/parser', |
| 16 | + parserOptions: { |
| 17 | + createDefaultProgram: true, |
| 18 | + ecmaFeatures: { |
| 19 | + jsx: true, |
| 20 | + impliedStrict: true, |
| 21 | + }, |
| 22 | + ecmaVersion: 2018, |
| 23 | + sourceType: 'module', |
| 24 | + project: './tsconfig.json', |
| 25 | + }, |
| 26 | + // plugins: ['react', 'react-native'], |
| 27 | + |
| 28 | + plugins: ['react', 'react-hooks', 'react-native', 'prettier'], |
| 29 | + |
| 30 | + rules: { |
| 31 | + indent: ['error', 2, { SwitchCase: 1 }], |
| 32 | + quotes: ['error', 'single', { avoidEscape: true }], |
| 33 | + '@typescript-eslint/no-var-requires': 0, |
| 34 | + 'react-native/no-unused-styles': 2, |
| 35 | + 'react-native/split-platform-components': 2, |
| 36 | + 'react-native/no-inline-styles': 2, |
| 37 | + 'react-native/no-color-literals': 2, |
| 38 | + 'react-native/no-single-element-style-arrays': 2, |
| 39 | + 'global-require': 0, |
| 40 | + 'linebreak-style': [2, 'unix'], |
| 41 | + 'prefer-const': 0, |
| 42 | + 'no-console': [ |
| 43 | + 'warn', |
| 44 | + { |
| 45 | + allow: ['warn', 'error', 'log', 'info', 'disableYellowBox'], |
| 46 | + }, |
| 47 | + ], |
| 48 | + 'no-param-reassign': 0, |
| 49 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 50 | + 'no-restricted-globals': 0, |
| 51 | + 'no-unused-vars': 0, |
| 52 | + 'no-use-before-define': 0, |
| 53 | + 'no-underscore-dangle': 0, |
| 54 | + 'no-useless-constructor': 0, |
| 55 | + 'no-unused-expressions': 0, |
| 56 | + 'no-plusplus': 0, |
| 57 | + 'no-nested-ternary': 0, |
| 58 | + 'lines-between-class-members': [ |
| 59 | + 1, |
| 60 | + 'always', |
| 61 | + { |
| 62 | + exceptAfterSingleLine: true, |
| 63 | + }, |
| 64 | + ], |
| 65 | + 'prefer-destructuring': [ |
| 66 | + 2, |
| 67 | + { |
| 68 | + array: false, |
| 69 | + object: true, |
| 70 | + }, |
| 71 | + ], |
| 72 | + 'max-classes-per-file': 0, |
| 73 | + 'import/prefer-default-export': 0, |
| 74 | + 'react/prefer-stateless-function': 0, |
| 75 | + 'react/destructuring-assignment': 0, |
| 76 | + 'react/prop-types': 0, |
| 77 | + 'react/react-in-jsx-scope': 0, |
| 78 | + 'react/jsx-props-no-spreading': 0, |
| 79 | + 'react/jsx-filename-extension': [ |
| 80 | + 2, |
| 81 | + { |
| 82 | + extensions: ['.jsx', '.tsx'], |
| 83 | + }, |
| 84 | + ], |
| 85 | + 'jsx-a11y/accessible-emoji': 0, |
| 86 | + 'react/static-property-placement': 0, |
| 87 | + '@typescript-eslint/explicit-member-accessibility': [2, { accessibility: 'no-public' }], |
| 88 | + '@typescript-eslint/no-empty-interface': 1, |
| 89 | + '@typescript-eslint/explicit-function-return-type': [ |
| 90 | + 0, |
| 91 | + { |
| 92 | + allowExpressions: true, |
| 93 | + allowTypedFunctionExpressions: true, |
| 94 | + }, |
| 95 | + ], |
| 96 | + '@typescript-eslint/no-explicit-any': 0, |
| 97 | + '@typescript-eslint/no-use-before-define': [ |
| 98 | + 2, |
| 99 | + { |
| 100 | + functions: true, |
| 101 | + classes: true, |
| 102 | + variables: false, |
| 103 | + }, |
| 104 | + ], |
| 105 | + '@typescript-eslint/no-unused-vars': [1, { args: 'none' }], |
| 106 | + '@typescript-eslint/no-non-null-assertion': 0, |
| 107 | + '@typescript-eslint/camelcase': 0, |
| 108 | + '@typescript-eslint/ban-ts-ignore': 0, |
| 109 | + '@typescript-eslint/no-empty-function': 'off', |
| 110 | + }, |
| 111 | + settings: { |
| 112 | + react: { |
| 113 | + version: 'detect', |
| 114 | + }, |
| 115 | + }, |
| 116 | +}; |
0 commit comments