Repository navigation
Add a lint process: stylelint, phpBB template checks and HTML validation - #78
Merged
Merged
Conversation
- stylelint 16 with @Stylistic for theme/*.css (print.css skipped, it is prosilver's). Clean rules are errors; cleanup rules (!important, duplicate selectors and properties, shorthand overrides, indentation, trailing whitespace) start as warnings. - lint/lint-templates.mjs: phpBB-specific checks for legacy syntax, DEFINE, definition.X, legacy operators and extension-owned variables; whitespace rules are warnings until #76 lands. - lint/validate-pages.mjs: W3C Nu checker on seven pages of a running board, errors only. - GitHub Actions runs npm run lint on pushes and pull requests. - Tooling is export-ignored so the style package stays style-only. Closes #77 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.
Closes #77.
What
@stylistic/stylelint-pluginontheme/*.css(print.cssskipped, it's prosilver's). Clean rules are errors. The cleanup rules are warnings for now:declaration-no-important,no-duplicate-selectors, duplicate properties, shorthand overrides, indentation, trailing whitespace.lint/lint-templates.mjscatches legacy<!-- IF -->/{VAR},DEFINE,definition.X(exceptSTYLESHEETS/SCRIPTS), legacy operators and extension-owned variables. Whitespace rules are warnings until Normalise indentation and trailing whitespace in templates and theme #76 lands.npm run validateruns the W3C Nu checker (--errors-only) on 7 pages of a running board. It finds a forum and topic on its own, so no board-specific ids are hard-coded. Configure it withBOARD_URLandSTYLE_ID. Local only for now..github/workflows/lint.yml: Node 24,npm ci --omit=optional(skipsvnu-jar's Java download), thennpm run lint..editorconfig, a README Development section,export-ignorefor all tooling, andnode_modules/in.gitignore.Current results (today's
develop-33)@stylistic/indentation(#76)declaration-no-importantno-duplicate-selectorsdeclaration-block-no-duplicate-properties@stylistic/no-eol-whitespace(#76)declaration-block-no-shorthand-property-overridesThe issue listed 49
!importantand 19 duplicate selectors. Those numbers came from an earlier prototype run. On today's sources the counts are 34 and 18.All of these are warnings, so
npm run lintexits 0. Checked:DEFINE,eqand{HEADERLINKS_CODE}gives 4 errors and exit 1, and an unknown CSS property exits 2.npm run validateon the local board with PBTech found 21 errors on 7 pages. The style's only error isDuplicate ID "nav-main"(Footer reuses id="nav-main", duplicating the header's ID #73). The rest are board content and extensions.git archive HEADcontains onlyREADME.md,license.txt,style.cfg,contrib/,template/andtheme/.Tooling only: no version bump or changelog entry.
🤖 Generated with Claude Code