Enable brace-style eslint rules
This commit is contained in:

committed by
GitHub

parent
73bdcdfd0a
commit
5a8f484a03
13
.eslintrc.js
13
.eslintrc.js
@@ -15,6 +15,10 @@ const rules = {
|
||||
},
|
||||
],
|
||||
|
||||
// No omitting braces, keep on the same line
|
||||
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
|
||||
curly: ['error', 'all'],
|
||||
|
||||
// prevents us from accidentally checking in exclusive tests (`.only`):
|
||||
'mocha/no-exclusive-tests': 'error',
|
||||
|
||||
@@ -109,12 +113,19 @@ const rules = {
|
||||
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
||||
},
|
||||
],
|
||||
curly: 'error',
|
||||
};
|
||||
|
||||
const typescriptRules = {
|
||||
...rules,
|
||||
|
||||
// Override brace style to enable typescript-specific syntax
|
||||
'brace-style': 'off',
|
||||
'@typescript-eslint/brace-style': [
|
||||
'error',
|
||||
'1tbs',
|
||||
{ allowSingleLine: false },
|
||||
],
|
||||
|
||||
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
|
||||
|
||||
'no-restricted-imports': 'off',
|
||||
|
Reference in New Issue
Block a user