|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + extends: [ |
| 4 | + "eslint:recommended", |
| 5 | + "plugin:react/recommended", |
| 6 | + "plugin:@typescript-eslint/recommended", |
| 7 | + "@react-native-community", |
| 8 | + "prettier", |
| 9 | + ], |
| 10 | + ignorePatterns: [ |
| 11 | + "**/*/*.js", |
| 12 | + "*.js", |
| 13 | + "*.svg", |
| 14 | + "*.json", |
| 15 | + "*.png", |
| 16 | + "package.json", |
| 17 | + "package-lock.json", |
| 18 | + ], |
| 19 | + parser: "@typescript-eslint/parser", |
| 20 | + plugins: [ |
| 21 | + "import", |
| 22 | + "react", |
| 23 | + "react-native", |
| 24 | + "prettier", |
| 25 | + "react-hooks", |
| 26 | + "@typescript-eslint", |
| 27 | + "promise", |
| 28 | + "unused-imports", |
| 29 | + ], |
| 30 | + env: { |
| 31 | + browser: true, |
| 32 | + es2021: true, |
| 33 | + "react-native/react-native": true, |
| 34 | + }, |
| 35 | + settings: { |
| 36 | + "import/resolver": { |
| 37 | + node: { |
| 38 | + extensions: [ |
| 39 | + ".js", |
| 40 | + ".jsx", |
| 41 | + ".ts", |
| 42 | + ".tsx", |
| 43 | + ".d.ts", |
| 44 | + ".android.js", |
| 45 | + ".android.jsx", |
| 46 | + ".android.ts", |
| 47 | + ".android.tsx", |
| 48 | + ".ios.js", |
| 49 | + ".ios.jsx", |
| 50 | + ".ios.ts", |
| 51 | + ".ios.tsx", |
| 52 | + ".web.js", |
| 53 | + ".web.jsx", |
| 54 | + ".web.ts", |
| 55 | + ".web.tsx", |
| 56 | + ], |
| 57 | + }, |
| 58 | + }, |
| 59 | + }, |
| 60 | + rules: { |
| 61 | + quotes: [ |
| 62 | + "error", |
| 63 | + "double", |
| 64 | + { |
| 65 | + avoidEscape: true, |
| 66 | + }, |
| 67 | + ], |
| 68 | + "import/extensions": [ |
| 69 | + "error", |
| 70 | + "never", |
| 71 | + { |
| 72 | + svg: "always", |
| 73 | + model: "always", |
| 74 | + style: "always", |
| 75 | + png: "always", |
| 76 | + jpg: "always", |
| 77 | + json: "always", |
| 78 | + constant: "always", |
| 79 | + }, |
| 80 | + ], |
| 81 | + "react-hooks/exhaustive-deps": [ |
| 82 | + "error", |
| 83 | + { additionalHooks: "(useMemoOne)" }, |
| 84 | + ], |
| 85 | + "max-len": ["error", 120], |
| 86 | + "@typescript-eslint/ban-ts-comment": 2, |
| 87 | + "@typescript-eslint/no-empty-function": 0, |
| 88 | + "@typescript-eslint/no-explicit-any": 1, |
| 89 | + "@typescript-eslint/explicit-module-boundary-types": 0, |
| 90 | + "react/jsx-filename-extension": ["error", { extensions: [".tsx"] }], |
| 91 | + "react-native/no-unused-styles": 2, |
| 92 | + "react-native/split-platform-components": 2, |
| 93 | + "react-native/no-inline-styles": 0, |
| 94 | + "react-native/no-color-literals": 0, |
| 95 | + "react-native/no-raw-text": 0, |
| 96 | + "import/no-extraneous-dependencies": 2, |
| 97 | + "import/no-named-as-default-member": 2, |
| 98 | + "import/order": 0, |
| 99 | + "import/no-duplicates": 2, |
| 100 | + "import/no-useless-path-segments": 2, |
| 101 | + "import/no-cycle": 2, |
| 102 | + "import/prefer-default-export": 0, |
| 103 | + "import/no-anonymous-default-export": 0, |
| 104 | + "import/named": 0, |
| 105 | + "@typescript-eslint/no-empty-interface": 0, |
| 106 | + "import/namespace": 0, |
| 107 | + "import/default": 0, |
| 108 | + "import/no-named-as-default": 0, |
| 109 | + "import/no-unused-modules": 0, |
| 110 | + "import/no-deprecated": 0, |
| 111 | + "@typescript-eslint/indent": 0, |
| 112 | + "react-hooks/rules-of-hooks": 2, |
| 113 | + |
| 114 | + "jest/no-identical-title": 2, |
| 115 | + "jest/valid-expect": 2, |
| 116 | + camelcase: 2, |
| 117 | + "prefer-destructuring": 2, |
| 118 | + "no-nested-ternary": 2, |
| 119 | + "prettier/prettier": [ |
| 120 | + "error", |
| 121 | + { |
| 122 | + endOfLine: "auto", |
| 123 | + }, |
| 124 | + ], |
| 125 | + }, |
| 126 | +}; |
0 commit comments