1 | module.exports = {
|
2 | parser: "babel-eslint",
|
3 | parserOptions: {
|
4 | sourceType: "module",
|
5 | ecmaFeatures: {
|
6 | }
|
7 | },
|
8 | env: {
|
9 | browser: true,
|
10 | node: true,
|
11 |
|
12 |
|
13 |
|
14 | es6: true,
|
15 | },
|
16 | extends: ["eslint:recommended", "google"],
|
17 | plugins: [
|
18 | "babel",
|
19 | ],
|
20 | rules: {
|
21 |
|
22 | "max-len": ["error", {
|
23 | code: 90,
|
24 | ignoreComments: true,
|
25 | }],
|
26 | curly: ["error", "multi-line"],
|
27 | "prefer-const": ["error"],
|
28 | "comma-dangle": ["error", {
|
29 | arrays: "always-multiline",
|
30 | objects: "always-multiline",
|
31 | imports: "always-multiline",
|
32 | exports: "always-multiline",
|
33 | functions: "always-multiline",
|
34 | }],
|
35 |
|
36 |
|
37 | "require-jsdoc": ["error", {
|
38 | require: {
|
39 | FunctionDeclaration: false,
|
40 | }
|
41 | }],
|
42 | "valid-jsdoc": ["error", {
|
43 | requireParamDescription: false,
|
44 | requireReturn: false,
|
45 | requireReturnDescription: false,
|
46 | }],
|
47 |
|
48 |
|
49 | "no-console": ["off"],
|
50 | "no-constant-condition": ["off"],
|
51 | "no-empty": ["error", { "allowEmptyCatch": true }],
|
52 |
|
53 |
|
54 | "object-curly-spacing": ["off"],
|
55 | "spaced-comment": ["off"],
|
56 | "guard-for-in": ["off"],
|
57 |
|
58 |
|
59 | quotes: ["off"],
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | "no-var": ["warn"],
|
66 | "brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
|
67 | "prefer-rest-params": ["warn"],
|
68 | "prefer-spread": ["warn"],
|
69 | "one-var": ["warn"],
|
70 | "padded-blocks": ["warn"],
|
71 | "no-extend-native": ["warn"],
|
72 | "camelcase": ["warn"],
|
73 | "no-multi-spaces": ["error", { "ignoreEOLComments": true }],
|
74 | "space-before-function-paren": ["error", {
|
75 | "anonymous": "never",
|
76 | "named": "never",
|
77 | "asyncArrow": "always",
|
78 | }],
|
79 | "arrow-parens": "off",
|
80 |
|
81 |
|
82 | "no-invalid-this": "off",
|
83 |
|
84 | "babel/no-invalid-this": "error",
|
85 | }
|
86 | }
|