# Linting
Bricks is configured with some linting scripts, used to keep the code clean and nicely formatted.
A general script to run all linters at once is
It runs ESlint, Stylelint and phpcs at once.
WARNING
Please note that in order to run phpcs
you need to install Composer dependencies, by running composer install
.
Individual scripts for each linter are also available.
# ESLint
JavaScript files are linted with ESLint (opens new window), configured with eslint-config-standard
(opens new window) preset.
The configuration is defined in .eslintrc.js
.
# Stylelint
CSS and Sass files are linted with Stylelint (opens new window), configured with stylelint-config-standard
(opens new window) preset, and stylelint-config-recess-order
(opens new window) to sort properties in a logical and ordered way.
The configuration is defined in stylelint.config.js
.
# phpcs
PHP files are linted with phpcs (opens new window), configured with WordPress Coding Standards (opens new window) preset.
The configuration is defined in phpcs.xml.dist
.
WARNING
Please note that in order to run phpcs
you need to install Composer dependencies, by running composer install
.