2022-12-05 20:14:56 +00:00
|
|
|
module.exports = {
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
|
|
],
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
parserOptions: {
|
|
|
|
tsconfigRootDir: __dirname,
|
|
|
|
project: ['./tsconfig.json'],
|
|
|
|
},
|
|
|
|
plugins: ['@typescript-eslint'],
|
|
|
|
root: true,
|
|
|
|
rules: {
|
2023-01-04 14:41:26 +00:00
|
|
|
'prefer-const': 'error',
|
2022-12-05 20:14:56 +00:00
|
|
|
'no-var': 'error',
|
2023-01-04 13:58:49 +00:00
|
|
|
'@typescript-eslint/no-unsafe-return': 'error',
|
2023-01-06 09:06:16 +00:00
|
|
|
'@typescript-eslint/no-unused-vars': 'error',
|
2023-01-10 11:03:05 +00:00
|
|
|
'no-console': 'off',
|
|
|
|
'no-constant-condition': 'off',
|
2023-01-11 15:45:07 +00:00
|
|
|
'@typescript-eslint/require-await': 'off',
|
|
|
|
'@typescript-eslint/no-unsafe-call': 'error',
|
|
|
|
'@typescript-eslint/await-thenable': 'error',
|
|
|
|
'@typescript-eslint/no-misused-promises': 'error',
|
2022-12-05 20:14:56 +00:00
|
|
|
/*
|
|
|
|
Note: the following rules have been set to off so that linting
|
|
|
|
can pass with the current code, but we need to gradually
|
|
|
|
re-enable most of them
|
|
|
|
*/
|
|
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
|
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
|
|
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
|
|
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
|
|
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
|
|
'@typescript-eslint/no-inferrable-types': 'off',
|
|
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
|
|
'@typescript-eslint/ban-types': 'off',
|
|
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
|
|
|
},
|
|
|
|
}
|