Closed
Description
Repro
JavaScript file (gulpfile.js
):
/* eslint-env node */
const gulp = 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 a gulpfile.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
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.0.0 |
@typescript-eslint/parser |
1.0.0 |
TypeScript |
3.2.4 |
ESLint |
5.12.1 |
node |
11.7.0 |
npm |
6.6.0 |
Metadata
Metadata
Assignees
Labels
Documentation ("docs") that needs adding/updatingDocumentation ("docs") that needs adding/updatingIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin