Disable ava+node plugins for pure browser projects
devinrhode2 opened this issue ยท 4 comments
I think ava is great, but I am working on a purely frontend project, so have no need for it.
I think for now I can just use patch-package
, I'm not sure of a good design to "remove" or "disable" a plugin.
Maybe, it would make sense to group it along with vue
and react
- not included by default
The AVA rules only apply to AVA test files, so I don't really see the problem. Are you encountering any errors?
Not encountering any errors, just being picky ๐
One benefit would be faster npm installs.
How does XO detect ava test files? *.test.*
? (This would certainly catch more than ava test files) Perhaps if detecting ava test files is not trivial, there would also be performance boost here
(although - ava looks super nice)
Closing as it's not a real "issue" - but, we can keep discussing
One benefit would be faster npm installs.
That would be negligible.
How does XO detect ava test files?
It just checks the import statement. I don't think that has much overhead.
Maybe we could check if ava is installed in package.json, at least then the rules aren't loaded, and presumably, no parsing import statements. Still have the npm install waste, though.
Likewise, for the node
plugin, we could avoid injecting it if nodeVersion
is set to false
. Related thing I need to figure out: https://github.com/xojs/xo/pull/606/files
For now I am just using patch-package
, which isn't all that hard to maintain