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

Support for mixed JS and TS codebases - do not lint JS files #109

Closed
Labels
documentationDocumentation ("docs") that needs adding/updatingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@marekdedic

Description

@marekdedic

Repro

JavaScript file (gulpfile.js):

/* eslint-env node */constgulp=require('gulp');
{"parser":"@typescript-eslint/parser","parserOptions": {"ecmaVersion":3},"env": {"browser":true},"plugins": ["@typescript-eslint"],"extends":"plugin:@typescript-eslint/recommended"}

Expected Result

I have a package with mostly TypeScript, but also agulpfile.js, which is plain old JavaScript. I was expecting this plugin to only lint the TypeScript files

Actual Result

For the gulpfile:
error Require statement not part of import statement @typescript-eslint/no-var-requires

Additional Info

I suppose this applies to any mixed codebase containing JS and TS together

Versions

packageversion
@typescript-eslint/eslint-plugin1.0.0
@typescript-eslint/parser1.0.0
TypeScript3.2.4
ESLint5.12.1
node11.7.0
npm6.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentation ("docs") that needs adding/updatingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    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