Skip to content

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