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

Add lint step to dev and CI #41

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Add lint step to dev and CI #41

merged 2 commits into from
Aug 31, 2023

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Aug 21, 2023

  • Add Yarn v3 (same as module template)
  • Rely on Node 16 (same as module template)
  • Add a private manifest, and add Prettier as a dev dependency
  • Add the same lint script from the module template
  • Use the same Prettier config that we use in the module template
  • Run all Markdown files through Prettier, applying any auto-fixes
  • Ensure main contains Markdown files that pass lint by configuring
    GitHub Actions to run the lint script

@socket-security
Copy link

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

Packages Version New capabilities Transitives Size Publisher
@lavamoat/preinstall-always-fail 1.0.0 None +0 2.17 kB kumavis
@lavamoat/allow-scripts 2.3.1 network, filesystem, shell, environment +140 8.79 MB lgbot
prettier-plugin-packagejson 2.4.5 filesystem, environment +72 12.6 MB matzkoh
prettier 2.8.8 filesystem, environment +0 11.2 MB prettier-bot

@socket-security
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.

Issue Package Version Note Source
Filesystem access @lavamoat/allow-scripts 2.3.1
Install scripts @lavamoat/allow-scripts 2.3.1
New author @lavamoat/allow-scripts 2.3.1
Shell access @lavamoat/allow-scripts 2.3.1
Filesystem access escalade 3.1.1
Unmaintained escalade 3.1.1
  • Last Publish: 10/13/2020, 6:03:44 AM
Filesystem access fs.realpath 1.0.0
Unmaintained fs.realpath 1.0.0
  • Last Publish: 6/15/2016, 6:39:05 PM
Filesystem access isexe 2.0.0
Filesystem access mkdirp 1.0.4
Filesystem access node-gyp 9.4.0
Network access node-gyp 9.4.0
Shell access node-gyp 9.4.0
Filesystem access path-scurry 1.10.1
Filesystem access prettier 2.8.8
Filesystem access resolve 1.22.4
Filesystem access tar 6.1.15
Filesystem access y18n 5.0.8
Unmaintained y18n 5.0.8
  • Last Publish: 4/7/2021, 6:57:33 PM
Filesystem access yargs 16.2.0
Filesystem access yargs-parser 20.2.9
Unmaintained yargs-parser 20.2.9
  • Last Publish: 8/4/2022, 9:13:43 PM
Filesystem access cacache 17.1.4
Filesystem access glob 7.2.3
Filesystem access @npmcli/fs 3.1.0
Filesystem access bin-links 4.0.1
Install scripts @lavamoat/aa 3.1.2
Network access make-fetch-happen 11.1.1
Network access minipass-fetch 3.0.4
New author merge-stream 2.0.0
Unmaintained merge-stream 2.0.0
  • Last Publish: 5/23/2019, 1:36:45 PM
New author json-parse-even-better-errors 3.0.0
New author @npmcli/node-gyp 3.0.0
New author are-we-there-yet 3.0.1
New author npmlog 6.0.2
New author read-cmd-shim 4.0.0
New author npm-normalize-package-bin 3.0.1
New author which 3.0.1
New author write-file-atomic 5.0.1
New author ms 2.1.2
Unmaintained ms 2.1.2
  • Last Publish: 9/15/2021, 3:40:43 PM
New author wrappy 1.0.2
Unmaintained wrappy 1.0.2
  • Last Publish: 4/22/2021, 11:17:34 PM
New author nopt 6.0.0
New author exponential-backoff 3.1.1
No README @pkgr/utils 2.4.2
Shell access foreground-child 3.1.1
Unmaintained string_decoder 1.3.0
  • Last Publish: 8/7/2019, 9:20:36 AM
Unmaintained indent-string 4.0.0
  • Last Publish: 4/17/2021, 5:10:20 PM
Unmaintained function-bind 1.1.1
  • Last Publish: 8/28/2017, 7:51:35 AM
Unmaintained queue-microtask 1.2.3
  • Last Publish: 3/22/2021, 5:37:10 AM
Unmaintained define-lazy-prop 3.0.0
  • Last Publish: 4/14/2021, 7:54:05 AM
Unmaintained sort-object-keys 1.1.3
  • Last Publish: 12/10/2019, 10:27:34 PM
Unmaintained delegates 1.0.0
  • Last Publish: 12/14/2015, 7:56:09 PM
Unmaintained retry 0.12.0
  • Last Publish: 6/21/2021, 7:45:32 AM
Unmaintained glob-parent 5.1.2
  • Last Publish: 9/29/2021, 10:14:24 PM
Unmaintained path-parse 1.0.7
  • Last Publish: 5/25/2021, 12:57:37 PM
Unmaintained supports-preserve-symlinks-flag 1.0.0
  • Last Publish: 1/3/2022, 7:22:56 AM
Unmaintained picomatch 2.3.1
  • Last Publish: 1/2/2022, 5:18:24 PM
Unmaintained fill-range 7.0.1
  • Last Publish: 4/8/2019, 1:42:36 PM
Unmaintained balanced-match 1.0.2
  • Last Publish: 4/6/2021, 12:53:21 PM
Unmaintained merge2 1.4.1
  • Last Publish: 6/3/2020, 7:39:10 AM
Unmaintained ansi-regex 5.0.1
  • Last Publish: 3/27/2022, 1:29:44 PM

- Add Yarn v3 (same as module template)
- Rely on Node 16 (same as module template)
- Add a private manifest, and add Prettier as a dev dependency
- Add the same `lint` script from the module template
- Use the same Prettier config that we use in the module template
- Run all Markdown files through Prettier, applying any auto-fixes
- Ensure `main` contains Markdown files that pass lint by configuring
  GitHub Actions to run the `lint` script
@mcmire mcmire marked this pull request as ready for review August 21, 2023 23:00
@mcmire
Copy link
Contributor Author

mcmire commented Aug 21, 2023

There are other projects we could use for linting Markdown:

It'd also be cool if we could verify that all of the examples given in various Markdown documents are valid (i.e. executable). There's a project called runmd that sort of does this, but it only works on JavaScript and is implemented in a fairly hacky way. I would be interested in potentially rewriting this using something like the remark toolkit to parse code blocks from Markdown into temp files, then transpile those files via swc or something, then run the resulting code in a Node VM. EDIT: I found literate-ts and will play around with this.

But... I figured this was a good start for now!

@Gudahtt
Copy link
Member

Gudahtt commented Aug 29, 2023

Looks great! Lots of conflicts now though

@mcmire
Copy link
Contributor Author

mcmire commented Aug 30, 2023

Ready for review again.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mcmire mcmire merged commit 8a49e4d into main Aug 31, 2023
2 of 3 checks passed
@mcmire mcmire deleted the add-lint-step branch August 31, 2023 16:01
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