Code Linting and Auto-fix

VerifiedSafe

Lint and auto-fix JavaScript, CSS, and PHP code according to WordPress standards. Detects quality and security issues automatically.

Sby Skills Guide Bot
DevelopmentIntermediate
306/2/2026
Claude Code
#linting#code-quality#wordpress

Recommended for

Our review

Lints and auto-fixes JavaScript, CSS, and PHP files using ESLint, Stylelint, and PHPCS with WordPress coding standards.

Strengths

  • Covers three major web languages
  • Provides auto-fix capability
  • Enforces WordPress coding standards
  • Integrates with npm scripts

Limitations

  • Requires npm scripts to be configured
  • Does not cover TypeScript or other languages
  • Auto-fix may not resolve all issues
When to use it

Use before committing code to ensure code quality and consistency.

When not to use it

Avoid if the project uses different linting tools or languages not supported by this setup.

Security analysis

Safe
Quality score88/100

The skill only runs standard linting npm scripts (eslint, stylelint, phpcs) with no destructive or exfiltrating actions.

No concerns found

Examples

Lint all files
Run all linters on the project to check for code quality issues.
Auto-fix JavaScript
Auto-fix JavaScript linting errors in the project.
Check PHP standards
Lint PHP files using WordPress coding standards.

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