Skip to content

[1.x] Adds --dirty option#130

Merged
taylorotwell merged 16 commits into
mainfrom
feat/dirty
Jan 4, 2023
Merged

[1.x] Adds --dirty option#130
taylorotwell merged 16 commits into
mainfrom
feat/dirty

Conversation

@nunomaduro

@nunomaduro nunomaduro commented Dec 5, 2022

Copy link
Copy Markdown
Member

This pull request, developed in collaboration with @jasonmccreary, adds the --dirty option to Pint. When this option is used, Pint will only apply styling changes to added or edited files in a Git repository.

This means that when you use this option in a pull request for your project, Pint will style only the files you have added or edited, and not style any files that were not modified by your pull request.

pint --dirty

@jasonmccreary

Copy link
Copy Markdown
Contributor

@nunomaduro, thanks for the guidance. I'll get this patched up in the next live stream unless baby Emma comes early. 👨‍🍼

@jasonmccreary

Copy link
Copy Markdown
Contributor

Just finished up my live stream. I got items 1 and 2 working. A quick caveat though, the --path option does not exist. So item 1 works by using the first path passed (or the default of the current working directory).

In reviewing that and item 3, it appears pint does not currently honor the configuration file within the passed path when run from another directory (e.g. pint /workspace/laravelshift.com). This needs to be tested and/or patched before this --dirty option can be added with the desired behavior.

@dillingham

Copy link
Copy Markdown

Looks cool!, Currently using lint-staged for this

"lint-staged":{
        "**/*.{php}": [
            "./vendor/bin/pint"
        ],
        "resources/js/**/*.{js,vue}": [
            "prettier --write",
            "eslint --fix"
        ]
    }

@nunomaduro nunomaduro requested review from taylorotwell and removed request for taylorotwell January 3, 2023 15:00
@nunomaduro nunomaduro marked this pull request as ready for review January 4, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants