The plugin that runs dprint to format code in ESLint.
Use npm or a compatible tool.
$ npm install -D eslint eslint-plugin-dprint
eslint-plugin-dprintcontains typescript-0.32.4.wasm because that will be not likely published to npm repository.
Write your ESLint configuration. For example:
module.exports = {
extends: ["eslint:recommended", "plugin:dprint/recommended"],
rules: {
"dprint/dprint": [
"error",
{
config: {
// The TypeScript configuration of dprint
// See also https://dprint.dev/plugins/typescript/config/
},
},
],
},
};Then run ESLint with --fix!
| Rule | Description |
|---|---|
| dprint/dprint | Format code with dprint. |
| Config | Description |
|---|---|
| plugin:dprint/disable-conflict-rules | Disable rules where are conflicted with the dprint/dprint rule. |
| plugin:dprint/recommended | Enable the dprint/dprint rule along with the plugin:dprint/disable-conflict-rules preset. |
- Put the plugin:dprint/recommended or plugin:dprint/disable-conflict-rules config into the last of your
extendslist in order to ensure disabling conflict rules where came from other base configurations.
See GitHub Releases.
Welcome contributing!
Please use GitHub's Issues/PRs.
npm test... Run tests. It generates code coverage intocoveragedirectory.npm run watch... Run tests when files are edited.npm version <patch|minor|major>... Bump a new version.