UNPKG

955 BJavaScriptView Raw
1module.exports = {
2 extends: [
3 "prettier",
4 "plugin:promise/recommended",
5 "plugin:lodash/recommended",
6 ],
7 parserOptions: {
8 ecmaVersion: 2018,
9 ecmaFeatures: {
10 experimentalObjectRestSpread: true,
11 },
12 },
13 env: {
14 node: true,
15 browser: true,
16 es6: true,
17 },
18 plugins: ["prettier", "promise", "lodash"],
19 rules: {
20 "prettier/prettier": [
21 "error",
22 {
23 printWidth: 80,
24 trailingComma: "es5",
25 },
26 ],
27 // Because some external APIs do not use camelCase
28 "dot-notation": "off",
29 // Allow for-of
30 "no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
31 // Allow creating promises
32 "promise/avoid-new": "off",
33 // Prefer `await fetch()` over `fetch().then()`
34 "promise/prefer-await-to-then": "warn",
35 // Do not enforce lodash
36 "lodash/prefer-lodash-method": "off",
37 // Allow any use of paths
38 "lodash/path-style": "off",
39 },
40};