Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Use Neutrino's extensions in the rest of packages #497

Merged
merged 3 commits into from
Nov 30, 2017

Conversation

helfi92
Copy link
Member

@helfi92 helfi92 commented Nov 29, 2017

No description provided.

@helfi92 helfi92 self-assigned this Nov 29, 2017
@eliperelman
Copy link
Member

I grepped the following usages of "extensions":

packages/eslint/index.js:            extensions: ['js', 'jsx'],
packages/jest/src/index.js:    ...neutrino.config.resolve.extensions.values().map(e => e.replace('.', ''))

@helfi92
Copy link
Member Author

helfi92 commented Nov 30, 2017

Webstorm didn't do a good job at grepping. @eliperelman I started using ag for searching files. Amazing tool. It ignores everything listed in .gitignore which is pretty neat.

Copy link
Member

@eliperelman eliperelman left a comment

Choose a reason for hiding this comment

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

The current changes are good, but I also noticed when trying to rebase my create-project PR that I needed to update the calls to .test() for some items.

Grep for all the usages of .test() and see if they need to be replaced with something like:

.test(options.test || neutrino.regexFromExtensions())

I left .test(/\.module.css$/) untouched because .css is not in the default list
and it is also presently under work (css modules not working).
@eliperelman
Copy link
Member

:shipit:

@eliperelman eliperelman merged commit 178ed42 into neutrinojs:master Nov 30, 2017
@@ -46,7 +46,7 @@ neutrino.use(eslint, {
cwd: neutrino.options.root,
useEslintrc: false,
root: true,
extensions: ['js', 'jsx'],
extensions: neutrino.options.extensions,
Copy link
Member

Choose a reason for hiding this comment

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

This means eslint will now be run against .json files too. Is this intended? (For example if people have the "enforce trailing commas" eslint rule enabled, eslint will complain unless the .json is changed to be invalid)

Copy link
Member

Choose a reason for hiding this comment

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

Have we tested that this really happens? That would be weird! It would also mean single quote properties and values would also break...I guess we should find out. If it does, we can filter json from the list. Good catch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

3 participants