Skip to content

Add linting command #455

@mikeybinns

Description

@mikeybinns

A command to run the linting tools and provide a clean simple output for the result e.g.:

ESLint: 96 Errors, 14 Warnings
Typescript: 12 Errors, 26 warnings, 2 fixable
PHP: 129 Errors, 12 Warnings, 40 fixable
Stylelint: Not configured

We should also add a parameter to the smash config for linting baseline, and then this command can throw an error if the linting is finding more errors than the existing baseline for commit checks. No baseline config would default to zero errors as the baseline.

import type { SmashConfig } from "@atomicsmash/cli";
export default {
  projectName: "launchpad",
  themePath: "public/wp-content/themes/launchpad",
  lintingBaseline: {
    eslint: {
      errors: 96,
      warnings: 14,
      fixable: 0,
    }
  }
} satisfies SmashConfig;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions