eslint.config.js•1.49 kB
import js from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
const nodeGlobals = {
console: 'readonly',
process: 'readonly',
NodeJS: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
};
export default [
js.configs.recommended,
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
sourceType: 'module',
},
globals: nodeGlobals,
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-require-imports': 'off',
'no-case-declarations': 'off',
'no-console': 'off',
'no-useless-escape': 'off',
'no-undef': 'off',
'no-implied-eval': 'off',
},
},
];