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

eslint: Throw if preset used after compile rule already defined #939

Merged
merged 1 commit into from
Jun 7, 2018
Merged

eslint: Throw if preset used after compile rule already defined #939

merged 1 commit into from
Jun 7, 2018

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Jun 7, 2018

Presets such as @neutrinojs/web and @neutrinojs/react check to see if a lint rule is defined, and if so, adapt its settings to suit the particular environment/framework. This means that the lint presets must be defined prior to the compile presets or the final eslint configuration will not be correct.

Previously if the ordering was incorrect there would be no error message, causing confusion when eslint wasn't behaving as expected.

Fixes #800.
Refs #763.

Presets such as `@neutrinojs/web` and `@neutrinojs/react` check to
see if a `lint` rule is defined, and if so, adapt its settings to
suit the particular environment/framework. This means that the lint
presets must be defined prior to the compile presets or the final
eslint configuration will not be correct.

However previously this broken ordering would not result in an error
message, causing confusion when eslint wasn't behaving as expected.

Fixes #800.
Refs #763.
@edmorley edmorley added this to the v9 milestone Jun 7, 2018
@edmorley edmorley self-assigned this Jun 7, 2018
@edmorley edmorley requested a review from eliperelman June 7, 2018 12:56
@edmorley edmorley merged commit 0c615fc into neutrinojs:master Jun 7, 2018
@edmorley edmorley deleted the ensure-lint-presets-first branch June 7, 2018 15:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants