diff --git a/CHANGELOG.md b/CHANGELOG.md index 925d5bad6f..a9954c5c1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project are documented in this file. ## Head +[Migrating to `14.0.0` guide](docs/migration-guide/to-14.md). + - Security: addressed ReDoS issue with regex in `indentation` ([#5539](https://github.com/stylelint/stylelint/pull/5539)). - Removed: `configOverrides` option ([#5530](https://github.com/stylelint/stylelint/pull/5530)). - Removed: `syntax` option ([#5297](https://github.com/stylelint/stylelint/pull/5297)). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a88f59563d..9a5cdc0e89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ Thank you for wanting to contribute. To help out, you can: - get involved in any open [issue](https://github.com/stylelint/stylelint/issues) or [pull request](https://github.com/stylelint/stylelint/pulls) -- improve our [support for non-standard syntaxes](docs/about/syntaxes.md) +- maintain [community custom syntaxes](docs/developer-guide/syntaxes.md) - create, enhance and debug rules using [our guide](docs/developer-guide/rules.md) - improve the [documentation](docs/) - add [new tests](https://github.com/stylelint/stylelint/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+tests%22) to _absolutely anything_ diff --git a/README.md b/README.md index 521180338d..1068b1e39b 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,62 @@ A mighty, modern linter that helps you avoid errors and enforce conventions in y It's mighty as it: -- understands the **latest CSS syntax** including custom properties and level 4 selectors -- extracts **embedded styles** from HTML, markdown and CSS-in-JS object & template literals -- parses **CSS-like syntaxes** like SCSS, Sass, Less and SugarSS -- has over **170 built-in rules** to catch errors, apply limits and enforce stylistic conventions -- supports **plugins** so you can create your own rules or make use of plugins written by the community +- understands **modern** CSS syntax and features +- has over **170 built-in rules** to catch errors and enforce conventions +- supports **plugins** so you can create your own rules - automatically **fixes** the majority of stylistic violations - is **well tested** with over 15000 unit tests - supports **shareable configs** that you can extend or create - is **unopinionated** so that you can customize it to your exact needs -- has a **growing community** and is used by [Facebook](https://code.facebook.com/posts/879890885467584/improving-css-quality-at-facebook-and-beyond/), [GitHub](https://github.com/primer/stylelint-config-primer) and [WordPress](https://github.com/WordPress-Coding-Standards/stylelint-config-wordpress) +- has a **growing community** and is used by Google, GitHub and WordPress + +And can be extended to: + +- parse **CSS-like syntaxes** like SCSS, Sass, Less and SugarSS +- extract **embedded styles** from HTML, Markdown and CSS-in-JS object & template literals ## Example output ![Example](https://github.com/stylelint/stylelint/raw/master/example.png?raw=true) -## Getting started - -You'll find steps to [get started in our User guide](docs/user-guide/get-started.md). +## Guides + +- User guide + - [Getting started](docs/user-guide/get-started.md) + - [Configuration](docs/user-guide/configure.md) + - Rules + - [List of rules](docs/user-guide/rules/list.md) + - [About rules](docs/user-guide/rules/about.md) + - [Combining rules](docs/user-guide/rules/combine.md) + - [Using regex in rules](docs/user-guide/rules/regex.md) + - Usage + - [CLI](docs/user-guide/usage/cli.md) + - [Node.js API](docs/user-guide/usage/node-api.md) + - [PostCSS plugin](docs/user-guide/usage/postcss-plugin.md) + - [Shared options](docs/user-guide/usage/options.md) + - Integrations + - [Editor integrations](docs/user-guide/integrations/editor.md) + - [Task runner integrations](docs/user-guide/integrations/task-runner.md) + - [Other integrations](docs/user-guide/integrations/other.md) + - [Ignoring code](docs/user-guide/ignore-code.md) + - [Errors & warnings](docs/user-guide/errors.md) +- Developer guide + - [Working on rules](docs/developer-guide/rules.md) + - [Writing plugins](docs/developer-guide/plugins.md) + - [Writing custom syntaxes](docs/developer-guide/syntaxes.md) + - [Writing custom formatters](docs/developer-guide/formatters.md) + - [Writing system tests](docs/developer-guide/system-tests.md) + - [Writing processors](docs/developer-guide/processors.md) +- Migration guide + - [Migrating to 14.0.0](docs/migration-guide/to-14.md) +- Maintainer guide + - [Managing issues](docs/maintainer-guide/issues.md) + - [Managing pull requests](docs/maintainer-guide/pull-requests.md) + - [Performing releases](docs/maintainer-guide/releases.md) +- About + - [Vision](docs/about/vision.md) + - [Linting](docs/about/linting.md) + - [Semantic versioning](docs/about/semantic-versioning.md) ## Contributors diff --git a/docs/about/linting.md b/docs/about/linting.md index 271989fe06..cdc3550062 100644 --- a/docs/about/linting.md +++ b/docs/about/linting.md @@ -11,9 +11,9 @@ There are two approaches to enforcing stylistic conventions: - a machine algorithmically pretty prints the code (usually based on a maximum line length) - a human initially formats the code, and a machine fixes-up/warns-about any mistakes -The former is handled by pretty printers, like [prettier](https://github.com/prettier/prettier), whereas the latter is catered for by the built-in [stylistic rules](../user-guide/rules/list.md#stylistic-issues). If you use a pretty printer, you'll want to use [`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended), which only turns on [possible error](../user-guide/rules/list.md#possible-errors) rules. +The former is handled by pretty printers, like [Prettier](https://github.com/prettier/prettier), whereas the latter is catered for by the built-in [stylistic rules](../user-guide/rules/list.md#stylistic-issues). If you use a pretty printer, you'll want to use [`stylelint-config-standard`](https://github.com/stylelint/stylelint-config-standard) and [`stylelint-config-prettier`](https://github.com/prettier/stylelint-config-prettier), which turns off any imcompatible rules. -Additionally, the built-in stylistic rules and plugins are configurable to support a diverse range of stylistic conventions. For example, ordering properties within declaration blocks is a divisive topic, where there isn't a dominant convention. The [`stylelint-order`](https://www.npmjs.com/package/stylelint-order) plugin can be configured to lint and fix a diverse range of ordering conventions. +The built-in stylistic rules and plugins are configurable to support a diverse range of stylistic conventions. For example, ordering properties within declaration blocks is a divisive topic, where there isn't a dominant convention. The [`stylelint-order`](https://www.npmjs.com/package/stylelint-order) plugin can be configured to lint and fix a diverse range of ordering conventions. Another example is the use of single-line rules for sets of _related_ rules, e.g. @@ -29,6 +29,6 @@ You can configure the built-in stylistic rules to allow both multi-line and sing ## Validators -Validators like [csstree](https://github.com/csstree/csstree) identify invalid code such as misformed hex colors and unknown language features. +Validators like [CSSTree](https://github.com/csstree/csstree) identify invalid code such as misformed hex colors, unknown language features or invalid property and value pairs. -However, as a stop-gap, while these tools mature stylelint provides rules for the simplest of cases. +However, as a stop-gap, stylelint provides rules for the simplest of cases while these tools mature. diff --git a/docs/about/syntaxes.md b/docs/about/syntaxes.md deleted file mode 100644 index 62d1265942..0000000000 --- a/docs/about/syntaxes.md +++ /dev/null @@ -1,18 +0,0 @@ -# Syntaxes - -There are many styling languages, ranging from CSS language extensions like SCSS to entirely different notations, e.g. CSS-in-JS objects. - -These styling languages can be embedded within other languages too. For example: - -- HTML `