Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import { exadevConfig } from './src/index';

// A plain flat-config array, not wrapped in `tseslint.config(...)` (now `@deprecated` in favour of ESLint core's own `defineConfig()`, per typescript-eslint's own doc comment) nor in `defineConfig(...)` (whose parameter type is `@eslint/core`'s `ConfigObject`, which declares an explicit string index signature that `@typescript-eslint/utils`'s `TSESLint.FlatConfig.Config` -- the type this config's own elements carry -- does not; TypeScript refuses that assignment outright, and this codebase bans the `as` cast that would paper over it). ESLint's flat-config loader only ever required a plain array (or object, or array-of-arrays) as the default export -- both helpers exist purely for `extends`-flattening and stricter typing neither of which this already-flat array needs -- so this sidesteps the deprecated call and the cross-package type gap at once, rather than working around either.
export default [
// defineConfig() over a plain array or the now-@deprecated tseslint.config(): exadevConfig()'s return type is PublicConfigArray (see src/config-types.ts), typed against @eslint/core's own ConfigObject specifically so it satisfies defineConfig()'s parameter type directly -- this file is the first real proof of that, dogfooding the fix on the same repo that ships it.
export default defineConfig(
{
ignores: ['dist', 'coverage', 'node_modules', '.turbo'],
},
Expand Down Expand Up @@ -31,4 +32,4 @@ export default [
files: ['src/consumer-compatibility.ts'],
rules: { '@typescript-eslint/no-deprecated': 'off' },
},
];
);