Skip to content
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

Merged
merged 5 commits into from Aug 30, 2018

Conversation

eliperelman
Copy link
Member

@eliperelman eliperelman commented Aug 23, 2018

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.

@eliperelman eliperelman self-assigned this Aug 23, 2018
@edmorley edmorley added this to the v9 milestone Aug 23, 2018
@edmorley edmorley added the bug label Aug 23, 2018
@eliperelman eliperelman requested a review from edmorley Aug 24, 2018
@eliperelman
Copy link
Member Author

@eliperelman eliperelman commented Aug 24, 2018

I know this is similar to the other PR, but I did have an extra change I wanted to check.

Copy link
Member

@edmorley edmorley left a comment

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
Copy link
Member

@edmorley edmorley Aug 24, 2018

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)

Copy link
Member Author

@eliperelman eliperelman Aug 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

@eliperelman eliperelman requested a review from edmorley Aug 24, 2018
Copy link
Member

@edmorley edmorley left a comment

👍

@edmorley
Copy link
Member

@edmorley edmorley commented Aug 28, 2018

(Sorry I'd missed the re-review request email notification)

@eliperelman eliperelman changed the title Specify root option in eslintrc templates Specify root option for monorepo scripts and project creation Aug 30, 2018
@eliperelman eliperelman merged commit 6168a83 into neutrinojs:master Aug 30, 2018
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants