Skip to content

[no-unused-expressions] directive detection does not work on modules #1283

@HolgerJeromin

Description

@HolgerJeromin

Repro

{
  "rules": {
    "@typescript-eslint/no-unused-expressions": "error"
  }
}
module MyModule {
    'use strict';
}

Expected Result
Should not complain

Actual Result

demo.ts(1,5): error @typescript-eslint/no-unused-expressions : 
Expected an assignment or function call and instead saw an expression.

Same problem was happening with no-unused-expressions from eslint (but i upgraded to ts-eslint one).

Versions

package version
@typescript-eslint/eslint-plugin 2.8.0
@typescript-eslint/parser 2.8.0
TypeScript 3.7.2
ESLint 6.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: 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