Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 16 commits into from
Jan 4, 2023
Merged

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

merged 16 commits into from
Jan 4, 2023

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Dec 5, 2022

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
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
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

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.

None yet

5 participants