Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running ESLint without typescript on JS-only projects #39

Merged
merged 5 commits into from
Jan 21, 2021

Conversation

phanect
Copy link
Owner

@phanect phanect commented Jan 21, 2021

Currently, eslint-plugin-editorconfig does not work if typescript package is not installed, although it is not in dependencies.
If typescript is not installed, the error occurs.
To lint JS files, typescript is not necessary. typescript is only required to lint TS files.

This PR allows running ESLint without typescript package when ESLint is not linting any TS files.

test package has no dependencies except for eslint-plugin-editorconfig, but without copying the test package outside of this project, the test package is affected by node_modules under the project root.

Before this change, eslint-plugin-typescript did not work without typescript package, but I could not be noticed about it because typescript package is already installed in the node_modules under the project root although typescript is not installed in the test package itself.
Before this commit, typescript package was required even for JS-only projects. If typescript was not found, the error occured.
@phanect phanect self-assigned this Jan 21, 2021
@phanect phanect merged commit 5ac99a7 into main Jan 21, 2021
@phanect phanect deleted the without-typescript branch January 21, 2021 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant