Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: freaktechnik/eslint-plugin-array-func
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0dfca75ac4d5a8ddc874695e45c1a7def9f9065d
Choose a base ref
...
head repository: freaktechnik/eslint-plugin-array-func
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9c60262dfde2338d67edc5fb48d137b61b903cd2
Choose a head ref
  • 16 commits
  • 7 files changed
  • 2 contributors

Commits on Apr 20, 2020

  1. fix: upgrade ava from 3.6.0 to 3.7.0

    Snyk has created this PR to upgrade ava from 3.6.0 to 3.7.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    snyk-bot authored and freaktechnik committed Apr 20, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4629cae View commit details

Commits on Apr 26, 2020

  1. [Snyk] Upgrade ava from 3.7.0 to 3.7.1 (#56)

    * fix: upgrade ava from 3.7.0 to 3.7.1
    
    Snyk has created this PR to upgrade ava from 3.7.0 to 3.7.1.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade ava from 3.7.0 to 3.7.1
    
    Snyk has created this PR to upgrade ava from 3.7.0 to 3.7.1.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    snyk-bot authored Apr 26, 2020
    Copy the full SHA
    91b14b5 View commit details
  2. fix: upgrade @typescript-eslint/parser from 2.27.0 to 2.28.0 (#54)

    Snyk has created this PR to upgrade @typescript-eslint/parser from 2.27.0 to 2.28.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/@typescript-eslint/parser
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    Co-authored-by: Martin Giger <martin@humanoids.be>
    snyk-bot and freaktechnik authored Apr 26, 2020
    Copy the full SHA
    1e82c00 View commit details

Commits on May 9, 2020

  1. [Snyk] Fix for 1 vulnerabilities (#57)

    * fix: package.json, package-lock.json & .snyk to reduce vulnerabilities
    
    
    The following vulnerabilities are fixed with a Snyk patch:
    - https://snyk.io/vuln/SNYK-JS-LODASH-567746
    
    * fix: package.json, package-lock.json & .snyk to reduce vulnerabilities
    
    
    The following vulnerabilities are fixed with a Snyk patch:
    - https://snyk.io/vuln/SNYK-JS-LODASH-567746
    
    * fix: package.json, package-lock.json & .snyk to reduce vulnerabilities
    
    
    The following vulnerabilities are fixed with a Snyk patch:
    - https://snyk.io/vuln/SNYK-JS-LODASH-567746
    snyk-bot authored May 9, 2020
    Copy the full SHA
    6bd7598 View commit details
  2. Copy the full SHA
    6f0e01c View commit details
  3. chore: fix snyk indent

    freaktechnik committed May 9, 2020
    Copy the full SHA
    09c3648 View commit details
  4. [Snyk] Fix for 1 vulnerabilities (#58)

    * fix: package.json, package-lock.json & .snyk to reduce vulnerabilities
    
    
    The following vulnerabilities are fixed with a Snyk patch:
    - https://snyk.io/vuln/SNYK-JS-LODASH-567746
    
    * fix: package.json, package-lock.json & .snyk to reduce vulnerabilities
    
    
    The following vulnerabilities are fixed with a Snyk patch:
    - https://snyk.io/vuln/SNYK-JS-LODASH-567746
    
    * fix: package.json, package-lock.json & .snyk to reduce vulnerabilities
    
    
    The following vulnerabilities are fixed with a Snyk patch:
    - https://snyk.io/vuln/SNYK-JS-LODASH-567746
    snyk-bot authored May 9, 2020
    Copy the full SHA
    4a1ab61 View commit details

Commits on May 10, 2020

  1. [Snyk] Upgrade @typescript-eslint/parser from 2.28.0 to 2.31.0 (#59)

    * fix: upgrade @typescript-eslint/parser from 2.28.0 to 2.31.0
    
    Snyk has created this PR to upgrade @typescript-eslint/parser from 2.28.0 to 2.31.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/@typescript-eslint/parser
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade @typescript-eslint/parser from 2.28.0 to 2.31.0
    
    Snyk has created this PR to upgrade @typescript-eslint/parser from 2.28.0 to 2.31.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/@typescript-eslint/parser
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    snyk-bot authored May 10, 2020
    Copy the full SHA
    8f28a4c View commit details
  2. [Snyk] Upgrade ava from 3.7.1 to 3.8.1 (#60)

    * fix: upgrade ava from 3.7.1 to 3.8.1
    
    Snyk has created this PR to upgrade ava from 3.7.1 to 3.8.1.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade ava from 3.7.1 to 3.8.1
    
    Snyk has created this PR to upgrade ava from 3.7.1 to 3.8.1.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    Co-authored-by: Martin Giger <martin@humanoids.be>
    snyk-bot and freaktechnik authored May 10, 2020
    Copy the full SHA
    ad1dcb7 View commit details

Commits on May 19, 2020

  1. [Snyk] Upgrade typescript from 3.8.3 to 3.9.2 (#62)

    * fix: upgrade typescript from 3.8.3 to 3.9.2
    
    Snyk has created this PR to upgrade typescript from 3.8.3 to 3.9.2.
    
    See this package in NPM:
    https://www.npmjs.com/package/typescript
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade typescript from 3.8.3 to 3.9.2
    
    Snyk has created this PR to upgrade typescript from 3.8.3 to 3.9.2.
    
    See this package in NPM:
    https://www.npmjs.com/package/typescript
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    snyk-bot authored May 19, 2020
    Copy the full SHA
    395741b View commit details
  2. [Snyk] Upgrade @typescript-eslint/parser from 2.31.0 to 2.33.0 (#63)

    * fix: upgrade @typescript-eslint/parser from 2.31.0 to 2.33.0
    
    Snyk has created this PR to upgrade @typescript-eslint/parser from 2.31.0 to 2.33.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/@typescript-eslint/parser
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade @typescript-eslint/parser from 2.31.0 to 2.33.0
    
    Snyk has created this PR to upgrade @typescript-eslint/parser from 2.31.0 to 2.33.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/@typescript-eslint/parser
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    snyk-bot authored May 19, 2020
    Copy the full SHA
    08fc374 View commit details
  3. [Snyk] Upgrade snyk from 1.319.2 to 1.321.0 (#64)

    * fix: upgrade snyk from 1.319.2 to 1.321.0
    
    Snyk has created this PR to upgrade snyk from 1.319.2 to 1.321.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/snyk
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade snyk from 1.319.2 to 1.321.0
    
    Snyk has created this PR to upgrade snyk from 1.319.2 to 1.321.0.
    
    See this package in NPM:
    https://www.npmjs.com/package/snyk
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    snyk-bot authored May 19, 2020
    Copy the full SHA
    87204e5 View commit details
  4. [Snyk] Upgrade ava from 3.8.1 to 3.8.2 (#65)

    * fix: upgrade ava from 3.8.1 to 3.8.2
    
    Snyk has created this PR to upgrade ava from 3.8.1 to 3.8.2.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    * fix: upgrade ava from 3.8.1 to 3.8.2
    
    Snyk has created this PR to upgrade ava from 3.8.1 to 3.8.2.
    
    See this package in NPM:
    https://www.npmjs.com/package/ava
    
    See this project in Snyk:
    https://app.snyk.io/org/freaktechnik/project/9d7e55df-a6bc-453c-9e81-1c3dd78fd733?utm_source=github&utm_medium=upgrade-pr
    
    Co-authored-by: Martin Giger <martin@humanoids.be>
    snyk-bot and freaktechnik authored May 19, 2020
    Copy the full SHA
    2d616f9 View commit details
  5. Copy the full SHA
    349ee36 View commit details
  6. Copy the full SHA
    98ab902 View commit details
  7. 3.1.6

    freaktechnik committed May 19, 2020
    Copy the full SHA
    9c60262 View commit details
Showing with 2,694 additions and 283 deletions.
  1. +1 −1 .editorconfig
  2. +56 −0 .snyk
  3. +4 −0 README.md
  4. +2,608 −271 package-lock.json
  5. +13 −9 package.json
  6. +1 −1 rules/prefer-flat-map.js
  7. +11 −1 test/rules/prefer-flat-map.js
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -14,6 +14,6 @@ block_comment_start = /*
block_comment = *
block_comment_end = */

[{package.json,.travis.yml,package-lock.json,codecov.yml,.all-contributorsrc,README.md}]
[{package.json,.travis.yml,package-lock.json,codecov.yml,.all-contributorsrc,README.md,.snyk}]
indent_style = space
indent_size = 2
56 changes: 56 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.14.1
ignore: {}
# patches apply the minimum changes required to fix a vulnerability
patch:
SNYK-JS-LODASH-567746:
- ava > lodash:
patched: '2020-05-03T04:29:42.914Z'
- eclint > lodash:
patched: '2020-05-03T04:29:42.914Z'
- eslint > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@typescript-eslint/parser > @typescript-eslint/typescript-estree > lodash':
patched: '2020-05-03T04:29:42.914Z'
- eslint > inquirer > lodash:
patched: '2020-05-03T04:29:42.914Z'
- eslint > table > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@typescript-eslint/parser > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > lodash':
patched: '2020-05-03T04:29:42.914Z'
- '@ava/babel > babel-plugin-espower > @babel/generator > lodash':
patched: '2020-05-03T04:29:42.914Z'
- nyc > istanbul-lib-instrument > @babel/core > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@freaktechnik/eslint-config-node > @freaktechnik/eslint-config-base > eslint-plugin-jsdoc > lodash':
patched: '2020-05-03T04:29:42.914Z'
- '@freaktechnik/eslint-config-test > eslint-plugin-ava > enhance-visitors > lodash':
patched: '2020-05-03T04:29:42.914Z'
- eclint > gulp-reporter > junit-report-builder > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@ava/babel > @babel/core > @babel/helpers > @babel/traverse > lodash':
patched: '2020-05-03T04:29:42.914Z'
- '@ava/babel > babel-plugin-espower > @babel/generator > @babel/types > lodash':
patched: '2020-05-03T04:29:42.914Z'
- nyc > istanbul-lib-instrument > @babel/core > @babel/traverse > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@freaktechnik/eslint-config-test > @freaktechnik/eslint-config-node > @freaktechnik/eslint-config-base > eslint-plugin-jsdoc > lodash':
patched: '2020-05-03T04:29:42.914Z'
- '@ava/babel > @babel/core > @babel/helpers > @babel/traverse > @babel/generator > lodash':
patched: '2020-05-03T04:29:42.914Z'
- nyc > istanbul-lib-instrument > @babel/core > @babel/helpers > @babel/traverse > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@ava/babel > @babel/core > @babel/helpers > @babel/traverse > @babel/helper-split-export-declaration > @babel/types > lodash':
patched: '2020-05-03T04:29:42.914Z'
- nyc > istanbul-lib-instrument > @babel/core > @babel/helpers > @babel/traverse > @babel/generator > lodash:
patched: '2020-05-03T04:29:42.914Z'
- nyc > istanbul-lib-instrument > @babel/core > @babel/helpers > @babel/traverse > @babel/helper-split-export-declaration > @babel/types > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@ava/babel > @babel/core > @babel/helpers > @babel/traverse > @babel/helper-function-name > @babel/helper-get-function-arity > @babel/types > lodash':
patched: '2020-05-03T04:29:42.914Z'
- nyc > istanbul-lib-instrument > @babel/core > @babel/helpers > @babel/traverse > @babel/helper-function-name > @babel/helper-get-function-arity > @babel/types > lodash:
patched: '2020-05-03T04:29:42.914Z'
- '@freaktechnik/eslint-config-node > @freaktechnik/eslint-config-base > eslint-plugin-unicorn > lodash':
patched: '2020-05-09T13:44:10.269Z'
- '@freaktechnik/eslint-config-test > @freaktechnik/eslint-config-node > @freaktechnik/eslint-config-base > eslint-plugin-unicorn > lodash':
patched: '2020-05-09T13:44:10.269Z'
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -196,6 +196,8 @@ This rule is auto fixable.
Code that triggers this rule:
```js
const flattenedAndMapped = array.map((p) => p).flat();

const flatWithDefaultDepth = array.map((r) => r).flat(1);
```

Code that doesn't trigger this rule:
@@ -209,6 +211,8 @@ const mapped = array.map((r) => r + 1);
const mappedThenFlattened = array.flat().map((r) => r + 1);

const flatMappedWithExtra = array.map((r) => r + 1).reverse().flat();

const flatWithDepth = array.map((p) => p).flat(99);
```

### `prefer-flat`
Loading