mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-03-12 15:52:04 +00:00
ESLint: Override config for tests
This is done to to fix Issue #1098 Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
1a8ae49e98
commit
b8d106a4a2
1 changed files with 20 additions and 1 deletions
21
.eslintrc.js
21
.eslintrc.js
|
@ -8,7 +8,26 @@ module.exports = {
|
||||||
project: 'tsconfig.json',
|
project: 'tsconfig.json',
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
},
|
},
|
||||||
plugins: ['@typescript-eslint'],
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['test/**', 'src/**/*.spec.ts'],
|
||||||
|
extends: ['plugin:jest/recommended'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/unbound-method': 'off',
|
||||||
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||||
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||||
|
'@typescript-eslint/require-await': 'off',
|
||||||
|
'jest/unbound-method': 'error',
|
||||||
|
'jest/expect-expect': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
assertFunctionNames: ['expect', 'request.**.expect'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
plugins: ['@typescript-eslint', 'jest'],
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:@typescript-eslint/recommended',
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
|
Loading…
Reference in a new issue