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

Bring lint pipeline up to date w/ module template #28

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Mar 21, 2024

  • Upgrade all ESLint packages to match the module template
  • Upgrade @metamask/auto-changelog
    • Reformat changelog via Prettier
  • Add depcheck and .depcheckrc.json, and run it via yarn lint

We would like to bump the development Node version to 20, but this
requires bumping `eslint-plugin-jsdoc`. The minimum version of this
package that supports Node 20 is 43.0.0, but this version expects a
minimum Node version of 16. This commit bumps the minimum Node version
to 16 and drops 12 and 14 from the CI matrix.
This is a requirement for bumping ESLint packages, since
`@metamask/eslint-config-typescript` now enables type-aware rules.
Unfortunately, the current TypeScript config file excludes test files,
so running `yarn lint` would produce an error once those packages were
upgraded.
- Upgrade all ESLint packages to match the module template
- Upgrade `@metamask/auto-changelog`
  - Reformat changelog via Prettier
- Add `depcheck` and `.depcheckrc.json`, and run it via `yarn lint`
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/code-frame@7.24.2 environment +1 29.8 kB nicolo-ribaudo
npm/@babel/generator@7.24.1 None +3 624 kB nicolo-ribaudo
npm/@babel/helper-function-name@7.23.0 None 0 21.6 kB nicolo-ribaudo
npm/@babel/helper-split-export-declaration@7.22.6 None 0 10.7 kB nicolo-ribaudo
npm/@babel/helper-validator-identifier@7.22.20 None 0 49.1 kB nicolo-ribaudo
npm/@babel/highlight@7.24.2 environment +2 41.1 kB nicolo-ribaudo
npm/@babel/parser@7.24.1 None 0 1.88 MB nicolo-ribaudo
npm/@babel/template@7.24.0 None 0 68.9 kB nicolo-ribaudo
npm/@babel/traverse@7.24.1 None +3 668 kB nicolo-ribaudo
npm/@babel/types@7.24.0 environment +2 2.45 MB nicolo-ribaudo
npm/@eslint-community/regexpp@4.10.0 None 0 431 kB eslint-community-bot
npm/@jridgewell/sourcemap-codec@1.4.15 None 0 45.9 kB jridgewell
npm/@jridgewell/trace-mapping@0.3.25 None +1 222 kB jridgewell
npm/@metamask/auto-changelog@3.4.4 Transitive: environment, filesystem, shell +14 1.07 MB metamaskbot
npm/@metamask/eslint-config-jest@12.1.0 None 0 8.72 kB metamaskbot
npm/@metamask/eslint-config-nodejs@12.1.0 None 0 94.8 kB metamaskbot
npm/@metamask/eslint-config-typescript@12.1.0 None +1 40.1 MB metamaskbot
npm/@metamask/eslint-config@12.2.0 None 0 119 kB metamaskbot
npm/@nodelib/fs.scandir@2.1.5 filesystem +2 37.1 kB mrmlnc
npm/@nodelib/fs.stat@2.0.5 filesystem 0 11.8 kB mrmlnc
npm/@nodelib/fs.walk@1.2.8 None +2 69.5 kB mrmlnc
npm/@typescript-eslint/eslint-plugin@5.62.0 Transitive: environment, filesystem +17 5.3 MB jameshenry
npm/@typescript-eslint/parser@5.62.0 Transitive: environment, filesystem +14 1.98 MB jameshenry
npm/@typescript-eslint/utils@5.62.0 Transitive: environment, filesystem +20 3.03 MB jameshenry
npm/acorn@8.11.3 None 0 531 kB marijn
npm/ansi-regex@5.0.1 None 0 5.61 kB qix
npm/call-bind@1.0.7 None +3 56.4 kB ljharb
npm/camelcase@6.3.0 None 0 11.7 kB sindresorhus
npm/debug@4.3.4 environment 0 42.4 kB qix
npm/define-data-property@1.1.4 None +2 50.4 kB ljharb
npm/depcheck@1.4.7 filesystem, unsafe Transitive: environment, eval +54 6.53 MB rumpl
npm/es-abstract@1.23.2 None +45 3.34 MB ljharb
npm/es-errors@1.3.0 None 0 12.3 kB ljharb
npm/eslint-config-prettier@8.10.0 None 0 19.9 kB lydell
npm/eslint-plugin-import@2.26.0 filesystem, unsafe Transitive: environment, network +23 2.01 MB ljharb
npm/eslint-plugin-jest@27.9.0 filesystem 0 325 kB simenb
npm/eslint-plugin-jsdoc@39.9.1 None +5 2.32 MB gajus
npm/eslint-plugin-n@15.7.0 filesystem +13 1.61 MB weiran.zsd
npm/eslint-plugin-prettier@4.2.1 None +2 108 kB jounqin
npm/eslint-plugin-promise@6.1.1 None 0 67.1 kB eslint-community-bot
npm/eslint-visitor-keys@3.4.3 None 0 32.3 kB eslintbot
npm/eslint@8.57.0 environment, filesystem Transitive: unsafe +54 6.73 MB eslintbot
npm/espree@9.6.1 None +1 98 kB eslintbot
npm/esquery@1.5.0 None 0 1 MB michaelficarra
npm/expand-tilde@2.0.2 Transitive: environment, filesystem +2 20.6 kB doowb
npm/fast-glob@3.3.2 filesystem +1 109 kB mrmlnc
npm/function-bind@1.1.2 None 0 31.4 kB ljharb
npm/get-intrinsic@1.2.4 eval 0 41.6 kB ljharb
npm/has-property-descriptors@1.0.2 None +1 22.7 kB ljharb
npm/has-proto@1.0.3 None 0 12 kB ljharb
npm/has-symbols@1.0.3 None 0 20.6 kB ljharb
npm/has-tostringtag@1.0.2 None 0 17.6 kB ljharb
npm/hasown@2.0.2 None 0 8.77 kB ljharb
npm/ignore@5.3.1 None 0 51.5 kB kael
npm/is-callable@1.2.7 None 0 28.9 kB ljharb
npm/is-core-module@2.13.1 None 0 30.2 kB ljharb
npm/is-glob@4.0.3 None +1 19.8 kB phated
npm/is-shared-array-buffer@1.0.3 None 0 18.7 kB ljharb
npm/is-string@1.0.7 None 0 19.1 kB ljharb
npm/js-yaml@3.14.1 eval Transitive: environment, filesystem +2 443 kB vitaly
npm/json5@2.2.3 None 0 235 kB jordanbtucker
npm/micromatch@4.0.4 None +5 249 kB danez
npm/prettier-plugin-packagejson@2.4.12 Transitive: environment, filesystem +14 253 kB matzkoh
npm/prettier@2.8.8 environment, filesystem, unsafe 0 11.2 MB prettier-bot
npm/resolve-dir@1.0.1 Transitive: environment, filesystem +6 55.7 kB phated
npm/source-map-js@1.2.0 None 0 140 kB 7rulnik
npm/which-typed-array@1.1.15 None +4 92.7 kB ljharb

