Назад към всички

lint

// Lint and auto-fix JavaScript, CSS, and PHP files

$ git log --oneline --stat
stars:5
forks:1
updated:March 4, 2026
SKILL.mdreadonly
SKILL.md Frontmatter
namelint
descriptionLint and auto-fix JavaScript, CSS, and PHP files
disable-model-invocationtrue
allowed-toolsBash(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