0.4.0 • Published 5 years ago

eslint-plugin-dprint v0.4.0

Weekly downloads
65
License
MIT
Repository
github
Last release
5 years ago

eslint-plugin-dprint

npm version Downloads/month Build Status codecov Dependency Status

The plugin that runs dprint to format code in ESLint.

💿 Installation

Use npm or a compatible tool.

$ npm install -D eslint eslint-plugin-dprint

📖 Usage

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!

Available Rules

RuleDescription
dprint/dprintFormat code with dprint.

Available Configs

ConfigDescription
plugin:dprint/disable-conflict-rulesDisable rules where are conflicted with the dprint/dprint rule.
plugin:dprint/recommendedEnable the dprint/dprint rule along with the plugin:dprint/disable-conflict-rules preset.

📰 Changelog

See GitHub Releases.

❤️ Contributing

Welcome contributing!

Please use GitHub's Issues/PRs.

Development Tools

  • npm test ... Run tests. It generates code coverage into coverage directory.
  • npm run watch ... Run tests when files are edited.
  • npm version <patch|minor|major> ... Bump a new version.