node-rs
node-rs copied to clipboard
denolint: no way to use a config file and check only some folders
Hi!
I would like to include some linting rules and exclude the dist directory.
The files field seems not supported in the config file. The combination of a config file and a path as argument seem not supported either (the path is ignored).
I tried the following config file:
{
"files": {
"include": ["src/"],
"exclude": ["dist/"]
},
"rules": {
"tags": ["recommended"],
"include": [
"camelcase"
]
}
}
And the following commands:
npx denolint --config denolint.json
npx denolint --config denolint.json src/
It could be nice whether one of this (or both) could be supported.
This seems to be a duplicate of #631.
UPDATE: On a second thought, it's not an exact duplicate. Although you could use the lint function for each file, you'd have to write your own script wrapper. And if you did, you wouldn't be able to specify excluded rules. Supporting files.include in .denolint.json seems to be the easiest way how to support projects which don't want to check all files in the current directory.