|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "parser": "@typescript-eslint/parser", |
| 4 | + "extends": [ |
| 5 | + "@react-native-community", |
| 6 | + "plugin:import/errors", |
| 7 | + "plugin:import/typescript", |
| 8 | + "prettier/@typescript-eslint", |
| 9 | + "plugin:prettier/recommended" |
| 10 | + ], |
| 11 | + "plugins": [ |
| 12 | + "unicorn" |
| 13 | + ], |
| 14 | + "settings": { |
| 15 | + "import/resolver": { |
| 16 | + "alias": { |
| 17 | + "map": [ |
| 18 | + ["~", "./lib"], |
| 19 | + ["#", "./test"] |
| 20 | + ], |
| 21 | + "extensions": [".ts", ".tsx", ".json"] |
| 22 | + } |
| 23 | + } |
| 24 | + }, |
| 25 | + "rules": { |
| 26 | + // Bug avoiding |
| 27 | + "import/no-cycle": "error", |
| 28 | + "eslint-comments/no-unused-disable": "error", |
| 29 | + "@typescript-eslint/explicit-function-return-type": "error", |
| 30 | + "no-template-curly-in-string": ["error"], |
| 31 | + "nonblock-statement-body-position": ["error"], |
| 32 | + |
| 33 | + // Code style |
| 34 | + "unicorn/filename-case": [ |
| 35 | + "error", |
| 36 | + { |
| 37 | + "case": "kebabCase" |
| 38 | + } |
| 39 | + ], |
| 40 | + "padding-line-between-statements": [ |
| 41 | + "error", |
| 42 | + { |
| 43 | + "blankLine": "always", |
| 44 | + "prev": "*", |
| 45 | + "next": "block-like" |
| 46 | + }, |
| 47 | + { |
| 48 | + "blankLine": "always", |
| 49 | + "prev": "block-like", |
| 50 | + "next": "*" |
| 51 | + } |
| 52 | + ], |
| 53 | + "no-else-return": ["error"], |
| 54 | + "no-var": ["error"], |
| 55 | + "no-multi-spaces": ["error"], |
| 56 | + "no-sequences": ["error"], |
| 57 | + "no-useless-call": ["error"], |
| 58 | + "no-useless-concat": ["error"], |
| 59 | + "no-useless-return": ["error"], |
| 60 | + "no-void": ["error"], |
| 61 | + "no-multi-assign": ["error"], |
| 62 | + "no-multiple-empty-lines": ["error", { "max": 1 }], |
| 63 | + "no-negated-condition": ["error"], |
| 64 | + "array-bracket-newline": ["error", "consistent"], |
| 65 | + "eol-last": ["error", "always"], |
| 66 | + "keyword-spacing": ["error"], |
| 67 | + "no-nested-ternary": ["error"], |
| 68 | + "no-tabs": ["error"], |
| 69 | + "no-trailing-spaces": ["error"], |
| 70 | + "no-unneeded-ternary": ["error"], |
| 71 | + "no-whitespace-before-property": ["error"], |
| 72 | + "object-curly-newline": ["error", { |
| 73 | + "consistent": true |
| 74 | + }], |
| 75 | + "no-confusing-arrow": ["error"], |
| 76 | + "padded-blocks": ["error", "never"], |
| 77 | + "no-useless-computed-key": ["error"], |
| 78 | + "template-curly-spacing": ["error"], |
| 79 | + "@typescript-eslint/member-ordering": [ |
| 80 | + "error", |
| 81 | + { |
| 82 | + "default": [ |
| 83 | + "private-field", |
| 84 | + "protected-field", |
| 85 | + "public-field", |
| 86 | + "constructor", |
| 87 | + "private-method", |
| 88 | + "protected-method", |
| 89 | + "public-method" |
| 90 | + ] |
| 91 | + } |
| 92 | + ], |
| 93 | + "dot-location": ["error", "property"], |
| 94 | + |
| 95 | + // Import |
| 96 | + "import/no-duplicates": ["error"], |
| 97 | + "import/no-namespace": ["error"], |
| 98 | + "no-restricted-imports": ["error", { |
| 99 | + "patterns": ["../*", "**/app_colors", "**/app_sizes", "**/app_fonts", "**/colors.json"] |
| 100 | + }], |
| 101 | + "import/order": ["error", { |
| 102 | + "newlines-between": "always", |
| 103 | + "groups": ["builtin", "external", "internal", "unknown"], |
| 104 | + "pathGroups": [ |
| 105 | + { "pattern": "~/**", "group": "internal" }, |
| 106 | + { "pattern": "./**", "group": "unknown" } |
| 107 | + ] |
| 108 | + }] |
| 109 | + } |
| 110 | +} |
0 commit comments