The Easiest Way to Use Any Coding Standard 🐘
Visual Studio Code extension to format and lint your PHP code using EasyCodingStandard.
- Use PHP-CS-Fixer | PHP_CodeSniffer - anything you like
- Next run under few seconds with caching
- Skipping files for specific checkers
- Prepared checker sets - PSR2, PSR12, Symfony, Common, Symplify and more...
Are you already using another tool?
- How to Migrate From PHP_CodeSniffer to EasyCodingStandard in 7 Steps
- How to Migrate From PHP-CS-Fixer to EasyCodingStandard in 6 Steps
This extension depends on Symplify/EasyCodingStandard to be installed locally in the project or globally by specifying configPath
in the settings.
CMD/CTRL
+Shift
+P
->EasyCodingStandard
By the default configPath
takes precedence over ruleSet
.
ecs.executablePath
- The path to the EasyCodingStandard executable. Default:vendor/bin/ecs
ecs.configPath
- The path to the configuration file. Default:easy-coding-standard.yml
ecs.ruleSet
- A prepared ruleset to use. Default:psr2
An issue can occur either from vscode extension or from EasyCodingStandard. Please manually verify where the issue originates by using the EasyCodingStandard CLI and file a request accordingly.
Prettier (default settings) is used to maintain formatting. TSLint for linting. Each commit is automatically processed by using a git hook via lint-staged and husky.
Testing is done with the help of jest and jest-extended.
# Test commands:
# Install necessary testing dependencies
npm run test:install
# Run all tests
npm run test
# Run in watch mode
npm run test -- --watch
# Create a coverage report
npm run test:coverage
Thanks goes to these wonderful people (emoji key):
Anton Zdanov 💻 📖 🤔 🚇 📦 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!