|
| 1 | +{ |
| 2 | + "parser": "babel-eslint", |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es6": true, |
| 6 | + "node": true, |
| 7 | + "jest": true |
| 8 | + }, |
| 9 | + "extends": [ "xo", "plugin:unicorn/recommended" ], |
| 10 | + "plugins": [ "import", "unicorn" ], |
| 11 | + "rules": { |
| 12 | + // omit semicolons. there's only a few cases where automatic |
| 13 | + // semicolon insertion is problematic - most of which can be |
| 14 | + // mitigated by other linting rules such as func-call-spacing |
| 15 | + // or no-unexpected-multiline |
| 16 | + "semi": [ 2, "never" ], |
| 17 | + // enforce 2-space indentation |
| 18 | + "indent": [ 2, 2 ], |
| 19 | + // enforce arrow parens, regardless of argument count |
| 20 | + "arrow-parens": [ 2, "always" ], |
| 21 | + // enforce dangling commas for multiline statements |
| 22 | + "comma-dangle": [ 2, "always-multiline" ], |
| 23 | + // enforce consistent spacing inside braces and brackets |
| 24 | + "array-bracket-spacing": [ 2, "always", { |
| 25 | + "arraysInArrays": false, |
| 26 | + "objectsInArrays": false |
| 27 | + }], |
| 28 | + "object-curly-spacing": [ 2, "always", { |
| 29 | + "arraysInObjects": false, |
| 30 | + "objectsInObjects": false |
| 31 | + }], |
| 32 | + // enforce consistent linebreak style for operators, with an |
| 33 | + // exception being made for multi-line-ternaries so those are |
| 34 | + // easier to spot |
| 35 | + "operator-linebreak": [ 2, "after", { |
| 36 | + "overrides": { "?": "before", ":": "before" } |
| 37 | + }] |
| 38 | + } |
| 39 | +} |
0 commit comments