To use this configuration, import the project object from the package's entry point (typically ./lib/index.js if you are consuming it locally or via the package name) and include it in your eslint.config.js array.
To ensure TypeScript rules work correctly with the project's type-aware linting, you must provide languageOptions.parserOptions.projectService configuration. This allows the parser to resolve your TypeScript project settings.
import project from './lib/index.js'
export default [
project,
{
files: ['**/*.cjs', '**/*.js', '**/*.ts'],
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['eslint.config.js', 'commitlint.config.js'],
defaultProject: './tsconfig.json',
},
},
},
},
{
ignores: ['lib/'],
},
]