Code Linting and Auto-fix

VerifiedSafe

Lint and auto-fix JavaScript, CSS, and PHP code for quality and WordPress standards compliance. Detects deprecated APIs, improper escaping, and coding violations.

Sby Skills Guide Bot
DevelopmentBeginner
406/2/2026
Claude Code
#linting#code-quality#wordpress#javascript#css#php

Recommended for

Our review

Runs linters for JavaScript, CSS, and PHP to check code quality and standards compliance, with auto-fix capability.

Strengths

  • Automates code quality checks across multiple languages.
  • Provides auto-fix for JS and CSS issues.
  • Aligned with WordPress coding standards for plugin and theme development.

Limitations

  • Requires that npm dependencies and linter configurations are already set up.
  • Does not cover other languages like Python or Ruby.
  • Auto-fix may not resolve all lint errors.
When to use it

When you need to quickly verify code quality before committing or merging.

When not to use it

When the project does not use npm, or if you need deeper static analysis beyond linting.

Security analysis

Safe
Quality score85/100

Only runs pre-defined npm scripts for linting; no external calls or dangerous operations.

No concerns found

Examples

Lint all files
Run all linters (JS, CSS, PHP) and auto-fix where possible.
Lint JavaScript only
Lint JavaScript files and show any errors.
Auto-fix CSS
Auto-fix CSS linting issues using stylelint.

name: lint description: Lint and auto-fix JavaScript, CSS, and PHP files disable-model-invocation: true allowed-tools: Bash(npm run *), Bash(npx wp-env *), Bash(git *), Read, Glob

Lint JavaScript, CSS, and PHP files for code quality and standards compliance.

Lint Commands

JavaScript:

npm run lint:js

Auto-fix JavaScript:

npm run lint:js -- --fix

CSS/SCSS:

npm run lint:css

Auto-fix CSS:

npm run lint:css -- --fix

PHP (WordPress Coding Standards):

npm run lint:php

Run all linters:

npm run lint:js && npm run lint:css && npm run lint:php

What Gets Checked

JavaScript:

  • ESLint with @wordpress/eslint-plugin
  • WordPress coding standards
  • No deprecated APIs
  • Proper i18n usage

CSS:

  • Stylelint
  • BEM naming conventions
  • No duplicate selectors
  • Property ordering

PHP:

  • WordPress PHP Coding Standards (WPCS)
  • Security best practices
  • Proper escaping and sanitization
  • Documentation standards

Before Committing

Always lint before committing:

npm run lint:js -- --fix && npm run lint:css -- --fix
Related skills