Skip to content

Setting up WordPressCS to work in Atom

jrfnl edited this page Aug 20, 2023 · 1 revision
  • Install PHP_CodeSniffer and the WordPress Coding Standards per the installation instructions for a global install in the readme.
  • Install linter-phpcs via Atom's package manager.
  • Run which phpcs to get your phpcs executable path.
  • Open the linter-phpcs package settings; enter your phpcs executable path and one of the coding standards specified above (e.g. WordPress, etc.).
  • Below these settings find the Tab Width setting and change it to 4.

Atom Linter WordPress Coding Standards configuration

Atom Linter in action using WordPress Coding Standards

  • Note that certain items within PHPCS config file can cause linting to fail, see linter-phpcs #95 for more details.