Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Multi-project configuration doesn't type check files not included in any project #724

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

Description

@ark120202

What code were you trying to parse?

[1].forEach(value=>value+1);

What did you expect to happen?

No warnings

What actually happened?

A warning from@typescript-eslint/restrict-plus-operands rule.

After a bit of debugging I found out that type checker returnedany type for thevalue node. It happened becauseproject didn't contain a reference to package's tsconfig file, so this file was linted in a context of an inferred project.

I've tried to reproduce it in an isolated environment and looks like it works correctly if there is only one project.

UPD: After reading source it makes sense that it can't do the same thing it does with a single config, but falling back to the same program used for non-type-checked rules should also make rules handle it like it does without any project specified - throw an error.

Versions

packageversion
@typescript-eslint/typescript-estree1.12.0
TypeScript3.5.3
node12.1.0
npm6.9.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


      [8]ページ先頭

      ©2009-2025 Movatter.jp