Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

current eslint-config-react-app a little too restrictive for common use #2793

Closed
kswope opened this issue Jul 14, 2017 · 2 comments
Closed

Comments

@kswope
Copy link

kswope commented Jul 14, 2017

Its set to

'no-cond-assign': ['warn', 'always'],

when it should be ( actually the default )

'no-cond-assign': ['warn', 'except-parens'],

Why is this important. For example, it makes the proper use of iterating of global regex matches whiney.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec

var myRe = /ab*/g;
var str = 'abbcdefabh';
var myArray;
while ((myArray = myRe.exec(str)) !== null) {
  var msg = 'Found ' + myArray[0] + '. ';
  msg += 'Next match starts at ' + myRe.lastIndex;
  console.log(msg);
}
@Timer
Copy link
Contributor

Timer commented Jul 25, 2017

I don't feel super strongly about this either way; options, @gaearon?

gaearon added a commit that referenced this issue Jan 8, 2018
gaearon added a commit that referenced this issue Jan 8, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 15, 2018

The fix is out in react-scripts@1.1.0! Please let us know if something doesn’t quite work.
https://github.com/facebookincubator/create-react-app/releases/tag/v1.1.0

Pavek pushed a commit to Pavek/create-react-app that referenced this issue Jul 10, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
LishuGupta652 pushed a commit to LishuGupta652/create-react-app-1 that referenced this issue Oct 8, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants