Skip to content

Commit

Permalink
Use problem rather than violation in docs and types (#5592)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddy3 committed Oct 12, 2021
1 parent 176c5e0 commit e38da70
Show file tree
Hide file tree
Showing 210 changed files with 902 additions and 902 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Expand Up @@ -24,7 +24,7 @@ All notable changes to this project are documented in this file.
- Added: `ignoreProperties: []` to `number-max-precision` ([#5421](https://github.com/stylelint/stylelint/pull/5421)).
- Added: TypeScript type definitions ([#5582](https://github.com/stylelint/stylelint/pull/5582)).
- Fixed: "No files matching the pattern" when using backslash paths on Windows ([#5386](https://github.com/stylelint/stylelint/pull/5386)).
- Fixed: `function-url-quotes` violation messages to be consistent with other `*-quotes` rules ([#5488](https://github.com/stylelint/stylelint/pull/5488)).
- Fixed: `function-url-quotes` problem messages to be consistent with other `*-quotes` rules ([#5488](https://github.com/stylelint/stylelint/pull/5488)).
- Fixed: `length-zero-no-unit` false positives for `flex` property ([#5315](https://github.com/stylelint/stylelint/pull/5315)).
- Fixed: `media-feature-name-no-unknown` false positives for `prefers-contrast` ([#5428](https://github.com/stylelint/stylelint/pull/5428)).
- Fixed: `media-feature-name-value-allowed-list` TypeError for spaceless condition ([#5581](https://github.com/stylelint/stylelint/pull/5581)).
Expand Down Expand Up @@ -85,7 +85,7 @@ All notable changes to this project are documented in this file.
- Added: `selector-attribute-name-disallowed-list` rule ([#4992](https://github.com/stylelint/stylelint/pull/4992)).
- Added: `ignoreAtRules[]` to `property-no-unknown` ([#4965](https://github.com/stylelint/stylelint/pull/4965)).
- Fixed: `*-notation` false negatives for dollar variables ([#5031](https://github.com/stylelint/stylelint/pull/5031)).
- Fixed: `*-pattern` missing configured pattern in violation messages ([#4975](https://github.com/stylelint/stylelint/pull/4975)).
- Fixed: `*-pattern` missing configured pattern in problem messages ([#4975](https://github.com/stylelint/stylelint/pull/4975)).

## 13.7.2

Expand Down Expand Up @@ -263,7 +263,7 @@ All notable changes to this project are documented in this file.
## 11.0.0

- Changed: `--report-needless-disables` CLI flag now reports needless disables and runs linting ([#4151](https://github.com/stylelint/stylelint/pull/4151)).
- Changed: display a violation at 1:1 for each file instead of throwing an error on unrecognised rules ([#4237](https://github.com/stylelint/stylelint/pull/4237)).
- Changed: display a problem at 1:1 for each file instead of throwing an error on unrecognised rules ([#4237](https://github.com/stylelint/stylelint/pull/4237)).
- Changed: always return `stylelintError` as a boolean ([#4174](https://github.com/stylelint/stylelint/pull/4174)).
- Deprecated: `createRuleTester` API ([#4279](https://github.com/stylelint/stylelint/pull/4279)).
- Added: `--reportInvalidScopeDisables` CLI flag ([#4181](https://github.com/stylelint/stylelint/pull/4181)).
Expand All @@ -275,7 +275,7 @@ All notable changes to this project are documented in this file.
- Added: `ignoreSelectors: []` to `property-no-unknown` ([#4275](https://github.com/stylelint/stylelint/pull/4275)).
- Fixed: Babel user configuration interfering with CSS-in-JS parser ([#4164](https://github.com/stylelint/stylelint/pull/4164)).
- Fixed: PostCSS plugin ignoring .stylelintignore ([#4186](https://github.com/stylelint/stylelint/pull/4186)).
- Fixed: `*-max-empty-lines` to only report one violation per function, selector, value list ([#4260](https://github.com/stylelint/stylelint/pull/4260)).
- Fixed: `*-max-empty-lines` to only report one problem per function, selector, value list ([#4260](https://github.com/stylelint/stylelint/pull/4260)).
- Fixed: `block-no-empty` crash for `@import` statements ([#4110](https://github.com/stylelint/stylelint/pull/4110)).
- Fixed: `indentation` false positives for `<style>` tag with multiline attributes ([#4177](https://github.com/stylelint/stylelint/pull/4177)).
- Fixed: `length-zero-no-unit` false positives for inside calc function ([#4175](https://github.com/stylelint/stylelint/pull/4175)).
Expand Down Expand Up @@ -588,7 +588,7 @@ All notable changes to this project are documented in this file.
- Fixed: `indentation` false positives for Less parametric mixins with rule block/snippet ([#2744](https://github.com/stylelint/stylelint/pull/2744)).
- Fixed: `no-empty-source` compatability with `postcss-html` custom syntax ([#2798](https://github.com/stylelint/stylelint/issues/2798)).
- Fixed: `no-extra-semicolons` false negatives where instances were not detected when followed by multiple comments ([#2678](https://github.com/stylelint/stylelint/issues/2678)).
- Fixed: `selector-max-specificity` cannot parse selector violation for Less mixins ([#2677](https://github.com/stylelint/stylelint/pull/2677)).
- Fixed: `selector-max-specificity` cannot parse selector problem for Less mixins ([#2677](https://github.com/stylelint/stylelint/pull/2677)).

## 8.0.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -11,7 +11,7 @@ It's mighty as it:
- 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
- automatically **fixes** the majority of stylistic problems
- 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
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/formatters.md
Expand Up @@ -19,7 +19,7 @@ Where the first argument (`results`) is an array of Stylelint result objects (ty
"source": "path/to/file.css", // The filepath or PostCSS identifier like <input css 1>
"errored": true, // This is `true` if at least one rule with an "error"-level severity triggered a warning
"warnings": [
// Array of rule violation warning objects, each like the following ...
// Array of rule problem warning objects, each like the following ...
{
"line": 3,
"column": 12,
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/plugins.md
Expand Up @@ -206,7 +206,7 @@ Stylelint exposes some useful utilities.

### `stylelint.utils.report`

Adds violations from your plugin to the list of violations that Stylelint will report to the user.
Adds problems from your plugin to the list of problems that Stylelint will report to the user.

Use `stylelint.utils.report` to ensure your plugin respects disabled ranges and other possible future features of stylelint. _Do not use PostCSS's `node.warn()` method directly._

Expand Down
6 changes: 3 additions & 3 deletions docs/developer-guide/rules.md
Expand Up @@ -77,7 +77,7 @@ There is one caveat here: If your rule accepts a primary option array, it cannot

### Add autofix

Depending on the rule, it might be possible to automatically fix the rule's violations by mutating the PostCSS AST (Abstract Syntax Tree) using the [PostCSS API](http://api.postcss.org/).
Depending on the rule, it might be possible to automatically fix the rule's problems by mutating the PostCSS AST (Abstract Syntax Tree) using the [PostCSS API](http://api.postcss.org/).

Add `context` variable to rule parameters:

Expand Down Expand Up @@ -109,8 +109,8 @@ report(/* .. */);

Each rule must have tests that cover all patterns that:

- are considered violations
- should _not_ be considered violations
- are considered problems
- should _not_ be considered problems

Write as many as you can stand to.

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/configure.md
Expand Up @@ -176,7 +176,7 @@ For example:
}
```

Reporters may use these severity levels to display violations or exit the process differently.
Reporters may use these severity levels to display problems or exit the process differently.

## `extends`

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/errors.md
@@ -1,6 +1,6 @@
# Errors & warnings

In addition to rule violations, Stylelint surfaces the following errors and warnings:
In addition to rule problems, Stylelint surfaces the following errors and warnings:

## CSS syntax error

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/get-started.md
Expand Up @@ -122,4 +122,4 @@ You don't have to use the [Command Line Interface](usage/cli.md); you can also u
- [Node API](usage/node-api.md)
- [PostCSS plugin](usage/postcss-plugin.md)

There are also integrations for [editors](integrations/editor.md), [task-runners](integrations/task-runner.md) and [others](integrations/other.md) too. Our [offical extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) is a popular choice that lets you see violations inline in your editor.
There are also integrations for [editors](integrations/editor.md), [task-runners](integrations/task-runner.md) and [others](integrations/other.md) too. Our [offical extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) is a popular choice that lets you see problems inline in your editor.
8 changes: 4 additions & 4 deletions docs/user-guide/rules/about.md
Expand Up @@ -184,8 +184,8 @@ Each rule is accompanied by a README in the following format:
3. Prototypical code example.
4. Expanded description (if necessary).
5. Options.
6. Example patterns that are considered violations (for each option value).
7. Example patterns that are _not_ considered violations (for each option value).
6. Example patterns that are considered problems (for each option value).
7. Example patterns that are _not_ considered problems (for each option value).
8. Optional options (if applicable).

The single-line description is in the form of:
Expand All @@ -195,9 +195,9 @@ The single-line description is in the form of:
- "Require ..." for rules that accept `"always"` and `"never"` options
- "Specify ..." for everything else

## Violation messages
## Problem messages

Each rule produces violation messages in these forms:
Each rule produces problem messages in these forms:

- "Expected \[something\] \[in some context\]"
- "Unexpected \[something\] \[in some context\]"
6 changes: 3 additions & 3 deletions docs/user-guide/usage/cli.md
Expand Up @@ -46,7 +46,7 @@ Disable the default ignores. Stylelint will not automatically ignore the content

### `--fix`

Automatically fix, where possible, violations reported by rules. [More info](options.md#fix).
Automatically fix, where possible, problems reported by rules. [More info](options.md#fix).

### `--formatter, -f` | `--custom-formatter`

Expand Down Expand Up @@ -78,7 +78,7 @@ Print the configuration for the given path. Stylelint outputs the configuration

### `--quiet, -q`

Only register violations for rules with an "error"-level severity (ignore "warning"-level). [More info](options.md#quiet).
Only register problems for rules with an "error"-level severity (ignore "warning"-level). [More info](options.md#quiet).

### `--report-descriptionless-disables, --rdd`

Expand Down Expand Up @@ -187,5 +187,5 @@ stylelint -f verbose "foo/**/*.css"
The CLI can exit the process with the following exit codes:

- `1` - something unknown went wrong
- `2` - there was at least one rule violation or CLI flag error
- `2` - there was at least one rule problem or CLI flag error
- `78` - there was some problem with the configuration file
4 changes: 2 additions & 2 deletions docs/user-guide/usage/node-api.md
Expand Up @@ -44,11 +44,11 @@ For more detail usage, see [Globby Guide](https://github.com/sindresorhus/globby

### `errored`

Boolean. If `true`, at least one rule with an "error"-level severity registered a violation.
Boolean. If `true`, at least one rule with an "error"-level severity registered a problem.

### `output`

A string displaying the formatted violations (using the default formatter or whichever you passed).
A string displaying the formatted problems (using the default formatter or whichever you passed).

### `postcssResults`

Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/usage/options.md
Expand Up @@ -26,13 +26,13 @@ Absolute path to the directory that relative paths defining "extends" and "plugi

CLI flag: `--fix`

Automatically fix, where possible, violations reported by rules.
Automatically fix, where possible, problems reported by rules.

For CSS with standard syntax, Stylelint uses [postcss-safe-parser](https://github.com/postcss/postcss-safe-parser) to fix syntax errors.

If a source contains a:

- scoped disable comment, e.g. `/* stylelint-disable indentation */`, any violations reported by the scoped rules will not be automatically fixed anywhere in the source
- scoped disable comment, e.g. `/* stylelint-disable indentation */`, any problems reported by the scoped rules will not be automatically fixed anywhere in the source
- unscoped disable comment, i.e. `/* stylelint-disable */`, the entirety of source will not be automatically fixed

This limitation in being tracked in [issue #2643](https://github.com/stylelint/stylelint/issues/2643).
Expand Down Expand Up @@ -156,13 +156,13 @@ But, the following patterns (`stylelint-disable -- <description>`) are _not_ rep

<!-- prettier-ignore -->
```css
/* stylelint-disable -- This violation is ignorable. */
/* stylelint-disable -- This problem is ignorable. */
a {}
```

<!-- prettier-ignore -->
```css
/* stylelint-disable-next-line block-no-empty -- This violation is ignorable. */
/* stylelint-disable-next-line block-no-empty -- This problem is ignorable. */
a {}
```

Expand Down Expand Up @@ -190,4 +190,4 @@ If using `code` or `stdin` to pass a source string directly, you can use `codeFi

CLI flag: `--quiet`

Only register violations for rules with an "error"-level severity (ignore "warning"-level).
Only register problems for rules with an "error"-level severity (ignore "warning"-level).
4 changes: 2 additions & 2 deletions lib/__tests__/__snapshots__/cli.test.js.snap
Expand Up @@ -49,7 +49,7 @@ exports[`CLI --help 1`] = `
--fix
Automatically fix violations of certain rules.
Automatically fix problems of certain rules.
--custom-syntax
Expand Down Expand Up @@ -97,7 +97,7 @@ exports[`CLI --help 1`] = `
--quiet, -q
Only register violations for rules with an \\"error\\"-level severity (ignore
Only register problems for rules with an \\"error\\"-level severity (ignore
\\"warning\\"-level).
--color
Expand Down
4 changes: 2 additions & 2 deletions lib/cli.js
Expand Up @@ -132,7 +132,7 @@ const meowOptions = {
--fix
Automatically fix violations of certain rules.
Automatically fix problems of certain rules.
--custom-syntax
Expand Down Expand Up @@ -180,7 +180,7 @@ const meowOptions = {
--quiet, -q
Only register violations for rules with an "error"-level severity (ignore
Only register problems for rules with an "error"-level severity (ignore
"warning"-level).
--color
Expand Down
12 changes: 6 additions & 6 deletions lib/rules/alpha-value-notation/README.md
Expand Up @@ -19,7 +19,7 @@ The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatica

Alpha-values _must always_ use the number notation.

The following patterns are considered violations:
The following patterns are considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -31,7 +31,7 @@ a { opacity: 50% }
a { color: rgb(0 0 0 / 50%) }
```

The following patterns are _not_ considered violations:
The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -47,7 +47,7 @@ a { color: rgb(0 0 0 / 0.5) }

Alpha-values _must always_ use percentage notation.

The following patterns are considered violations:
The following patterns are considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -59,7 +59,7 @@ a { opacity: 0.5 }
a { color: rgb(0 0 0 / 0.5) }
```

The following patterns are _not_ considered violations:
The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -85,7 +85,7 @@ Given:
["opacity"]
```

The following patterns are considered violations:
The following patterns are considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -97,7 +97,7 @@ a { opacity: 50% }
a { color: rgb(0 0 0 / 0.5) }
```

The following patterns are _not_ considered violations:
The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/at-rule-allowed-list/README.md
Expand Up @@ -19,7 +19,7 @@ Given:
["extend", "keyframes"]
```

The following patterns are considered violations:
The following patterns are considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -33,7 +33,7 @@ The following patterns are considered violations:
}
```

The following patterns are _not_ considered violations:
The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/at-rule-disallowed-list/README.md
Expand Up @@ -19,7 +19,7 @@ Given:
["extend", "keyframes"]
```

The following patterns are considered violations:
The following patterns are considered problems:

<!-- prettier-ignore -->
```css
Expand All @@ -42,7 +42,7 @@ a { @extend placeholder; }
}
```

The following patterns are _not_ considered violations:
The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
Expand Down

0 comments on commit e38da70

Please sign in to comment.