-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
deno-lint: cli ignores path #631
Comments
You can create a file UPDATE: In the meanwhile, |
@prantlf - one interesting use case, not covered by the above |
@hadriann, yes, if you integrate denolint to an editor, git hook or other tool, which lints a file selection, and you need to exclude some rules using If you needd the recommended rules enabled and none of them excluded, you can write an editor plugin as it is documented: import { readFile } from 'fs/promises'
import { lint } from '@node-rs/deno-lint'
const filepath = 'lib/index.js'
const source = await readFile(filepath)
try {
const warnings = lint(filepath, source)
for (const warning of warnings) console.warn(warning)
} catch ({ message }) {
console.error(message)
} |
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
Hope you don't mind me submitting 2 separate issues at once, but I don't think this is related to #630.
It seems the denolint cli ignores the
path
parameter and lints everything recursively, starting at the cwd. Example where I point it at a file with a single script, and it lints a second script in the current directory anyway:The text was updated successfully, but these errors were encountered: