@phaphoso/eslint-plugin-dprint
v0.5.2
Published
An ESLint plugin that fixes code with dprint
Downloads
6,607
Readme
eslint-plugin-dprint
This is an updated fork of mysticatea/eslint-plugin-dprint. Some things are still being adjusted.
The plugin that runs dprint to format code in ESLint.
💿 Installation
Use npm or a compatible tool.
$ npm install -D eslint @phaphoso/eslint-plugin-dprint
@phaphoso/eslint-plugin-dprint
contains typescript-0.62.0.wasm because that will be not likely published to npm repository.
📖 Usage
Write your ESLint configuration. For example:
module.exports = {
extends: ["eslint:recommended", "plugin:@phaphoso/dprint/recommended"],
rules: {
"@phaphoso/dprint/dprint": [
"error",
{
config: {
// The TypeScript configuration of dprint
// See also https://dprint.dev/plugins/typescript/config/
},
},
],
},
};
Then run ESLint with --fix
!
Available Rules
| Rule | Description | | :------------------------ | :------------------------- | | @phaphoso/dprint/dprint | Format code with dprint. |
Available Configs
| Config | Description | | :----------------------------------------------- | :-------------------------------------------------------------------------------------------- | | plugin:@phaphoso/dprint/disable-conflict-rules | Disable rules where are conflicted with the @phaphoso/dprint/dprint rule. | | plugin:@phaphoso/dprint/recommended | Enable the @phaphoso/dprint/dprint rule along with the plugin:@phaphoso/dprint/disable-conflict-rules preset. |
- Put the plugin:@phaphoso/dprint/recommended or plugin:@phaphoso/dprint/disable-conflict-rules config into the last of your
extends
list in order to ensure disabling conflict rules where came from other base configurations.
📰 Changelog
See GitHub Releases.
❤️ Contributing
Welcome contributing!
Please use GitHub's Issues/PRs.
Development Tools
npm test
... Run tests. It generates code coverage intocoverage
directory.npm run watch
... Run tests when files are edited.npm version <patch|minor|major>
... Bump a new version.