-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
81 lines (79 loc) · 2.79 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Copyright 2021 SmugMug, Inc.
// Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.
module.exports = {
extends: 'eslint:recommended',
rules: {
'block-scoped-var': 'error',
'block-spacing': 'error',
'brace-style': ['error', '1tbs', {allowSingleLine: true}],
'camelcase': ['error', {properties: 'never'}],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',
'curly': 'error',
'eol-last': 'error',
'eqeqeq': 'error',
'key-spacing': 'error',
'keyword-spacing': 'error',
'linebreak-style': 'error',
'max-depth': ['error', 2 + 3],
'max-params': ['error', Math.pow(2, 3)],
'newline-after-var': 'error',
'no-array-constructor': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
'no-console': 'warn',
'no-eq-null': 'error',
'no-eval': 'error',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-multiple-empty-lines': 'error',
'no-nested-ternary': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-object': 'error',
'no-new-wrappers': 'error',
'no-proto': 'error',
'no-prototype-builtins': 'off',
'no-redeclare': ['error', { 'builtinGlobals': false }],
'no-restricted-globals': ['error', 'event', 'self'],
'no-script-url': 'error',
'no-self-assign': ['error', { 'props': false }],
'no-sequences': 'error',
'no-shadow': 'error',
'no-spaced-func': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': ['error', {args: 'none'}],
'no-use-before-define': 'error',
'no-useless-catch': 'off',
'no-useless-escape': 'error',
'no-whitespace-before-property': 'error',
'operator-linebreak': 'error',
'quote-props': ['error', 'as-needed'],
// TODO re-enable when eslint/eslint#6238 is resolved
// @see https://github.com/eslint/eslint/issues/6238
// 'require-jsdoc': 'error',
'semi': 'error',
'semi-spacing': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', {anonymous: 'always', named: 'never'}],
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'spaced-comment': ['error', 'always', {block: {markers: ['!']}}],
// TODO re-enable when eslint/eslint#6238 is resolved
// @see https://github.com/eslint/eslint/issues/6238
// 'valid-jsdoc': ['error', {requireReturnDescription: false}],
'vars-on-top': 'error',
'wrap-iife': 'error'
}
};