neutrinojs / neutrino Public
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
Specify root option for monorepo scripts and project creation #1041
Specify root option for monorepo scripts and project creation #1041
Conversation
I know this is similar to the other PR, but I did have an extra change I wanted to check. |
I think we also need to set root
for the webpack.config.js
, jest.config.js
, mocha.config.js
and karma.conf.js
templates too. Thoughts?
(Happy for that to be in this PR or a new one)
.eslintrc.js
Outdated
@@ -1,3 +1,8 @@ | |||
const neutrino = require('./packages/neutrino'); | |||
|
|||
module.exports = neutrino(require('./.neutrinorc')).eslintrc(); | |||
module.exports = neutrino({ | |||
use: require('./.neutrinorc'), // eslint-disable-line global-require |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should move the require()
to the top of the file and save needing the eslint-disable-line
? (in this file and the others)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing.
(Sorry I'd missed the re-review request email notification) |
Fixes #973.
I'm not sure how this wasn't happening before, but when running without the
--no-eslintrc
bits in the precommit I would get errors around eslint being unable to load the config file. I think this was related to eslint trying to load these nested eslintrc files to lint their subdirectories, which we definitely don't want during development.So now I added
--no-eslintrc -c ./.eslintrc.js
so it will lint the monorepo using only our top-level eslintrc. When you run it like this though, eslint gives you warnings that the create-project eslintrc files are ignored by default, so the eslintignore line addition is to add these back to being linted, but not used as config.