-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseNew base rule extension required to handle a TS specific casepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"semi": ["error", "never"],
}
}
import { FreeCamera } from 'babylonjs'
export default class PanCamera extends FreeCamera {
public invertX: boolean = false // valid
public invertY: boolean = false; // also valid
public pan(deltaX: number, deltaY: number): void {
this.position.x += deltaX * (this.invertX ? -1 : 1) // valid
this.position.y += deltaY * (this.invertY ? -1 : 1); // invalid
}
}
Expected Result
Error for semi
on line 5 (invertY)
Actual Result
Nothing
Additional Info
I want to disallow semicolons globally in my Typescript project, but I noticed that the rule isn't being applied to class members. It works in other places in the same file but not for that specific case.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.6.0 |
@typescript-eslint/parser |
1.6.0 |
TypeScript |
3.4.1 |
ESLint |
5.3.0 |
node |
9.11.2 |
npm |
5.6.0 |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseNew base rule extension required to handle a TS specific casepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin