Skip to content

Bug: Local paths not supported by projectService's allowDefaultProject #9674

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

typescript-estree

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

Right now in v8, I can't get parserOptions.projectService.allowDefaultProject to actually allow an eslint.config.js file. Neither 'eslint.config.js' nor './eslint.config.js' are working. Both result in an error message trying to lint:

$ npx eslint eslint.config.js

/Users/josh/repos/typescript-eslint-examples/packages/eslint-plugin-example-typed-linting/eslint.config.js
  0:0  error  Parsing error: /Users/josh/repos/typescript-eslint-examples/packages/eslint-plugin-example-typed-linting/eslint.config.js was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject

As reported by @RebeccaStevens in Discord (https://discord.com/channels/1026804805894672454/1228823100070821989/1266272722946621470), the globs are being matched against the full file path, not the relevant one.

From some console logging:

"filePathMatchedBy": {
  "filePath": "/Users/josh/repos/typescript-eslint-examples/packages/eslint-plugin-example-typed-linting/eslint.config.js",
  "allowDefaultProject": [ "eslint.config.js" ]
}

Additional Info

💖

Co-authored-by: @RebeccaStevens

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions