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

Support directories to scan on the command line #647

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prantlf
Copy link
Contributor

@prantlf prantlf commented Sep 25, 2022

Allow limiting the scan to selected directories. If no directory is provided, the current directory will be scanned, as it was.

BREAKING CHANGE: If you passed a single directory to denolint to specify the project root, it will not work any more. You can pass the root directory using the argument -r,--root. However, it was used only if neither .denolintignore nor .eslintignore were found and was passed instead of either of them to the walker. Because the root directory was no file path, I think that it was useless. Nevertheless, I implemented the previous functionality using the argument -r,--root, which might be worth for other purposes later.

Attempts to fix #635.

@prantlf prantlf force-pushed the lint-dirs branch 2 times, most recently from e6c28f5 to 9fc221b Compare September 25, 2022 15:30
Allow limiting the scan to selected directories. If no directory
is provided, the current directory will be scanned, as it was.

BREAKING CHANGE: If you passed a single directory to denolint to
specify the project root, it will not work any more. You can pass
the root directory using the argument -r,--root. However, it was
used only if neither .denolintignore nor .eslintignore were found
and was passed instead of either of them to the walker. Because
the root directory was no file path, I think that it was useless.
Nevertheless, I implemented the previous functionality using the
argument -r,--root, which might be worth for other purposes later.
prantlf added a commit to prantlf/denolint that referenced this pull request Sep 28, 2022
This is the first version released after forking the [customisation] of the [original project].

* Scan specific directories ([631], [647])
* Scan directories configured by `files.include` ([635], [645])
* Fix handling of the configuration `files.exclude` ([635], [646])
* Support disabling rules in souces using `eslint-disable` ([630], [642])
* Support including and excluding rules in the `lint` method ([631], [643])
* Execute the command-line tool `denolint` without loading the Node.js VM ([648])
* Allow specifying directories, files and patterns as input for checking

[customisation]: https://github.com/prantlf/node-rs/commits/combined
[original project]: https://github.com/napi-rs/node-rs/tree/main/packages/deno-lint
[630]: napi-rs/node-rs#630
[631]: napi-rs/node-rs#631
[635]: napi-rs/node-rs#635
[642]: napi-rs/node-rs#642
[643]: napi-rs/node-rs#643
[645]: napi-rs/node-rs#645
[646]: napi-rs/node-rs#646
[647]: napi-rs/node-rs#647
[648]: napi-rs/node-rs#648
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.

denolint: no way to use a config file and check only some folders
2 participants