🚮 Removed packages: npm/@babel/code-frame@7.12.11, npm/@babel/generator@7.11.6, npm/@babel/parser@7.11.5, npm/@babel/template@7.10.4, npm/@babel/traverse@7.11.5, npm/@babel/types@7.11.5, npm/@metamask/auto-changelog@2.5.0, npm/@metamask/eslint-config-jest@9.0.0, npm/@metamask/eslint-config-nodejs@9.0.0, npm/@metamask/eslint-config-typescript@9.0.1, npm/@metamask/eslint-config@9.0.0, npm/@nodelib/fs.stat@2.0.4, npm/@typescript-eslint/eslint-plugin@4.21.0, npm/@typescript-eslint/experimental-utils@4.21.0, npm/@typescript-eslint/parser@4.21.0, npm/acorn@7.4.1, npm/call-bind@1.0.2, npm/debug@4.1.1, npm/es-abstract@1.18.0, npm/eslint-config-prettier@8.1.0, npm/eslint-plugin-import@2.22.1, npm/eslint-plugin-jest@24.3.4, npm/eslint-plugin-jsdoc@36.1.0, npm/eslint-plugin-node@11.1.0, npm/eslint-plugin-prettier@3.3.1, npm/eslint@7.23.0, npm/espree@7.3.1, npm/fast-glob@3.2.5, npm/get-intrinsic@1.1.1, npm/has-symbols@1.0.2, npm/is-callable@1.2.3, npm/is-glob@4.0.1, npm/jsdoc-type-pratt-parser@1.1.1, npm/json5@2.1.3, npm/micromatch@4.0.2, npm/prettier-plugin-packagejson@2.2.11, npm/prettier@2.2.1

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
New author npm/for-each@0.3.3
New author npm/cosmiconfig@7.1.0
New author npm/resolve-dir@1.0.1
New author npm/expand-tilde@2.0.2
New author npm/global-prefix@1.0.2

View full report↗︎

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/for-each@0.3.3
  • @SocketSecurity ignore npm/cosmiconfig@7.1.0
  • @SocketSecurity ignore npm/resolve-dir@1.0.1
  • @SocketSecurity ignore npm/expand-tilde@2.0.2
  • @SocketSecurity ignore npm/global-prefix@1.0.2

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.

None yet

1 participant