Glavin001 / Glavin001/tslint-clean-code

No side effects in array filter

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
rule
Dominant language
TypeScript
Stars
175
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Example of bad code:

```
const arr = [
{ myProp: 1 },
{ myProp: 2 },
];
const newArr = arr.filter(item => {
item.anotherProp = item.myProp * 2;
return item.anotherProp > 3;
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.