|
1 | 1 | { |
2 | | - "extends": "@folio/eslint-config-stripes", |
3 | | - "parser": "@babel/eslint-parser", |
| 2 | + "root": true, |
4 | 3 | "env": { |
5 | 4 | "jest": true |
6 | 5 | }, |
| 6 | + "extends": [ |
| 7 | + "@folio/eslint-config-stripes", |
| 8 | + "plugin:testing-library/react", |
| 9 | + "plugin:jest-dom/recommended" |
| 10 | + ], |
| 11 | + "parser": "@babel/eslint-parser", |
| 12 | + "plugins": [ |
| 13 | + "canonical" |
| 14 | + ], |
7 | 15 | "rules": { |
8 | | - "implicit-arrow-linebreak": "off", |
| 16 | + "array-bracket-newline": ["error", { "multiline": true }], |
| 17 | + "canonical/export-specifier-newline": "error", |
| 18 | + "canonical/import-specifier-newline": "error", |
| 19 | + "comma-dangle": [ |
| 20 | + "error", |
| 21 | + { |
| 22 | + "arrays": "always-multiline", |
| 23 | + "objects": "always-multiline", |
| 24 | + "imports": "always-multiline", |
| 25 | + "exports": "always-multiline", |
| 26 | + "functions": "never" |
| 27 | + } |
| 28 | + ], |
| 29 | + "import/order": [ |
| 30 | + "error", |
| 31 | + { |
| 32 | + "groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]], |
| 33 | + "newlines-between": "always", |
| 34 | + "pathGroups": [ |
| 35 | + { |
| 36 | + "pattern": "@folio/**", |
| 37 | + "group": "internal", |
| 38 | + "position": "after" |
| 39 | + } |
| 40 | + ], |
| 41 | + "pathGroupsExcludedImportTypes": ["builtin"], |
| 42 | + "alphabetize": { |
| 43 | + "order": "asc", |
| 44 | + "caseInsensitive": true |
| 45 | + } |
| 46 | + } |
| 47 | + ], |
| 48 | + "key-spacing": [ |
| 49 | + "error", |
| 50 | + { |
| 51 | + "beforeColon": false, |
| 52 | + "afterColon": true, |
| 53 | + "mode": "strict" |
| 54 | + } |
| 55 | + ], |
| 56 | + "max-len": ["warn", { "code": 120 }], |
| 57 | + "newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 2 }], |
| 58 | + "no-multiple-empty-lines": "error", |
| 59 | + "object-curly-newline": [ |
| 60 | + "error", |
| 61 | + { |
| 62 | + "ImportDeclaration": { "multiline": true, "minProperties": 2 }, |
| 63 | + "ExportDeclaration": { "multiline": true, "minProperties": 2 } |
| 64 | + } |
| 65 | + ], |
| 66 | + "padding-line-between-statements": [ |
| 67 | + "error", |
| 68 | + { "blankLine": "always", "prev": "block-like", "next": "*" }, |
| 69 | + { "blankLine": "always", "prev": "*", "next": "block-like" } |
| 70 | + ], |
| 71 | + "quote-props": ["error", "as-needed"], |
9 | 72 | "react/forbid-prop-types": [ |
10 | 73 | // rule was removed from eslint-config-stripes in v8.0.0 |
11 | 74 | "warn", |
12 | 75 | { |
13 | 76 | "forbid": ["any", "array"] |
14 | 77 | } |
15 | | - ] |
| 78 | + ], |
| 79 | + "react/jsx-sort-props": "error", |
| 80 | + "react/sort-prop-types": "error", |
| 81 | + "sort-imports": ["error", { "ignoreCase": true, "ignoreDeclarationSort": true }], |
| 82 | + "testing-library/no-await-sync-events": [ |
| 83 | + "error", |
| 84 | + { "eventModules": ["fire-event"] } |
| 85 | + ], |
| 86 | + "testing-library/no-node-access": "off", |
| 87 | + "testing-library/no-render-in-lifecycle": [ |
| 88 | + "error", |
| 89 | + { "allowTestingFrameworkSetupHook": "beforeEach" } |
| 90 | + ], |
| 91 | + "testing-library/prefer-user-event": "warn" |
| 92 | + }, |
| 93 | + "settings": { |
| 94 | + "react": { |
| 95 | + "version": "detect" |
| 96 | + } |
16 | 97 | } |
17 | 98 | } |
0 commit comments