Prohibit Chai expect
or should
; prefer assert
This commit is contained in:
parent
885b4d4d2e
commit
c1e3e87b99
5 changed files with 57 additions and 37 deletions
|
@ -1,8 +1,21 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// Copyright 2021-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { update } = require('lodash/fp');
|
||||
const topLevelEslintrc = require('../../.eslintrc');
|
||||
|
||||
const typescriptRules = topLevelEslintrc.overrides.find(override =>
|
||||
override.files.some(glob => glob.endsWith('.ts'))
|
||||
).rules;
|
||||
const noRestrictedImportsRule =
|
||||
typescriptRules['@typescript-eslint/no-restricted-imports'];
|
||||
|
||||
module.exports = {
|
||||
rules: {
|
||||
'@typescript-eslint/no-restricted-imports': 'off',
|
||||
'@typescript-eslint/no-restricted-imports': update(
|
||||
[1, 'paths'],
|
||||
(paths = []) => paths.filter(path => path.name !== 'electron'),
|
||||
noRestrictedImportsRule
|
||||
),
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue