Enable brace-style eslint rules

This commit is contained in:
jamiebuilds-signal
2022-09-13 14:48:09 -07:00
committed by GitHub
parent 73bdcdfd0a
commit 5a8f484a03
9 changed files with 54 additions and 13 deletions

View File

@@ -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',