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 requiring custom syntaxes in shared configs #5728

Merged
merged 2 commits into from
Nov 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 11 additions & 7 deletions docs/developer-guide/syntaxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ We recommend creating a shared-config that:

For example, if you're creating a syntax for a CSS-in-JS library called "foo" then we recommend creating a shared-config called "stylelint-config-standard-foo" with the following content:

```json
{
"extends": ["stylelint-config-standard"],
"customSyntax": "postcss-foo",
"rules": {
"at-rule-no-unknown": null,
..
```js
module.exports = {
{
"extends": ["stylelint-config-standard"],
"customSyntax": require("postcss-foo"),
"rules": {
"at-rule-no-unknown": null,
// ..
}
}
}
```

We recommended requiring the custom syntax until PostCSS@7 is no longer in circulation.