feat: implemented the valid-style-parse rule#1054
Conversation
🦋 Changeset detectedLatest commit: 2ee6d7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
fa9676a to
50f5003
Compare
|
There is some issue in the pkg.pr.new action, I don't think it's related to anything in this PR... |
b225302 to
72e2ad5
Compare
Try the Instant Preview in Online PlaygroundInstall the Instant Preview to Your LocalPublished Instant Preview Packages:
|
|
The workflow has been fixed 😄 |
ota-meshi
left a comment
There was a problem hiding this comment.
Thank you for this PR!
It looks mostly good to me, but I have a few comments.
5f00210 to
e5cc901
Compare
e5cc901 to
a591826
Compare
a591826 to
2ee6d7d
Compare
|
@ota-meshi I can't solve the update error - The update script fails on the invalid CSS, which makes sense. I tried wrapping the BTW, that function can be simplified to: export async function writeAndFormat(fileName: string, content: string): Promise<void> {
fs.writeFileSync(fileName, content, 'utf8');
const prettierrc = await prettier.resolveConfig(fileName);
const formatted = await prettier.format(content, { filepath: fileName, ...prettierrc });
fs.writeFileSync(fileName, formatted, 'utf8');
const eslint = new ESLint({ fix: true });
const [result] = await eslint.lintText(formatted, { filePath: fileName });
if (result.output) {
fs.writeFileSync(fileName, result.output, 'utf8');
}
} |
|
It seems that prettier will output a log and continue processing even if it fails to parse the style. |
|
Thanks, I tried adding the prettier ignore commands, but I couldn't get it to work either :/ |
Closes #509