Skip to content

Does not work for absolute path#3

Description

@kachkaev

Hi @jurosh 馃憢

I tried using eolConverter in lint-staged, but it did not work for me. Here's what my config looked like in package.json:

  "lint-staged": {
    "{**/*.md,{*,src/**/*}.{json,js,jsx,ts,tsx,css}}": [
      "prettier --write",
      "eolConverter",
      "git add"
    ]

Context: prettier/prettier#5320

The above config resulted the following commands to run before committing:

prettier --write /path/to/repo/path/to/file1.js
prettier --write /path/to/repo/path/to/file2.js
eolConverter /path/to/repo/path/to/file1.js
eolConverter /path/to/repo/path/to/file2.js

eolConverter was treating /path/to/repo/path/to/file1.js as glob and converted it to /path/to/repo/path/to/repo/path/to/file1.js, which resulted into Error: ENOENT: no such file or directory.

It'd be great if your tool could deal with absolute paths too!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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