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

Show more info in missing customSyntax warning #5611

Merged
merged 3 commits into from Oct 21, 2021
Merged

Show more info in missing customSyntax warning #5611

merged 3 commits into from Oct 21, 2021

Conversation

hudochenkov
Copy link
Member

Which issue, if any, is this issue related to?

#5604 (comment)

Is there anything in the PR that needs further explanation?

Now message included file path to understand what file causes the warning. And suggest known syntax to previously inferred extensions.

Before:

When linting something other than CSS, you should install an appropriate syntax, e.g. postcss-scss, and use the "customSyntax" option

After:

/Users/person/projects/styles.tsx: When linting something other than CSS, you should install an appropriate syntax, e.g. "@stylelint/postcss-css-in-js", and use the "customSyntax" option

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message is much better, thanks!

I've requested one small change.

js: '@stylelint/postcss-css-in-js',
jsx: '@stylelint/postcss-css-in-js',
less: 'postcss-less',
md: '@stylelint/postcss-markdown',
Copy link
Member

@jeddy3 jeddy3 Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
md: '@stylelint/postcss-markdown',
md: 'postcss-markdown',

We're going to deprecate our fork in favour of the original package. It works fine. It just needs someone to take ownership and update the dependencies at some point.

@stylelint/postcss-css-in-js is the special case as quite a bit of work was done to it since it was forked from the original package, so our fork will need to stick around a while until we can deprecate it (see https://github.com/stylelint/postcss-css-in-js/issues/225)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

lib/getPostcssResult.js Outdated Show resolved Hide resolved
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
@jeddy3 jeddy3 merged commit 8dca498 into v14 Oct 21, 2021
@jeddy3 jeddy3 deleted the syntax-warning branch October 21, 2021 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants