Skip to content

Recommended settings set sourceType to module #118

Closed
@marekdedic

Description

@marekdedic

The plugin:@typescript-eslint/recommended config sets

"parserOptions": {
  "sourceType": "module"
}

Might I ask why override the eslint default? I've stumbled upon this while trying to find out why no-unused-vars was throwing false positives for functions exported with /* exported fnName */ - given this override in the recommended config, it makes sense of course, but I had to go through all the settings to find out why it works fine if I enable only the rule and throws false positives if I extend the whole recommended config...

I get that modules are The Right Way™ now, but not everybody uses them - overriding the eslint default seems like a poor choice to me, because it silently changes the behaviour of eslint without the user knowing why if they don't actually go into the recommended config file.

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

No one assigned

    Labels

    enhancementNew feature or requestpackage: 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