|
1 | | -const readonly = 'readonly'; |
2 | | -const error = 'error'; |
3 | | -const warn = 'warn'; |
4 | | -const off = 'off'; |
5 | | - |
6 | 1 | module.exports = { |
7 | 2 | extends: 'airbnb-base', |
8 | 3 | env: { |
9 | | - es6: true, |
10 | | - browser: true, |
11 | | - jquery: true, |
12 | | - greasemonkey: true, |
13 | | - node: false, |
| 4 | + node: true, |
14 | 5 | }, |
15 | | - globals: { |
16 | | - $el: readonly, |
17 | | - api: readonly, |
18 | | - axios: readonly, |
19 | | - BootstrapDialog: readonly, |
20 | | - cardHelper: readonly, |
21 | | - changelog: readonly, |
22 | | - chatRoomNames: readonly, |
23 | | - debug: readonly, |
24 | | - decrypt: readonly, |
25 | | - eventManager: readonly, |
26 | | - fn: readonly, |
27 | | - footer: readonly, |
28 | | - footer2: readonly, |
29 | | - global: readonly, |
30 | | - globalSet: readonly, |
31 | | - Hotkey: readonly, |
32 | | - hotkeys: readonly, |
33 | | - hover: readonly, |
34 | | - luxon: readonly, |
35 | | - menu: readonly, |
36 | | - noop: readonly, |
37 | | - onPage: readonly, |
38 | | - ProfileButton: readonly, |
39 | | - pendingIgnore: readonly, |
40 | | - profile: readonly, |
41 | | - SimpleToast: readonly, |
42 | | - script: readonly, |
43 | | - scriptVersion: readonly, |
44 | | - settings: readonly, |
45 | | - setVersion: readonly, |
46 | | - shouldIgnore: readonly, |
47 | | - showdown: readonly, |
48 | | - sleep: readonly, |
49 | | - style: readonly, |
50 | | - tippy: readonly, |
51 | | - VarStore: readonly, |
52 | | - wrap: readonly, |
53 | | - }, |
54 | | - parserOptions: { |
55 | | - sourceType: 'script', |
56 | | - ecmaFeatures: { |
57 | | - globalReturn: true, |
58 | | - } |
59 | | - }, |
60 | | - rules: { |
61 | | - // Warn, we allow this behavior, but want to be aware of any possible issues |
62 | | - 'consistent-return': warn, |
63 | | - // We allow modification of properties |
64 | | - 'no-param-reassign': [warn, { props: false }], |
65 | | - // Allow short circuits: test && action |
66 | | - 'no-unused-expressions': [error, { allowShortCircuit: true }], |
67 | | - // Allow function arguments to be unused |
68 | | - 'no-unused-vars': [error, { args: 'none' }], |
69 | | - // Allow functions to be defined after references (functions are top-level) |
70 | | - 'no-use-before-define': [error, 'nofunc'], |
71 | | - // Deconstruction not required when assigning to object properties (declared_var = object.key) |
72 | | - 'prefer-destructuring': [error, { |
73 | | - AssignmentExpression: { array: true, object: false }, |
74 | | - }], |
75 | | - // Allow for loops to use unary (++/--) |
76 | | - 'no-plusplus': [error, { allowForLoopAfterthoughts: true }], |
77 | | - 'prefer-arrow-callback': [error, { allowNamedFunctions: true } ], |
78 | | - 'no-useless-return': warn, |
79 | | - 'class-methods-use-this': off, |
80 | | - 'no-restricted-globals': [error, ''], |
81 | | - 'no-bitwise': off, |
82 | | - 'no-mixed-operators': off, |
83 | | - 'no-continue': off, |
84 | | - 'object-curly-newline': [error, { multiline: true, consistent: true }], |
85 | | - 'operator-linebreak': [error, 'after'], |
86 | | - 'quotes': [error, 'single', { allowTemplateLiterals: true, }], |
87 | | - 'max-len': [error, { |
88 | | - code: 120, |
89 | | - ignoreComments: true, |
90 | | - ignoreRegExpLiterals: true, |
91 | | - ignoreStrings: true, |
92 | | - tabWidth: 2, |
93 | | - }], |
94 | | - 'no-extra-boolean-cast': warn, |
95 | | - }, |
96 | 6 | }; |
0 commit comments