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

Respect nodeVersion option set in override block #345

Merged
merged 1 commit into from
Jul 25, 2018

Conversation

pvdlg
Copy link
Contributor

@pvdlg pvdlg commented Jul 24, 2018

With the following configuration:

{
	"xo": {
		"nodeVersion": ">=6.0.0",
		"overrides": [
			{
				"files": "**/transpile/**",
				"nodeVersion": ">=8.0.0"
			}
		]
	}
}

The files in **/transpile/** were wrongly analyzed with nodeVersion: '>=6.0.0' because the nodeVersion in overrides was ignored. The code was mistakenly expecting the option to be set with engines: {node: '>=8.0.0'}.

With this PR the config above works as espected.

@pvdlg pvdlg requested a review from sindresorhus July 24, 2018 18:05
@sindresorhus sindresorhus merged commit 98dee9a into master Jul 25, 2018
@sindresorhus
Copy link
Member

Looks good :)

@sindresorhus sindresorhus deleted the fix-nodeversion-override branch July 25, 2018 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants