0.5.2 • Published 2 years ago

@phaphoso/eslint-plugin-dprint v0.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

eslint-plugin-dprint

npm version Downloads/month

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

📖 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

RuleDescription
@phaphoso/dprint/dprintFormat code with dprint.

Available Configs

ConfigDescription
plugin:@phaphoso/dprint/disable-conflict-rulesDisable rules where are conflicted with the @phaphoso/dprint/dprint rule.
plugin:@phaphoso/dprint/recommendedEnable the @phaphoso/dprint/dprint rule along with the plugin:@phaphoso/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.