Skip to content

Commit 54a6eac

Browse files
committed
chore: update eslintrc to match our style guide on brace style
1 parent 4b5cfab commit 54a6eac

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

.eslintrc.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,23 @@ module.exports = {
2525
},
2626
rules: {
2727
'indent': [ 'warn', 2, {
28-
SwitchCase: 1,
29-
ignoredNodes: ['CallExpression', 'ForStatement'],
30-
}
31-
],
28+
SwitchCase: 1,
29+
ignoredNodes: ['CallExpression', 'ForStatement'],
30+
}],
3231
'linebreak-style': [ 'error', 'unix' ],
33-
'quotes': [ 'warn', 'single' ],
3432
'func-call-spacing': [ 'off', 'never' ],
3533
'no-prototype-builtins': 'off',
36-
'quotes': ['warn', 'single', 'avoid-escape'],
34+
'quotes': [ 'warn', 'single', 'avoid-escape' ],
3735
'no-empty': [ 'warn' ],
3836
'no-multi-spaces': [ 'off' ],
3937
'prettier/prettier': [ 'off' ],
4038
'vars-on-top': [ 'error' ],
4139
'no-var': [ 'off' ],
4240
'spaced-comment': [ 'warn' ],
43-
'brace-style': [ 'off' ],
41+
'brace-style': [ 'warn', 'allman', { 'allowSingleLine': true }],
4442
'no-eval': [ 'error' ],
4543
'object-curly-spacing': [ 'warn', 'always' ],
4644
'eqeqeq': [ 'warn', 'always' ],
47-
'no-dupe-keys': [ 'warn' ],
4845
'no-constant-condition': [ 'warn' ],
4946
'no-extra-boolean-cast': [ 'warn' ],
5047
'no-sparse-arrays': [ 'off' ],
@@ -60,16 +57,15 @@ module.exports = {
6057
'no-unused-expressions': [ 'warn', { allowShortCircuit: true, allowTernary: true } ],
6158
'prefer-promise-reject-errors': [ 'error' ],
6259
'no-throw-literal': [ 'error' ],
63-
'semi': [ 'off', { omitLastInOneLineBlock: true }], /* does not work right with exports.X = function allmanStyle */
60+
'semi': [ 'warn' ],
6461
'semi-style': [ 'warn', 'last' ],
65-
'semi-spacing': [ 'error', {'before': false, 'after': true}],
62+
'semi-spacing': [ 'error', { 'before': false, 'after': true }],
6663
'no-extra-semi': [ 'warn' ],
6764
'no-tabs': [ 'error' ],
6865
'symbol-description': [ 'error' ],
6966
'operator-linebreak': [ 'warn', 'before' ],
7067
'new-cap': [ 'warn' ],
7168
'consistent-this': [ 'error', 'that' ],
72-
'no-use-before-define': [ 'error', { functions: false, classes: false } ],
7369
'no-shadow': [ 'error' ],
7470
'no-label-var': [ 'error' ],
7571
'radix': [ 'error' ],
@@ -89,10 +85,9 @@ module.exports = {
8985
allow: ['!!'] /* really only want to allow if(x) and if(!x) but not if(!!x) */
9086
}],
9187
'no-trailing-spaces': [ 'off', {
92-
skipBlankLines: true,
93-
ignoreComments: true
94-
}
95-
],
88+
skipBlankLines: true,
89+
ignoreComments: true
90+
}],
9691
'no-unused-vars': ['warn', {
9792
vars: 'all',
9893
args: 'none',

0 commit comments

Comments
 (0)