Skip to content

Remove obsolete jshint options #2409

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

Merged
merged 1 commit into from
Oct 26, 2014
Merged

Remove obsolete jshint options #2409

merged 1 commit into from
Oct 26, 2014

Conversation

enaqx
Copy link
Contributor

@enaqx enaqx commented Oct 26, 2014

This options are obsolete in JSHint 2.5.0 release

"onecase":

"regexdash":

"trailing":

Lint checker with options:
react-master-jshint

Lint checker without options:
react-enaqx-jshint

@zpao zpao added 1 - Ready and removed 1 - Ready labels Oct 26, 2014
zpao added a commit that referenced this pull request Oct 26, 2014
Remove obsolete jshint options
@zpao zpao merged commit 076a828 into facebook:master Oct 26, 2014
@zpao
Copy link
Member

zpao commented Oct 26, 2014

Thanks!

josephsavona added a commit that referenced this pull request May 15, 2024
Improves memoization for cases such as #2409: 

```javascript 

const x = []; 

useEffect(...); 

return <div>{x.map(item => <span>{item}</span>)}</div>; 

``` 

We previously thought that the `x.map(...)` call mutated `x` since its kind was 
Mutable. However, in this case we can determine that the map call cannot mutate 
`x` (or anything else): the lambda does not mutate any free variables and does 
not mutate its arguments. 

This PR adds a new flag to function signatures, used for method calls only, that 
checks for such cases. The idea is that if the receiver is the only thing that 
is mutable — including that there are no args which are function expressions 
which mutate their parameters — then we can infer the effect as a read. See 
tests which confirm that function expressions which capture or mutate their 
params bypass the optimization.
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.

2 participants