Skip to content

Eslint plugin should work on original files #796

Description

@danimoh

Expected Behavior

Eslint should lint the original typescript files.

Actual Behavior

Eslint lints the files after being processed by other plugins.
In the example repl, eslint lints the files after they have already been transformed by the typescript plugin.

Additional Information

Currently, the linting happens in a transform hook, i.e. after load hooks of other plugins that convert original files.
This prevents eslint from linting original files that are not javascript, like typescript via plugins like typescript-eslint.
Therefore, @rollup/plugin-eslint should give the option to already lint in a load hook itself before other load hooks.
This is however not always the desired behavior and should therefore be an option (maybe a filter that can be configured by file type?).
For example you'd want to run .vue single file components through the vue loader first before processing the extracted source code.

See here for the issue in the original repository: TrySound/rollup-plugin-eslint#42

By the way there is another, maintained eslint plugin, which already solved this issue and some others: https://github.com/robinloeffel/rollup-plugin-eslint
You should consider asking @robinloeffel, the dev of that plugin, to become a maintainer of the official plugin (which is unfortunately on a very old, unmaintained plugin).

Also see rbnts/rollup-plugin-eslint#4 for the pull request fixing this issue in @robinloeffel's plugin.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions