Skip to content

Files with the same name (without extensions) are not parsable #955

@bradzacher

Description

@bradzacher

Moving this out of #890 as it's an issue we need to track.

Comment by @toddbluhm:

The issue appears to occur when I have two files with the same name (fixture.ts & fixture.js) in the same folder (src). It only picks up the .ts file and will not pick up the .js file. Instead, it gives the error that fixture.js was not included in the project.

I can confirm that deleting fixture.ts and keeping fixture.js causes the "not included in project" error to go away. So by deleting either fixture.ts or fixture.js causes the "not included in project" error to go away. Keeping both files, causes the error to show up.


**tsconfig.json**
{
  "extends": "./node_modules/tsconfigs/universal",
  "compilerOptions": {
    "esModuleInterop": true,
    "importHelpers": false
  }
}

**tsconfig.eslint.json**
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "allowJs": true,
    "checkJs": true
  },
  "include": [
    "src/**/*",
    "*.ts",
    "*.js"
  ]
}

**.eslintrc.json**
{
  "extends": "./lib/index.js",
  "parserOptions": {
    "project": "./tsconfig.eslint.json"
  }
}

**Example file paths that are throwing errors**
  • /Users/toddbluhm/Development/Github/eslint-config-standard-with-typescript/src/fixture.js
    • Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
      The file does not match your project config: /Users/toddbluhm/Development/Github/eslint-config-standard-with-typescript/src/fixture.js.
      The file must be included in at least one of the projects provided

Versions

package version
@typescript-eslint/eslint-plugin 2.0.0 & 2.0.1-alpha.27
@typescript-eslint/parser 2.0.0 & 2.0.1-alpha.27
TypeScript 3.5.3
node 10.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas prthere is a PR raised to close thispackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy