| file_type | instructions | |||||
|---|---|---|---|---|---|---|
| title | Linting Instructions | |||||
| description | Master index for all linting instructions in the LightSpeed organisation. Lists and cross-references all linting instructions, config, and coding standards. | |||||
| scope | organization-wide | |||||
| applyTo | **/*.{js,ts,php,css,scss,sass,html,json,md,yml,yaml,py,sh} | |||||
| version | v2.3 | |||||
| last_updated | 2026-06-19 | |||||
| owners |
|
|||||
| tags |
|
You are a linting standards curator. Follow our linting library to audit and enforce code quality across all supported file types. Avoid skipping configured linters, adding unchecked overrides, or blocking contributors without actionable guidance.
Applies to linting across all supported file types. Covers linting library usage, agent mission, processes, checks, and best practices. Excludes language-specific rules detailed in linked linting files.
- Run configured linters/formatters (ESLint, Prettier, markdownlint, yamllint, ShellCheck, etc.) and avoid unchecked overrides.
- Provide actionable remediation; do not block without explanations.
- Align with coding standards and instruction precedence.
- Do not add the retired
referencesfront matter field; rely on inline documentation links when pointing at related content.
- Use the sections below for agent mission, process, checks, and best practices.
- Refer to language-specific linting instructions for rule details.
- Good: Execute
npm run lintin CI, surface errors with remediation steps, and respect one set of configurations per language. - Avoid: Adding temporary disables without justification or skipping configured linters on CI.
- Run repository lint scripts (e.g.,
npm run lint,npm run lint:md, actionlint for workflows). - Ensure CI lint workflows pass and configurations remain pinned.
- Check instruction precedence when multiple linting guides apply.
This directory contains comprehensive linting instructions for maintaining code quality across all LightSpeed WordPress projects. Version: v2.0 | Last Updated: 2025-11-27
Linting instructions apply to all supported file types and enforce our coding standards and automation best practices through:
- Automated Quality Checks - Continuous validation through CI/CD
- IDE Integration - Real-time feedback during development
- Standards Enforcement - Consistent code style across projects
- Error Prevention - Early detection of potential issues
Validate and enforce linting standards for all supported file types (JS, TS, Shell, Markdown, YAML, etc) across the codebase to maintain quality.
- Triggered on PRs and code updates (linting.yml).
- Analyze code changes for lint errors/warnings.
- Summarize findings and recommend fixes.
- Output remediation checklist and highlight CI blockers.
- ESLint/Prettier for JS/TS.
- ShellCheck for shell scripts.
- Markdownlint for docs.
- Yamllint for YAML.
- (Extendable with additional linters.)
- Reference LightSpeed Coding Standards.
- Output clear, actionable remediation steps.
- Never block contributors without explanation.
- Log all findings and lint results.
- Linting results summary.
- Remediation checklist.
- CI block status.
graph TD
accTitle: Linting process flow
accDescr: Shows the linting workflow from code change through pre-commit hooks, local linting, CI/CD pipeline checks, and merge approval.
A[Code Change] --> B[Pre-commit Hooks]
B --> C[Local Linting]
C --> D{Lint Passed?}
D -->|No| E[Fix Issues]
E --> C
D -->|Yes| F[Commit & Push]
F --> G[CI/CD Pipeline]
G --> H[Automated Linting]
H --> I{All Checks Pass?}
I -->|No| J[Block Merge]
I -->|Yes| K[Allow Merge]
- Coding Standards Instructions - Unified coding standards
- Workflows Instructions - CI/CD integration
- Agents Instructions - Automated linting agents
- Custom Instructions - Organization-wide settings
- Lint Workflow - GitHub Actions linting
- Linting Agent - Automated code review
- Pre-commit Hooks - Local validation setup
graph LR
accTitle: Linting toolchain overview
accDescr: Shows how source code feeds into ESLint, PHPCS, Prettier, Stylelint, and Markdownlint before reaching the CI/CD pipeline.
A[Source Code] --> B[ESLint]
A --> C[PHPCS]
A --> D[Prettier]
A --> E[Stylelint]
A --> F[Markdownlint]
B --> G[JavaScript Quality]
C --> H[PHP Standards]
D --> I[Code Formatting]
E --> J[CSS Standards]
F --> K[Markdown Quality]
G --> L[CI/CD Pipeline]
H --> L
I --> L
J --> L
K --> L
For unified coding standards and documentation practices, see:
- Apply the standards in this file and linked configs within Copilot Chat, your editor, and workflows.
- Run repository lint scripts locally (and in CI) to enforce the rules.
- Reuse pinned configs as-is; document any deviations with rationale.
- Keep remediation guidance actionable when surfacing lint findings.
When creating or updating linting guidance:
- Use clear, descriptive filenames with the
linting-*.instructions.mdextension when adding per-language supplements. - Include YAML frontmatter with
file_type: instructions,applyTo,description, and other relevant fields per the frontmatter schema. - Structure guidance with setup steps, config references, tools, scripts, and links to org-wide documentation.
- Keep this index in sync by linking any new linting files you add.
Linting instructions should evolve with our standards and requirements. When updating:
- Ensure changes align with our project guidelines and automation.
- Test the updated instruction with CI, pre-commit, and Copilot before committing.
- Consider backward compatibility with existing code.
- Document significant changes in the commit message.
- coding-standards.instructions.md — General coding standards that linting tools enforce
- languages.instructions.md — Language-specific linting configurations and rules
- quality-assurance.instructions.md — Testing standards that complement linting
📐 Schema validated by LightSpeedWP — always compliant.