Coding standards sniffing and linting utility for Aquifer projects.
To install this extension, in your Aquifer project, run:
aquifer extension-add aquifer-coder
This extension adds a few commands to the Aquifer CLI within your project:
aquifer lint
- Lints all code files in all directories containing custom code.aquifer jslint
- Lints JavaScript code files in all directories containing custom code.aquifer phplint
- Lints PHP code files in all directories containing custom code.
Running any of these commands will create a report that outlines any coding standards violations or linting errors in your codebase. A default set of eslint rules is provided, and the Drupal Coding Standards PHPCodesniffer rules are used.
You might not want to use the eslint rules provided with this extension, or the Drupal Coding Standards. This extension provides two optional parameters:
in your aquifer.json
file:
...
"extensions": {
"aquifer-coder": {
"source": "aquifer-coder",
"eslintrc": "relative/path/to/.eslintrc",
"eslintIgnore": "relative/path/to/.eslintignore"
"phpcsStandard": "relative/path/to/phpcsStandardFile"
}
}
...