Repository navigation
Lint locally with make lint instead of in CI - #12
Merged
Merged
Conversation
With esversion 6, jshint rejected syntax such as ?. and ?? that Apps Script's V8 runtime runs. 11 (ES2020) is the highest jshint 2.13 can parse: it fails on ES2021's ||= and ES2022's class fields at any esversion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
make lint needed jshint, htmlhint, markdownlint, yamllint, and jsonlint installed globally. It now runs jshint and markdownlint-cli2 through npx at pinned versions, so it needs only Node.js, which clasp needs too. htmlhint, yamllint, and jsonlint no longer run: they checked templates that rarely change, YAML syntax, and a codemeta.json that the release scripts already parse. actionlint checks the GitHub Actions workflows, which yamllint couldn't. It is a separate program, so make lint runs it when it is installed and says it was skipped when it isn't. .github/actionlint.yaml ignores two problems that bad-link-reporter.yml and iga.yml copy from the Baler and IGA sample workflows, so the copies can stay identical to the samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Linting in CI found problems only after they were pushed. make lint checks Code.js, the Markdown files, and the workflows before a push, needs only Node.js, and is optional. The workflow and the htmlhint, jsonlint, and yamllint configuration files that only it used are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Makefile stopped before running any target, even "make help", unless curl, git, jq, clasp, and npx were all installed. Now only git and jq, which set the variables every target uses, are required up front. watch requires clasp, lint requires npx, and report and joke require curl, each when it runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CONTRIBUTING.md describes make lint, what it needs, and the commands to run directly where the system make is older than GNU Make 3.82, as on macOS. docs/releasing.md and the [Unreleased] entry in CHANGELOG.md describe linting as it works now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build on pull requests reported only whether the site built, with no preview, and its failures showed up after pushing. A build that breaks on main is harmless: deploy-site refuses to publish it, so the site stays at its last good version until a fix lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes linting optional and local, with nothing new to install, and removes linting and the docs build on pull requests from CI. Lint failures in CI only showed up after a push, and the Lint workflow was one more entry in the Actions list.
Changes
make lintruns jshint onCode.jsand markdownlint-cli2 on the Markdown files throughnpx, at pinned versions. It needs only Node.js, whichclaspneeds too. If actionlint is installed, it also checks the GitHub Actions workflows; if not, it says so and still succeeds.codemeta.jsonthat the release scripts already parse, and YAML syntax that actionlint covers for the workflows.?.and??, which Apps Script’s V8 runtime runs, no longer fail. jshint 2.13 can’t parse anything newer at any setting..github/actionlint.yamlignores two problems thatbad-link-reporter.ymlandiga.ymlcopy from the Baler and IGA sample workflows, so those copies can stay identical to upstream..htmlhintrc,.jsonlintrc.json, and.yamllint.yml.mainisn’t deployed, so the live site stays at its last good version.gitandjqup front.make helpworks withoutclasp;watch,lint,report, andjokeeach check for the program they use.CONTRIBUTING.mdhas a “Checking your changes” section, with thenpxcommands to run directly on macOS, whosemakeis too old for this Makefile.docs/releasing.mdand the[Unreleased]section ofCHANGELOG.mdare updated.Testing
make lintpasses with and without actionlint installed. With it installed, a workflow error planted for the test mademake lintfail.make helpruns with onlygitandjqonPATH.watch,lint, andjokeeach name the program they’re missing.npxcommands inCONTRIBUTING.mdpass when run directly.🤖 Generated with Claude Code