Refactor ESLint configuration to enable better IDE integration#13914
Merged
gaearon merged 2 commits intofacebook:masterfrom Nov 8, 2018
NMinhNguyen:eslint-config-refactor
Merged
Refactor ESLint configuration to enable better IDE integration#13914gaearon merged 2 commits intofacebook:masterfrom NMinhNguyen:eslint-config-refactor
gaearon merged 2 commits intofacebook:masterfrom
NMinhNguyen:eslint-config-refactor
Conversation
Details of bundled changes.Comparing: e3a7b96...416e45c scheduler
Generated by 🚫 dangerJS |
NMinhNguyen
commented
Oct 21, 2018
| }, | ||
| rules: { | ||
| 'no-var': ERROR, | ||
| strict: OFF, |
Contributor
Author
There was a problem hiding this comment.
Had to turn this rule off because strict: ERROR with sourceType: 'module' causes errors such as
/react/packages/create-subscription/index.js
10:1 error 'use strict' is unnecessary inside of modules strict
| 'use strict'; | ||
|
|
||
| (function(global, factory) { | ||
| // eslint-disable-next-line no-unused-expressions |
Contributor
Author
There was a problem hiding this comment.
Instead of adding these to each UMD bundle, I could add another overrides section disabling this rule. Something like
// .eslintrc.js
{
overrides: [
// ...
{
files: ['packages/*/npm/umd/*.js'],
rules: {
'no-unused-expressions': OFF,
}
}
]
}
mashoshyna-test
approved these changes
Nov 8, 2018
Collaborator
|
Thanks! |
jetoneza
pushed a commit
to jetoneza/react
that referenced
this pull request
Jan 23, 2019
…ook#13914) * Refactor ESLint configuration to enable better IDE integration * Minor tweaks
n8schloss
pushed a commit
to n8schloss/react
that referenced
this pull request
Jan 31, 2019
…ook#13914) * Refactor ESLint configuration to enable better IDE integration * Minor tweaks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per #11794 (comment), this change ensures a single ESLint config is used for source code, Node.js scripts, and
npmfiles via theoverridesoption, which should allow IDEs to provide lint feedback inline without having to useyarn linc.