2021-01-06 15:36:07 -05:00
|
|
|
/* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2021-01-06 17:37:05 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: CC0-1.0
|
|
|
|
*/
|
2018-11-14 08:10:14 -05:00
|
|
|
module.exports = {
|
2020-07-24 15:47:41 -04:00
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
parserOptions: {
|
|
|
|
project: 'tsconfig.json',
|
|
|
|
sourceType: 'module',
|
2018-11-14 08:10:14 -05:00
|
|
|
},
|
2021-01-06 17:37:05 -05:00
|
|
|
plugins: ['@typescript-eslint'],
|
2020-07-24 15:47:41 -04:00
|
|
|
extends: [
|
2021-01-06 17:37:05 -05:00
|
|
|
'eslint:recommended',
|
2020-04-11 07:01:06 -04:00
|
|
|
'plugin:@typescript-eslint/recommended',
|
2021-02-23 15:15:10 -05:00
|
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
2020-07-24 15:47:41 -04:00
|
|
|
'prettier',
|
2020-04-11 07:01:06 -04:00
|
|
|
],
|
2020-07-24 15:47:41 -04:00
|
|
|
root: true,
|
|
|
|
env: {
|
|
|
|
node: true,
|
|
|
|
jest: true,
|
2020-04-11 07:01:06 -04:00
|
|
|
},
|
2020-07-24 15:47:41 -04:00
|
|
|
rules: {
|
2021-01-06 17:37:05 -05:00
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
|
|
'warn',
|
|
|
|
{ argsIgnorePattern: '^_+$' },
|
|
|
|
],
|
2020-07-24 15:47:41 -04:00
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
2021-02-20 14:14:36 -05:00
|
|
|
'no-return-await': 'off',
|
|
|
|
'@typescript-eslint/return-await': ['error', 'always'],
|
2021-02-20 15:15:45 -05:00
|
|
|
'@typescript-eslint/naming-convention': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
selector: 'default',
|
|
|
|
format: ['camelCase'],
|
|
|
|
leadingUnderscore: 'allow',
|
|
|
|
trailingUnderscore: 'allow',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
selector: 'enumMember',
|
|
|
|
format: ['UPPER_CASE'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
selector: 'variable',
|
|
|
|
format: ['camelCase', 'UPPER_CASE'],
|
|
|
|
leadingUnderscore: 'allow',
|
|
|
|
trailingUnderscore: 'allow',
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
selector: 'typeLike',
|
|
|
|
format: ['PascalCase'],
|
|
|
|
},
|
|
|
|
],
|
2020-07-24 15:47:41 -04:00
|
|
|
},
|
|
|
|
};
|