Closed sindresorhus closed 7 years ago
Good point, never ran in on such projects.
can i help with this?
can i help with this?
You can, but I think quite some things have to be changed for this. I'm always open for a good PR.
I have not dig deep into it but i think we should throw err
from here https://github.com/SamVerschueren/clinton/blob/master/lib/config.js#L21 if no package.json
found
am i right?
The question is, should we still lint if no package.json
is present?
i think we should, it will then lint only on the basis of opts
I believe clinton
will still fail on rules depending on package.json
like this one. Might have to check if package.json
exists, like I did in the travis rule.
Should we add something like metadata
to every rule? Little bit like ESLint which will define some dependencies or something. So you can specify which files should be present in order to execute the rule.
Just brainstorming here. Would like some more opinions on how we can solve this elegantly.
I'm ignoring projects without package.json
for now. I'm open for suggestions on how to improve for projects with package.json
. But my main focus is JavaScript projects.