-
Notifications
You must be signed in to change notification settings - Fork 343
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
Linters - leave yaml's alone #1294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository hasn's used @restyled-commits in centuries. Did you mean to obliterate the .restyled.yaml
file and apply your siggested patch on the following line?
Line 45 in 644dfe0
"lintfix": "eslint --fix ./ && prettier --write '**/*.{js,json,md,yaml,yml}'", |
Yes, changing the PR @0x2b3bfa0 thanks! |
d491eab
to
0f16ae7
Compare
@omesser, maybe we should also delete |
@0x2b3bfa0 it is done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t know any good solution for automatically formatting YAML workflow files, so I guess it’s fine to leave it as-is for now. |
Should close: #1177
Prettier which does weird things to wrapping, it's opinionated
Specifically, here it manifested in weird wrapping of mulitline strings in the github ymls which bothered us - but to be clear, it might be doing similar things in md files or others.
I've taken a look at config options a bit, the only option I see to configure our way around this, is using
--prose-wrap=preserve
for yaml files - which would work 🤷 for this case, but won't protect us from long lines in the general case. An example of passing options to a prettier via restyler: https://github.com/iterative/dvc.org/blob/main/.restyled.yaml#L8EDIT: (would be easy to do so in package.json as well)
Instead I thought it makes more sense to just have linter not touch yaml files at all - this is what this PR currently does
Also, optionally should I remove restyled config (@0x2b3bfa0 mentioned it's not used)?
it's meant to open PRs with fixes (for less technical contributors) and I'm not sure the CML team needs it (see iterative/terraform-provider-iterative#615)
@iterative/cml - you decide