Skip to content

Docs: Local relative paths not supported by projectService's allowDefaultProject #9715

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

typescript-estree

Playground Link

No response

Repro Code

(see ESLint config)

ESLint Config

// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  eslint.configs.recommended,
  ...tseslint.configs.recommendedTypeChecked,
  {
    languageOptions: {
      parserOptions: {
        projectService: {
            allowDefaultProject: ['./*.js'],
            defaultProject: 'tsconfig.json'
        },
        tsconfigRootDir: import.meta.dirname,
      },
    },
  },
);

tsconfig

No response

Expected Result

eslint.config.js should be picked up by the project service.

Actual Result

/Users/josh/repos/repros/eslint.config.js
  0:0  error  Parsing error: /Users/josh/repos/repros/eslint.config.js was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject

Additional Info

See repro on: https://github.com/JoshuaKGoldberg/repros/tree/repro-allow-default-project-local-relative-path

Followup to #9674 -> #9675: that work made paths like '*.js' work, but not './*.js'.

Versions

package version
@typescript-eslint/eslint-plugin 9.8.0
@typescript-eslint/parser 9.8.0
@typescript-eslint/typescript-estree 9.8.0
TypeScript 5.5.4
ESLint 9.8.0
node 22.4.1

💖

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.team assignedA member of the typescript-eslint team should work on this.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions