import js from '@eslint/js'; import prettier from 'eslint-config-prettier'; import { defineConfig, globalIgnores } from 'eslint/config'; import tseslint from 'typescript-eslint'; export default defineConfig( globalIgnores([ '**/dist/', '**/coverage/', 'docs/', 'packages/compiler/test/fixtures/', 'packages/workers/test/fixtures/', // Standalone app with its own npm install; CI does not install its dependencies. 'examples/prisma-api/', ]), js.configs.recommended, tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked, { languageOptions: { parserOptions: { projectService: { allowDefaultProject: ['*.js', '*.ts'], }, tsconfigRootDir: import.meta.dirname, }, }, rules: { // Conflicts with no-non-null-assertion under noUncheckedIndexedAccess. '@typescript-eslint/non-nullable-type-assertion-style': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], // Decorated module classes such as `@Module({...}) class AppModule {}` are meant to be empty. '@typescript-eslint/no-extraneous-class': ['error', { allowWithDecorator: true }], }, }, { files: ['**/*.js', '**/*.mjs'], extends: [tseslint.configs.disableTypeChecked], languageOptions: { globals: { console: 'readonly', process: 'readonly', URL: 'readonly' }, }, }, prettier, );