Skip to content

Commit

Permalink
Refactor to fix typos (#5648)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Oct 26, 2021
1 parent 3fc7fa0 commit babbe4b
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Expand Up @@ -106,7 +106,7 @@ All notable changes to this project are documented in this file.

## 13.7.0

- Deprecated: `*-blacklist`, `*-requirelist` and `*-whitelist` rules in favour of the new `*-disallowed-list`, `*-required-list` and `*-allowed-list` ones ([#4845](https://github.com/stylelint/stylelint/pull/4845)):
- Deprecated: `*-blacklist`, `*-requirelist` and `*-whitelist` rules in favor of the new `*-disallowed-list`, `*-required-list` and `*-allowed-list` ones ([#4845](https://github.com/stylelint/stylelint/pull/4845)):
- `at-rule-blacklist`. Use `at-rule-disallowed-list` instead.
- `at-rule-property-requirelist`. Use `at-rule-property-required-list` instead.
- `at-rule-whitelist`. Use `at-rule-allowed-list` instead.
Expand Down Expand Up @@ -271,7 +271,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 problem 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 unrecognized 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 Down Expand Up @@ -314,7 +314,7 @@ All notable changes to this project are documented in this file.

- Removed: Node.js 6.x support. Node.js 8.15.1 or greater is now required ([#4006](https://github.com/stylelint/stylelint/pull/4006)).
- Removed: `styled` and `jsx` syntax options that were replaced with `css-in-js` in v9.10.0 ([#4007](https://github.com/stylelint/stylelint/pull/4007)).
- Changed: throws error if glob matches no files, use the `--allow-empty-input` flag for the old behaviour ([#3965](https://github.com/stylelint/stylelint/pull/3965)).
- Changed: throws error if glob matches no files, use the `--allow-empty-input` flag for the old behavior ([#3965](https://github.com/stylelint/stylelint/pull/3965)).
- Changed: rules are now applied in the order defined in `lib/rules/index.js` ([#3923](https://github.com/stylelint/stylelint/pull/3923)).
- Added: `at-rule-property-requirelist` rule ([#3997](https://github.com/stylelint/stylelint/pull/3997)).
- Added: `disallowInList` to `no-duplicate-selectors` ([#3936](https://github.com/stylelint/stylelint/pull/3936)).
Expand Down Expand Up @@ -363,7 +363,7 @@ All notable changes to this project are documented in this file.
- Added: `value-keyword-case` autofix ([#3775](https://github.com/stylelint/stylelint/pull/3775)).
- Added: `ignore: ["pseudo-classes"]` to `max-nesting-depth` ([#3724](https://github.com/stylelint/stylelint/pull/3724)).
- Added: `ignoreTypes:[]` to `selector-type-case` ([#3758](https://github.com/stylelint/stylelint/pull/3758)).
- Added: `ignoreFunctions:[]` to `unit-no-unkown` ([#3736](https://github.com/stylelint/stylelint/pull/3736)).
- Added: `ignoreFunctions:[]` to `unit-no-unknown` ([#3736](https://github.com/stylelint/stylelint/pull/3736)).
- Fixed: error for single-line Sass comments ([#3772](https://github.com/stylelint/stylelint/pull/3772)).
- Fixed: `at-rule-*` false positives for Less variables and mixins ([#3767](https://github.com/stylelint/stylelint/pull/3767)).
- Fixed: `max-empty-lines` false positives for final newlines ([#3785](https://github.com/stylelint/stylelint/pull/3785)).
Expand All @@ -381,7 +381,7 @@ All notable changes to this project are documented in this file.
- Fixed: false negatives for Less at-imports ([#3687](https://github.com/stylelint/stylelint/pull/3687)).
- Fixed: SyntaxError when an empty string is used for a rule's custom message ([#3743](https://github.com/stylelint/stylelint/pull/3743)).
- Fixed: `max-empty-lines` false positives for empty lines before `</style>` ([#3708](https://github.com/stylelint/stylelint/pull/3708)).
- Fixed: `selector-max-specificity` false positives for functional psuedo-classes ([#3711](https://github.com/stylelint/stylelint/pull/3711)).
- Fixed: `selector-max-specificity` false positives for functional pseudo-classes ([#3711](https://github.com/stylelint/stylelint/pull/3711)).

## 9.6.0

Expand Down Expand Up @@ -594,7 +594,7 @@ All notable changes to this project are documented in this file.
- Fixed: `*-empty-line-before` false positives shared-line comments and `"first-nested"` option ([#2827](https://github.com/stylelint/stylelint/issues/2827)).
- Fixed: `color-hex-length` false positives for ID references in `url` functions ([#2806](https://github.com/stylelint/stylelint/issues/2806)).
- 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-empty-source` compatibility 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 problem for Less mixins ([#2677](https://github.com/stylelint/stylelint/pull/2677)).

Expand Down Expand Up @@ -1100,7 +1100,7 @@ Changes:
- Added: `selector-max-empty-lines` rule.
- Added: `selector-pseudo-element-no-unknown` rule.
- Added: flexible support for end-of-line comments in `at-rule-semicolon-newline-after`, `block-opening-brace-newline-after`, and `declaration-block-semicolon-newline-after`.
- Fixed: string and verbose formatters no longer use an ambiguous colour schemes.
- Fixed: string and verbose formatters no longer use an ambiguous color schemes.
- Fixed: string formatter no longer outputs an empty line if there are no problems.
- Fixed: all rules now handle case insensitive CSS identifiers.
- Fixed: `function-comma-newline-after` now allows end-of-line comments.
Expand Down
2 changes: 1 addition & 1 deletion docs/about/linting.md
Expand Up @@ -11,7 +11,7 @@ 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-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.
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 incompatible rules.

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.

Expand Down
6 changes: 3 additions & 3 deletions docs/migration-guide/to-14.md
Expand Up @@ -69,7 +69,7 @@ For other languages and embedded styles, we suggest the following [PostCSS synta
- HTML, XML and HTML-like embeds (`.html`, `.xml`, `.svelte`, `.vue` etc.) use [postcss-html](https://www.npmjs.com/package/postcss-html)
- Markdown embeds (`.md`, `.markdown` etc.) use [postcss-markdown](https://www.npmjs.com/package/postcss-markdown)

(The [postcss-markdown](https://www.npmjs.com/package/postcss-markdown) package needs a maintainer (see [this issue](https://github.com/stylelint/stylelint/issues/5583)). The [@stylelint/postcss-css-in-js](https://www.npmjs.com/package/@stylelint/postcss-css-in-js) package [has issues](https://github.com/stylelint/stylelint/issues/4574). It will likely to be deprecated in the future in favour of smaller syntaxes that focus on only one library (see [this issue](https://github.com/stylelint/postcss-css-in-js/issues/225))).
(The [postcss-markdown](https://www.npmjs.com/package/postcss-markdown) package needs a maintainer (see [this issue](https://github.com/stylelint/stylelint/issues/5583)). The [@stylelint/postcss-css-in-js](https://www.npmjs.com/package/@stylelint/postcss-css-in-js) package [has issues](https://github.com/stylelint/stylelint/issues/4574). It will likely to be deprecated in the future in favor of smaller syntaxes that focus on only one library (see [this issue](https://github.com/stylelint/postcss-css-in-js/issues/225))).

If you lint more than one styling language, then you can use the new [`overrides` property](../user-guide/configure.md#overrides). For example, to lint both CSS and [SugarSS](https://github.com/postcss/sugarss) you can update your configuration object to include:

Expand Down Expand Up @@ -98,7 +98,7 @@ If you lint more than one styling language, then you can use the new [`overrides
}
```

Which will extend the [offical standard config](https://github.com/stylelint/stylelint-config-standard), then use the `overrides` property to set the `customSyntax` property and turn off the rules that check braces and semicolons for SugarSS files.
Which will extend the [official standard config](https://github.com/stylelint/stylelint-config-standard), then use the `overrides` property to set the `customSyntax` property and turn off the rules that check braces and semicolons for SugarSS files.

You can then use Stylelint to lint both CSS and SugarSS files:

Expand Down Expand Up @@ -136,7 +136,7 @@ There are three changes that may affect you:

### PostCSS 8

The behaviour of the parser has changed in PostCSS version 8. The following is now parsed as a `Declaration` when it was previously parsed as a `Rule`:
The behavior of the parser has changed in PostCSS version 8. The following is now parsed as a `Declaration` when it was previously parsed as a `Rule`:

```css
foo: {
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/get-started.md
Expand Up @@ -108,7 +108,7 @@ If you lint more than one styling language, then you can use the [`overrides`](c
}
```

Which will extend the [offical standard config](https://github.com/stylelint/stylelint-config-standard), then use the `overrides` property to change the custom-syntax and turn off the rules that check braces and semicolons for SugarSS files.
Which will extend the [official standard config](https://github.com/stylelint/stylelint-config-standard), then use the `overrides` property to change the custom-syntax and turn off the rules that check braces and semicolons for SugarSS files.

You can then use Stylelint to lint both CSS and SugarSS files:

Expand Down Expand Up @@ -145,4 +145,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 problems 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 [official 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.
2 changes: 1 addition & 1 deletion docs/user-guide/integrations/editor.md
@@ -1,6 +1,6 @@
# Editor integrations

We recommend the [offical VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint).
We recommend the [official VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint).

Editor integrations built and maintained by the community:

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/rules/combine.md
Expand Up @@ -343,7 +343,7 @@ Or, if you're taking a disallow approach:
}
```

This approach scales to when language extensions (that use the two built-in extendable syntactic constructs of at-rules and functions) are used. For example, say you want to disallow all standard color presentations in favour of using a custom color representation function, e.g. `my-color(red with a dash of green / 5%)`. You can do that with:
This approach scales to when language extensions (that use the two built-in extendable syntactic constructs of at-rules and functions) are used. For example, say you want to disallow all standard color presentations in favor of using a custom color representation function, e.g. `my-color(red with a dash of green / 5%)`. You can do that with:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion lib/__tests__/standalone-globs.test.js
Expand Up @@ -189,7 +189,7 @@ describe('standalone globbing', () => {
);
});

/* eslint-disable jest/no-commented-out-tests -- Failing case for reference. Documents behaviour that doesn't work. */
/* eslint-disable jest/no-commented-out-tests -- Failing case for reference. Documents behavior that doesn't work. */

// Note: This fails because there's no way to tell which parts of the glob are literal characters, and which are special globbing characters.
//
Expand Down
6 changes: 3 additions & 3 deletions lib/getPostcssResult.js
Expand Up @@ -134,7 +134,7 @@ function getCustomSyntax(customSyntax) {
}

/** @type {{ [key: string]: string }} */
const previouslyInferedExtensions = {
const previouslyInferredExtensions = {
html: 'postcss-html',
js: '@stylelint/postcss-css-in-js',
jsx: '@stylelint/postcss-css-in-js',
Expand All @@ -160,9 +160,9 @@ function cssSyntax(stylelint, filePath) {
const fileExtension = filePath ? path.extname(filePath).slice(1).toLowerCase() : '';
const extensions = ['css', 'pcss', 'postcss'];

if (previouslyInferedExtensions[fileExtension]) {
if (previouslyInferredExtensions[fileExtension]) {
console.warn(
`${filePath}: When linting something other than CSS, you should install an appropriate syntax, e.g. "${previouslyInferedExtensions[fileExtension]}", and use the "customSyntax" option`,
`${filePath}: When linting something other than CSS, you should install an appropriate syntax, e.g. "${previouslyInferredExtensions[fileExtension]}", and use the "customSyntax" option`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/color-named/README.md
Expand Up @@ -131,7 +131,7 @@ The following patterns are _not_ considered problems:
<!-- prettier-ignore -->
```css
a {
color: map-get($colour, blue);
color: map-get($color, blue);
}
```

Expand Down
4 changes: 2 additions & 2 deletions lib/rules/color-named/__tests__/index.js
Expand Up @@ -408,10 +408,10 @@ testRule({
code: 'a { background-image: url(red); }',
},
{
code: 'a { color: map-get($colour, blue(60%)); }',
code: 'a { color: map-get($color, blue(60%)); }',
},
{
code: 'a { color: map-get($colour, blue); }',
code: 'a { color: map-get($color, blue); }',
},
{
code: 'a { background: color(blue); }',
Expand Down
Expand Up @@ -123,21 +123,21 @@ testRule({
@bar 'bar.css';
@import 'foo.css';
`,
description: 'ignored atRule at the beggining - equal string',
description: 'ignored atRule at the beginning - equal string',
},
{
code: stripIndent`
@foofoo 'bar.css';
@import 'foo.css';
`,
description: 'ignored atRule at the beggining - match regExp',
description: 'ignored atRule at the beginning - match regExp',
},
{
code: stripIndent`
@my-custom-rule {};
@import 'foo.css';
`,
description: 'ignored atRule at the beggining - match regExp',
description: 'ignored atRule at the beginning - match regExp',
},
],

Expand Down

0 comments on commit babbe4b

Please sign in to comment.