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

Document errors and warnings better #6426

Merged
merged 4 commits into from
Oct 27, 2022
Merged

Document errors and warnings better #6426

merged 4 commits into from
Oct 27, 2022

Conversation

Supriya-48
Copy link
Contributor

@Supriya-48 Supriya-48 commented Oct 25, 2022

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

Closes #4585

Is there anything in the PR that needs further explanation?

e.g. "No, it's self-explanatory."

@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2022

⚠️ No Changeset found

Latest commit: a869acf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jeddy3 jeddy3 changed the title Updated errors doc Document errors and warning better Oct 25, 2022
@jeddy3
Copy link
Member

jeddy3 commented Oct 25, 2022

@Supriya-48 Thanks for making a start on this and for opening a pull request. I hope to make time later today to look at it.

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.

@Supriya-48 Thanks again for starting this. It'll be helpful for our users.

I've built on top of what you started, expanding and restructuring it.

## Unknown rule error

There is an unknown rule in the [configuration object](configure.md).

You should:

- install the latest version of Stylelint (`npm i --save-dev stylelint`), as we may have recently added the rule
Copy link
Member

Choose a reason for hiding this comment

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

[Note] Judging by the historical issues raised, it's usually an outdated version of Stylelint causing this error and the invalid option warning.

The chosen [PostCSS syntax](usage/options.md#customsyntax) was unable to parse the source.
The CSS parser built into Stylelint, or the chosen [custom syntax](usage/options.md#customsyntax), could not parse your code.

### Unclosed block
Copy link
Member

Choose a reason for hiding this comment

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

[Note] The CSSSyntaxError includes a message, e.g. this demo. I've used those messages as heading within this section so that:

  • they're easier to search for
  • we can give specific advice on how to resolve the issue

@jeddy3 jeddy3 changed the title Document errors and warning better Document errors and warnings better Oct 25, 2022
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.

@Supriya-48 @jeddy3 This change is a significant improvement with user-friendly examples! 👏🏼

@jeddy3 jeddy3 merged commit 57cbcd4 into stylelint:main Oct 27, 2022
ybiquitous pushed a commit that referenced this pull request Nov 3, 2022
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
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.

Improve errors and warnings docs
3 participants