Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@inexorabletash
Copy link
Contributor

@inexorabletash inexorabletash commented Jun 5, 2024

The tools are intended for spec editors to use when authoring and/or reviewing changes. They aren't incorporated into the spec publishing process, but that could be considered in the future.

  • tools/reformat-js.py - reformats JS blocks in the spec (per a top-level .clang-format)
  • tools/lint.mjs - looks for convention violations and other glitches

The reformat-js.py tool has been applied to index.bs


Preview | Diff

The tools are intended for spec editors to use when authoring and/or
reviewing changes. They aren't incorporated into the spec publishing
process, but that could be considered in the future.

- tools/reformat_js - reformats JS blocks in the spec
- tools/lint.mjs - looks for convention violations and other glitches

The reformat_js tools has been applied to index.bs
@inexorabletash
Copy link
Contributor Author

As long promised, here are some tools I've written to help with authoring the spec. They're inconsistent and best effort, but I've found them useful. I think they're too immature to incorporate into the Makefile (does anyone use that?) or the spec publishing action, but iteration is welcome!

Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

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

Thanks a lot for these contributions!

I already test drove the lint tool and found it very helpful 👍

@inexorabletash
Copy link
Contributor Author

Also FYI I kicked off a thread with spec-prod https://lists.w3.org/Archives/Public/spec-prod/2024AprJun/0003.html - but let's start locally.

Copy link
Collaborator

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

Thanks JB. 2 opinionated style thoughts, plus easy ones.

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

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

These tools would be very useful! Thanks much @inexorabletash !

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

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

Another nit: you may want to add npm related files into .gitignore:
/tools/node_modules/
/tools/package-lock.json

@inexorabletash
Copy link
Contributor Author

Another nit: you may want to add npm related files into .gitignore: /tools/node_modules/ /tools/package-lock.json

Done in 1a1e054

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

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

LGTM! And verified in my dev environment. Thanks much!

Copy link
Collaborator

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

😎 Cool. Thanks JB.

@fdwr fdwr merged commit 74b9831 into webmachinelearning:main Jun 8, 2024
github-actions bot added a commit that referenced this pull request Jun 8, 2024
SHA: 74b9831
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@inexorabletash inexorabletash deleted the tools branch June 8, 2024 05:51
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.

4 participants