|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "es6": true, |
| 4 | + "browser": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "root": true, |
| 8 | + "parser": "@typescript-eslint/parser", |
| 9 | + "parserOptions": { |
| 10 | + "ecmaVersion": 2020, |
| 11 | + "sourceType": "module", |
| 12 | + "ecmaFeatures": { |
| 13 | + "jsx": true |
| 14 | + } |
| 15 | + }, |
| 16 | + "extends": [ |
| 17 | + "eslint:recommended", |
| 18 | + "plugin:react/recommended", |
| 19 | + "plugin:react-hooks/recommended", |
| 20 | + "plugin:import/recommended", |
| 21 | + "plugin:import/react", |
| 22 | + "plugin:security/recommended", |
| 23 | + "plugin:@typescript-eslint/recommended", |
| 24 | + "plugin:prettier/recommended", |
| 25 | + "prettier" |
| 26 | + ], |
| 27 | + "globals": { |
| 28 | + "Atomics": "readonly", |
| 29 | + "SharedArrayBuffer": "readonly" |
| 30 | + }, |
| 31 | + "plugins": [ |
| 32 | + "react", |
| 33 | + "react-hooks", |
| 34 | + "security", |
| 35 | + "import" |
| 36 | + ], |
| 37 | + "ignorePatterns": [ |
| 38 | + "src/assets" |
| 39 | + ], |
| 40 | + "settings": { |
| 41 | + "react": { |
| 42 | + "version": "^16.12.0" |
| 43 | + }, |
| 44 | + "import/resolver": { |
| 45 | + "parcel": { |
| 46 | + "rootDir": "src", |
| 47 | + "extensions": [ |
| 48 | + ".js", |
| 49 | + ".jsx", |
| 50 | + ".ts", |
| 51 | + ".tsx", |
| 52 | + ".svg", |
| 53 | + ".png", |
| 54 | + ".jpeg" |
| 55 | + ] |
| 56 | + } |
| 57 | + } |
| 58 | + }, |
| 59 | + "rules": { |
| 60 | + "max-len": [ |
| 61 | + "warn", |
| 62 | + { |
| 63 | + "code": 120 |
| 64 | + } |
| 65 | + ], |
| 66 | + "react/prop-types": 0, |
| 67 | + "no-unused-vars": "off", |
| 68 | + "@typescript-eslint/no-unused-vars": [ |
| 69 | + "error", |
| 70 | + { |
| 71 | + "varsIgnorePattern": "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)", |
| 72 | + "argsIgnorePattern": "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)" |
| 73 | + } |
| 74 | + ], |
| 75 | + "no-console": [ |
| 76 | + "error", |
| 77 | + { |
| 78 | + "allow": [ |
| 79 | + "warn", |
| 80 | + "error", |
| 81 | + "info", |
| 82 | + "debug" |
| 83 | + ] |
| 84 | + } |
| 85 | + ], |
| 86 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 87 | + "@typescript-eslint/no-explicit-any": "off", |
| 88 | + "security/detect-object-injection": "off", |
| 89 | + "security/detect-non-literal-fs-filename": "off", |
| 90 | + "import/extensions": [ |
| 91 | + "error", |
| 92 | + "ignorePackages", |
| 93 | + { |
| 94 | + "js": "never", |
| 95 | + "jsx": "never", |
| 96 | + "ts": "never", |
| 97 | + "tsx": "never" |
| 98 | + } |
| 99 | + ], |
| 100 | + "import/no-unresolved": "off", |
| 101 | + "import/order": [ |
| 102 | + "warn", |
| 103 | + { |
| 104 | + "groups": [ |
| 105 | + "builtin", |
| 106 | + "external", |
| 107 | + "internal", |
| 108 | + "parent", |
| 109 | + "sibling", |
| 110 | + "index" |
| 111 | + ], |
| 112 | + "pathGroups": [ |
| 113 | + { |
| 114 | + "pattern": "{react,styled-components}", |
| 115 | + "group": "external", |
| 116 | + "position": "before" |
| 117 | + }, |
| 118 | + { |
| 119 | + "pattern": "@kleros/**", |
| 120 | + "group": "external", |
| 121 | + "position": "after" |
| 122 | + }, |
| 123 | + { |
| 124 | + "pattern": "{svgs/**,assets/**}", |
| 125 | + "group": "internal", |
| 126 | + "position": "after" |
| 127 | + }, |
| 128 | + { |
| 129 | + "pattern": "{hooks/**,utils/**,consts/**,types/**,context/**,connectors/**,}", |
| 130 | + "group": "internal", |
| 131 | + "position": "after" |
| 132 | + }, |
| 133 | + { |
| 134 | + "pattern": "{queries/**,}", |
| 135 | + "group": "internal", |
| 136 | + "position": "after" |
| 137 | + }, |
| 138 | + { |
| 139 | + "pattern": "{src/**,}", |
| 140 | + "group": "internal", |
| 141 | + "position": "after" |
| 142 | + }, |
| 143 | + { |
| 144 | + "pattern": "{styles/**,}", |
| 145 | + "group": "internal", |
| 146 | + "position": "after" |
| 147 | + }, |
| 148 | + { |
| 149 | + "pattern": "{layout/**,pages/**,components/**,}", |
| 150 | + "group": "internal", |
| 151 | + "position": "after" |
| 152 | + } |
| 153 | + ], |
| 154 | + "pathGroupsExcludedImportTypes": [ |
| 155 | + "builtin" |
| 156 | + ], |
| 157 | + "newlines-between": "always", |
| 158 | + "alphabetize": { |
| 159 | + "order": "asc", |
| 160 | + "caseInsensitive": true |
| 161 | + } |
| 162 | + } |
| 163 | + ] |
| 164 | + } |
| 165 | +} |
0 commit comments