]>
Commit | Line | Data |
---|---|---|
8727f598 | 1 | { |
0e4808bf JD |
2 | "env": { |
3 | "browser": true, | |
4 | "es6": true | |
5 | }, | |
6 | "parserOptions": { | |
7 | "sourceType": "module" | |
8 | }, | |
9 | "extends": "eslint:recommended", | |
10 | "rules": { | |
a9888115 PO |
11 | // Unsafe or confusing stuff that we forbid |
12 | ||
0e4808bf JD |
13 | "no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }], |
14 | "no-constant-condition": ["error", { "checkLoops": false }], | |
15 | "no-var": "error", | |
16 | "no-useless-constructor": "error", | |
17 | "object-shorthand": ["error", "methods", { "avoidQuotes": true }], | |
651c23ec JD |
18 | "prefer-arrow-callback": "error", |
19 | "arrow-body-style": ["error", "as-needed", { "requireReturnForObjectLiteral": false } ], | |
20 | "arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }], | |
21 | "arrow-spacing": ["error"], | |
22 | "no-confusing-arrow": ["error", { "allowParens": true }], | |
a9888115 PO |
23 | |
24 | // Enforced coding style | |
25 | ||
26 | "brace-style": ["error", "1tbs", { "allowSingleLine": true }], | |
7b536961 | 27 | "indent": ["error", 4, { "SwitchCase": 1, |
07a69954 | 28 | "FunctionDeclaration": { "parameters": "first" }, |
7b536961 PO |
29 | "CallExpression": { "arguments": "first" }, |
30 | "ArrayExpression": "first", | |
31 | "ObjectExpression": "first", | |
32 | "ignoreComments": true }], | |
6786fd87 | 33 | "comma-spacing": ["error"], |
f77f41ee | 34 | "comma-style": ["error"], |
426a8c92 | 35 | "curly": ["error", "multi-line"], |
d80d9d37 | 36 | "func-call-spacing": ["error"], |
e7777653 | 37 | "func-names": ["error"], |
22d10c75 | 38 | "func-style": ["error", "declaration", { "allowArrowFunctions": true }], |
942a3127 | 39 | "key-spacing": ["error"], |
35068204 | 40 | "keyword-spacing": ["error"], |
4a16dc51 | 41 | "no-trailing-spaces": ["error"], |
0ae5c54a | 42 | "semi": ["error"], |
3f1cda2e | 43 | "space-before-blocks": ["error"], |
2c5491e1 PO |
44 | "space-before-function-paren": ["error", { "anonymous": "always", |
45 | "named": "never", | |
46 | "asyncArrow": "always" }], | |
0997b319 | 47 | "switch-colon-spacing": ["error"], |
cfb824ed | 48 | "camelcase": ["error", { allow: ["^XK_", "^XF86XK_"] }], |
0e4808bf | 49 | } |
8727f598 | 50 | } |