34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
const eslint = require('@eslint/js');
|
|
const tseslint = require('typescript-eslint');
|
|
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
|
|
|
|
module.exports = tseslint.config(
|
|
eslint.configs.recommended,
|
|
...tseslint.configs.recommendedTypeChecked,
|
|
eslintPluginPrettierRecommended,
|
|
{
|
|
languageOptions: {
|
|
parserOptions: {
|
|
project: ['./tsconfig.json'],
|
|
tsconfigRootDir: __dirname
|
|
}
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/explicit-function-return-type': 'warn',
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
'@typescript-eslint/require-await': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }
|
|
]
|
|
}
|
|
},
|
|
{
|
|
ignores: ['dist/', 'node_modules/', 'eslint.config.js']
|
|
}
|
|
);
|