38 lines
965 B
JavaScript
38 lines
965 B
JavaScript
|
|
// eslint.config.js
|
||
|
|
import js from '@eslint/js';
|
||
|
|
import nestPlugin from '@nestjs/eslint-plugin';
|
||
|
|
import prettier from 'eslint-config-prettier';
|
||
|
|
import eslintPluginPrettier from 'eslint-plugin-prettier';
|
||
|
|
import tseslint from 'typescript-eslint';
|
||
|
|
|
||
|
|
export default [
|
||
|
|
js.configs.recommended,
|
||
|
|
|
||
|
|
...tseslint.configs.recommended,
|
||
|
|
|
||
|
|
{
|
||
|
|
files: ['**/*.ts'],
|
||
|
|
plugins: {
|
||
|
|
'@nestjs': nestPlugin,
|
||
|
|
prettier: eslintPluginPrettier,
|
||
|
|
},
|
||
|
|
rules: {
|
||
|
|
...nestPlugin.configs.recommended.rules,
|
||
|
|
|
||
|
|
// Prettier errors inside ESLint
|
||
|
|
'prettier/prettier': 'error',
|
||
|
|
|
||
|
|
// NestJS & TS recommended rule overrides
|
||
|
|
'@typescript-eslint/no-unused-vars': [
|
||
|
|
'error',
|
||
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
||
|
|
],
|
||
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
|
||
|
|
// Disable formatting rules that conflict with Prettier
|
||
|
|
prettier,
|
||
|
|
];
|