Skip to content
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

[Snyk] Security upgrade eslint from 4.18.2 to 5.0.0 #309

Merged
merged 9 commits into from
Oct 20, 2020

Conversation

snyk-bot
Copy link
Contributor

Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • package.json
    • package-lock.json

Vulnerabilities that will be fixed

With an upgrade:
Severity Issue Breaking Change Exploit Maturity
high severity Prototype Pollution
SNYK-JS-AJV-584908
Yes No Known Exploit
Commit messages
Package name: eslint The new version differs by 167 commits.
  • 36ced0a 5.0.0
  • 5fd5632 Build: changelog update for 5.0.0
  • 0feedfd New: Added max-lines-per-function rule (fixes #9842) (#10188)
  • daefbdb Upgrade: eslint-scope and espree to 4.0.0 (refs #10458) (#10500)
  • 077358b Docs: no-process-exit: recommend process.exitCode (#10478)
  • f93d6ff Fix: do not fail on unknown operators from custom parsers (fixes #10475) (#10476)
  • 05343fd Fix: add parens for yield statement (fixes #10432) (#10468)
  • d477c5e Fix: check destructuring for "no-shadow-restricted-names" (fixes #10467) (#10470)
  • 7a7580b Update: Add considerPropertyDescriptor option to func-name-matching (#9078)
  • e0a0418 Fix: crash on optional catch binding (#10429)
  • de4dba9 Docs: styling team members (#10460)
  • 5e453a3 Docs: display team members in tables. (#10433)
  • b1895eb Docs: Restore intentional spelling mistake (#10459)
  • a9da57d 5.0.0-rc.0
  • 3ac3df6 Build: changelog update for 5.0.0-rc.0
  • abf400d Update: Add ignoreDestructing option to camelcase rule (fixes #9807) (#10373)
  • e2b394d Upgrade: espree and eslint-scope to rc versions (#10457)
  • a370da2 Chore: small opt to improve readability (#10241)
  • 640bf07 Update: Fixes multiline no-warning-comments rule. (fixes #9884) (#10381)
  • 831c39a Build: Adding rc release script to package.json (#10456)
  • dc4075e Update: fix false negative in no-use-before-define (fixes #10227) (#10396)
  • 3721841 Docs: Add new experimental syntax policy to README (fixes #9804) (#10408)
  • d0aae3c Docs: Create docs landing page (#10453)
  • fe8bec3 Fix: fix writing config file when `source` is `prompt` (#10422)

See the full diff

Check the changes in this PR to ensure they won't cause issues with your project.


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report

🛠 Adjust project settings

📚 Read more about Snyk's upgrade and patch logic

@webholik
Copy link
Contributor

webholik commented Oct 8, 2020

The build failed because behavior of eslint has changed in v5. Now if you give a nonexistent directory to executeOnFiles() function then it causes a fatal error. The only solution is to make sure we are not passing non existent directories to eslint for linting.

@webholik webholik force-pushed the snyk-fix-e37cc6c8bce7deae81d5476f66de2cd0 branch from 41d8e78 to c50e54b Compare October 9, 2020 05:23
@webholik
Copy link
Contributor

webholik commented Oct 9, 2020

Another change in 5.0.0 is that any comment to disable linting should be just above the line where it is disabled. Earlier we had code like:

// eslint-disable-next-line no-case-declarations
 case 'graphql':
        let query = body.graphql.query,

which no longer works. I have changed this to:

case 'graphql':
    // eslint-disable-next-line no-case-declarations
   let query = body.graphql.query,

in all the codegens.

@webholik webholik merged commit 0d784b3 into develop Oct 20, 2020
@umeshp7 umeshp7 deleted the snyk-fix-e37cc6c8bce7deae81d5476f66de2cd0 branch December 15, 2020 09:27
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