Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.
This repository was archived by the owner on May 29, 2023. It is now read-only.

No files found to format with the specified plugins #3

@Avasam

Description

@Avasam

I run pre-commit run --all-files from the root of my repo
It results in:

dprint...................................................................Failed
- hook id: dprint
- exit code: 1

No files found to format with the specified plugins. You may want to try using `dprint output-file-paths` to see which files it's finding.
No files found to format with the specified plugins. You may want to try using `dprint output-file-paths` to see which files it's finding.

.pre-commit-config.yaml:

repos:
  - repo: https://github.com/adamchainz/pre-commit-dprint
    rev: "v0.35.3"
    hooks:
      - id: dprint

dprint.json at the root of my repo:

// SPDX-License-Identifier: MIT
// Copyright 2023 Beslogic Inc.
{
  // https://dprint.dev/plugins/typescript/config/
  "typescript": {
    "quoteStyle": "preferSingle",
    "quoteProps": "asNeeded",
    "newLineKind": "auto",
    "semiColons": "asi",
    "operatorPosition": "sameLine",
    "conditionalExpression.operatorPosition": "nextLine",
    "arrowFunction.useParentheses": "preferNone",
    "binaryExpression.linePerExpression": true,
    // Not convinced yet
    // "memberExpression.linePerExpression": true,
    "typeLiteral.separatorKind": "comma",
    "enumDeclaration.memberSpacing": "newLine",
    "importDeclaration.forceSingleLine": true,
    // conflicts with simple-import-sort/imports
    "module.sortImportDeclarations": "maintain",
    "module.sortExportDeclarations": "maintain"
  },
  // https://dprint.dev/plugins/json/config/
  "json": {
    "newLineKind": "auto"
  },
  // https://dprint.dev/plugins/markdown/config/
  "markdown": {
    "lineWidth": 120,
    "newLineKind": "auto"
  },
  // https://dprint.dev/plugins/dockerfile/config/
  "dockerfile": {
    "newLineKind": "auto"
  },
  // https://dprint.dev/plugins/toml/
  "toml": {
    "newLineKind": "auto"
  },
  "includes": [
    "**/*.{ts,tsx,js,jsx,cjs,mjs,json,md,toml}",
    "**/dockerfile"
  ],
  "excludes": [
    "**/node_modules",
    "**/*-lock.json",
    "**/coverage", // created on install by nx
    "**/build",
    "**/cache",
    "**/dist",
    "**/tmp",
    "**/obj"
  ],
  "plugins": [
    "https://plugins.dprint.dev/typescript-0.74.0.wasm",
    "https://plugins.dprint.dev/json-0.15.6.wasm",
    "https://plugins.dprint.dev/markdown-0.14.1.wasm",
    "https://plugins.dprint.dev/dockerfile-0.3.0.wasm",
    "https://plugins.dprint.dev/toml-0.5.4.wasm"
  ]
}

dprint check works just fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions