Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stylelint/stylelint-config-standard
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 29.0.0
Choose a base ref
...
head repository: stylelint/stylelint-config-standard
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 30.0.0
Choose a head ref
  • 10 commits
  • 10 files changed
  • 4 contributors

Commits on Nov 3, 2022

  1. Update deps (#270)

    ybiquitous authored Nov 3, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    286effd View commit details

Commits on Nov 13, 2022

  1. Update deps (#272)

    ybiquitous authored Nov 13, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0719c20 View commit details

Commits on Nov 14, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dee6a3f View commit details

Commits on Dec 3, 2022

  1. Update deps (#276)

    ybiquitous authored Dec 3, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3643c64 View commit details

Commits on Dec 23, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2058710 View commit details

Commits on Jan 9, 2023

  1. Bump json5 from 2.2.1 to 2.2.3 (#279)

    Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
    - [Release notes](https://github.com/json5/json5/releases)
    - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
    - [Commits](json5/json5@v2.2.1...v2.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: json5
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 9, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1740126 View commit details

Commits on Feb 3, 2023

  1. Bump http-cache-semantics from 4.1.0 to 4.1.1 (#280)

    Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
    - [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
    - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: http-cache-semantics
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5860f3d View commit details

Commits on Feb 9, 2023

  1. Prepare 30.0.0 (#277)

    Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
    jeddy3 and ybiquitous authored Feb 9, 2023

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    e1d2e98 View commit details
  2. Update deps

    jeddy3 committed Feb 9, 2023
    Copy the full SHA
    27fb112 View commit details
  3. 30.0.0

    jeddy3 committed Feb 9, 2023
    Copy the full SHA
    f11b434 View commit details
Showing with 1,708 additions and 1,635 deletions.
  1. +0 −3 .github/workflows/nodejs.yml
  2. +0 −1 .prettierignore
  3. +7 −0 CHANGELOG.md
  4. +26 −128 README.md
  5. +15 −4 __tests__/index.test.js
  6. +12 −8 __tests__/invalid.css
  7. +31 −62 __tests__/valid.css
  8. +7 −66 index.js
  9. +1,599 −1,352 package-lock.json
  10. +11 −11 package.json
3 changes: 0 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ on:
push:
branches:
- main
- 'dependabot/**'
pull_request:
branches:
- '**'
@@ -15,5 +14,3 @@ jobs:

test:
uses: stylelint/.github/.github/workflows/test.yml@main
with:
os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 30.0.0

- Removed: `stylelint` less than `15.0.0` from peer dependencies.
- Removed: 64 rules deprecated in [`stylelint@15.0.0`](https://github.com/stylelint/stylelint/releases/tag/15.0.0). For details, see the [migration guide](https://github.com/stylelint/stylelint/blob/15.0.0/docs/migration-guide/to-15.md).
- Fixed: `length-zero-no-unit` to ignore custom properties.
- Fixed: `value-no-vendor-prefix` to ignore `-webkit-inline-box`.

## 29.0.0

- Removed: `stylelint` less than `14.14.0` from peer dependencies.
154 changes: 26 additions & 128 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,21 +4,17 @@

> The standard shareable config for Stylelint.
Extends [`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended).

Turns on additional rules to enforce common conventions found in the specifications and in a handful of CSS styleguides, including: [The Idiomatic CSS Principles](https://github.com/necolas/idiomatic-css),
[Google's CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.html#CSS_Formatting_Rules), [Airbnb's Styleguide](https://github.com/airbnb/css#css), and [@mdo's Code Guide](https://codeguide.co/#css).

It favours flexibility over strictness for things like multi-line lists and single-line rulesets.
It extends [`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended) and turns on additional rules to enforce modern conventions found in the [CSS specifications](https://www.w3.org/Style/CSS/current-work).

To see the rules that this config uses, please read the [config itself](./index.js).

## Example

<!-- prettier-ignore -->
```css
@import url("x.css");
@import url("y.css");
@import url("foo.css");
@import url("bar.css");

@custom-media --foo (min-width: 30em);

/**
* Multi-line comment
@@ -28,77 +24,44 @@ To see the rules that this config uses, please read the [config itself](./index.
--brand-red: hsl(5deg 10% 40%);
}

.selector-1,
.selector-2,
.selector-3[type="text"] {
background: linear-gradient(#fff, rgb(0 0 0 / 80%));
box-sizing: border-box;
display: block;
color: var(--brand-red);
}
/* Single-line comment */

.selector-a,
.selector-b:not(:first-child) {
padding: 10px !important;
.class-foo:not(a, div) {
margin: 0;
top: calc(100% - 2rem);
}

.selector-x { width: 10%; }
.selector-y { width: 20%; }
.selector-z { width: 30%; }

/* Single-line comment */

/* Flush single line comment */
@media (width >= 60em) {
.selector {
#id-bar {
/* Flush to parent comment */
transform: translate(1, 1) scale(3);
}
}
--offset: 0px;

@media (orientation: portrait), projection and (color) {
.selector-i + .selector-ii {
background: hsl(20deg 25% 33%);
color: #fff;
font-family: Helvetica, "Arial Black", sans-serif;
}
}

/* Flush single line comment */
@media
screen and (min-resolution: 192dpi),
screen and (min-resolution: 2dppx) {
.selector {
animation: 3s none fade-in;
background-image:
repeating-linear-gradient(
-45deg,
transparent,
#fff 25px,
rgb(255 255 255 / 100%) 50px
);
margin: 10px;
margin-bottom: 5px;
box-shadow:
0 1px 1px #000,
0 1px 0 #fff,
2px 2px 1px 1px #ccc inset;
height: 10rem;
left: calc(var(--offset) + 50%);
}

/* Flush nested single line comment */
.selector::after {
a::after {
display: block;
content: "";
background-image: url("x.svg");
}
}

@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
from {
opacity: 0;
}

to {
opacity: 1;
}
}
```

_Note: the config is tested against this example, as such the example contains plenty of CSS syntax, formatting and features._
_Note: the config is tested against this example, as such the example contains plenty of CSS syntax and features._

## Installation

@@ -108,7 +71,7 @@ npm install stylelint-config-standard --save-dev

## Usage

Set your stylelint config to:
Set your Stylelint config to:

```json
{
@@ -147,83 +110,18 @@ Or lower the severity of a rule to a warning using the `severity` secondary opti
}
```

A more complete example, to change the `at-rule-no-unknown` rule to use its `ignoreAtRules` option, change the `indentation` to tabs, turn off the `number-leading-zero` rule, set the severity of the `number-max-precision` rule to `warning`, and add the `unit-allowed-list` rule:
Or to add a rule, For example, the `unit-allowed-list` one:

```json
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["--my-at-rule"]
}
],
"indentation": "tab",
"number-leading-zero": null,
"number-max-precision": [
4,
{
"severity": "warning"
}
],
"unit-allowed-list": ["em", "rem", "s"]
}
}
```

#### Suggested additions

`stylelint-config-standard` is a great foundation for your own config. You can extend it to create a tailored and much stricter config:

- Manage specificity using:
- [`max-nesting-depth`](https://github.com/stylelint/stylelint/blob/main/lib/rules/max-nesting-depth/README.md)
- [`selector-max-attribute`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-attribute/README.md)
- [`selector-max-class`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-class/README.md)
- [`selector-max-combinators`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-combinators/README.md)
- [`selector-max-compound-selectors`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-compound-selectors/README.md)
- [`selector-max-id`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-id/README.md)
- [`selector-max-pseudo-class`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-pseudo-class/README.md)
- [`selector-max-specificity`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-specificity/README.md)
- [`selector-max-type`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-type/README.md)
- [`selector-max-universal`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-max-universal/README.md)
- [`selector-no-qualifying-type`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-no-qualifying-type/README.md)
- Specify acceptable selector types, units, properties, functions and words in comments using:
- [`at-rule-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/at-rule-disallowed-list/README.md)
- [`at-rule-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/at-rule-allowed-list/README.md)
- [`at-rule-property-required-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/at-rule-property-required-list/README.md)
- [`color-named`](https://github.com/stylelint/stylelint/blob/main/lib/rules/color-named/README.md)
- [`color-no-hex`](https://github.com/stylelint/stylelint/blob/main/lib/rules/color-no-hex/README.md)
- [`comment-word-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/comment-word-disallowed-list/README.md)
- [`declaration-no-important`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-no-important/README.md)
- [`declaration-property-unit-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-unit-disallowed-list/README.md)
- [`declaration-property-unit-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-unit-allowed-list/README.md)
- [`declaration-property-value-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-value-disallowed-list/README.md)
- [`declaration-property-value-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-value-allowed-list/README.md)
- [`function-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-disallowed-list/README.md)
- [`function-url-scheme-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-url-scheme-disallowed-list/README.md)
- [`function-url-scheme-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-url-scheme-allowed-list/README.md)
- [`function-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-allowed-list/README.md)
- [`media-feature-name-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/media-feature-name-disallowed-list/README.md)
- [`media-feature-name-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/media-feature-name-allowed-list/README.md)
- [`property-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/property-disallowed-list/README.md)
- [`property-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/property-allowed-list/README.md)
- [`selector-attribute-operator-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-attribute-operator-disallowed-list/README.md)
- [`selector-attribute-operator-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-attribute-operator-allowed-list/README.md)
- [`selector-combinator-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-combinator-disallowed-list/README.md)
- [`selector-combinator-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-combinator-allowed-list/README.md)
- [`selector-pseudo-class-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-pseudo-class-disallowed-list/README.md)
- [`selector-pseudo-class-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-pseudo-class-allowed-list/README.md)
- [`selector-pseudo-element-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-pseudo-element-disallowed-list/README.md)
- [`selector-pseudo-element-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-pseudo-element-allowed-list/README.md)
- [`unit-disallowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/unit-disallowed-list/README.md)
- [`unit-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/unit-allowed-list/README.md)
- Specify acceptable patterns using:
- [`selector-nested-pattern`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-nested-pattern/README.md)
- Specify a notation for font weights using:
- [`font-weight-notation`](https://github.com/stylelint/stylelint/blob/main/lib/rules/font-weight-notation/README.md)
- Specify what types of URLs are allowed using:
- [`function-url-no-scheme-relative`](https://github.com/stylelint/stylelint/blob/main/lib/rules/function-url-no-scheme-relative/README.md)
We recommend adding more of [Stylelint's rules](https://stylelint.io/user-guide/rules/) to your config as these rules need to be configured to suit your specific needs.

## [Changelog](CHANGELOG.md)

19 changes: 15 additions & 4 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
@@ -40,15 +40,14 @@ describe('flags warnings with invalid css', () => {
});

it('flags warnings', () => {
expect(result.results[0].warnings).toHaveLength(6);
expect(result.results[0].warnings).toHaveLength(5);
});

it('correct warning text', () => {
expect(result.results[0].warnings.map((w) => w.text)).toEqual([
'Expected custom media query name "--FOO" to be kebab-case',
'Expected custom property name "--FOO" to be kebab-case',
'Expected keyframe name "FOO" to be kebab-case',
'Expected a leading zero (number-leading-zero)',
'Expected class selector ".FOO" to be kebab-case',
'Expected id selector "#FOO" to be kebab-case',
]);
@@ -59,7 +58,6 @@ describe('flags warnings with invalid css', () => {
'custom-media-pattern',
'custom-property-pattern',
'keyframes-name-pattern',
'number-leading-zero',
'selector-class-pattern',
'selector-id-pattern',
]);
@@ -70,10 +68,23 @@ describe('flags warnings with invalid css', () => {
});

it('correct line number', () => {
expect(result.results[0].warnings[0].line).toBe(5);
expect(result.results[0].warnings[0].line).toBe(1);
});

it('correct column number', () => {
expect(result.results[0].warnings[0].column).toBe(15);
});
});

describe('deprecated rules', () => {
const deprecatedRuleNames = Object.values(stylelint.rules)
.filter((rule) => rule.meta.deprecated)
.map((rule) => rule.ruleName);

const testFn = deprecatedRuleNames.length === 0 ? it.skip : it;

testFn('exclude deprecate rules', () => {
// eslint-disable-next-line jest/no-standalone-expect -- If not using `it` directly, false positives occur.
expect(Object.keys(config.rules)).toEqual(expect.not.arrayContaining(deprecatedRuleNames));
});
});
20 changes: 12 additions & 8 deletions __tests__/invalid.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
a {
top: .2em;
}

@custom-media --FOO;

:root { --FOO: 1px; }
:root {
--FOO: 1px;
}

@keyframes FOO { /* ... */ }
@keyframes FOO {
/* ... */
}

.FOO { /* ... */ }
.FOO {
/* ... */
}

#FOO { /* ... */ }
#FOO {
/* ... */
}
93 changes: 31 additions & 62 deletions __tests__/valid.css
Original file line number Diff line number Diff line change
@@ -1,79 +1,48 @@
@import url("x.css");
@import url("y.css");
@import url('foo.css');
@import url('bar.css');

@custom-media --foo (min-width: 30em);

/**
* Multi-line comment
*/

:root {
--brand-red: hsl(5deg 10% 40%);
}

.selector-1,
.selector-2,
.selector-3[type="text"] {
background: linear-gradient(#fff, rgb(0 0 0 / 80%));
box-sizing: border-box;
display: block;
color: var(--brand-red);
--brand-red: hsl(5deg 10% 40%);
}

.selector-a,
.selector-b:not(:first-child) {
padding: 10px !important;
top: calc(100% - 2rem);
}

.selector-x { width: 10%; }
.selector-y { width: 20%; }
.selector-z { width: 30%; }

/* Single-line comment */

@media (width >= 60em) {
.selector {
/* Flush to parent comment */
transform: translate(1, 1) scale(3);
}
}

@media (orientation: portrait), projection and (color) {
.selector-i + .selector-ii {
background: hsl(20deg 25% 33%);
font-family: Helvetica, "Arial Black", sans-serif;
}
.class-foo:not(a, div) {
margin: 0;
top: calc(100% - 2rem);
}

/* Flush single line comment */
@media
screen and (min-resolution: 192dpi),
screen and (min-resolution: 2dppx) {
.selector {
animation: 3s none fade-in;
background-image:
repeating-linear-gradient(
-45deg,
transparent,
#fff 25px,
rgb(255 255 255 / 100%) 50px
);
margin: 10px;
margin-bottom: 5px;
box-shadow:
0 1px 1px #000,
0 1px 0 #fff,
2px 2px 1px 1px #ccc inset;
height: 10rem;
}

/* Flush nested single line comment */
.selector::after {
content: "→";
background-image: url("x.svg");
}
@media (width >= 60em) {
#id-bar {
/* Flush to parent comment */
--offset: 0px;

color: #fff;
font-family: Helvetica, 'Arial Black', sans-serif;
left: calc(var(--offset) + 50%);
}

/* Flush nested single line comment */
a::after {
display: block;
content: '→';
background-image: url('x.svg');
}
}

@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
from {
opacity: 0;
}

to {
opacity: 1;
}
}
73 changes: 7 additions & 66 deletions index.js
Original file line number Diff line number Diff line change
@@ -22,19 +22,8 @@ module.exports = {
ignore: ['after-comment'],
},
],
'at-rule-name-case': 'lower',
'at-rule-name-space-after': 'always-single-line',
'at-rule-no-vendor-prefix': true,
'at-rule-semicolon-newline-after': 'always',
'block-closing-brace-empty-line-before': 'never',
'block-closing-brace-newline-after': 'always',
'block-closing-brace-newline-before': 'always-multi-line',
'block-closing-brace-space-before': 'always-single-line',
'block-opening-brace-newline-after': 'always-multi-line',
'block-opening-brace-space-after': 'always-single-line',
'block-opening-brace-space-before': 'always',
'color-function-notation': 'modern',
'color-hex-case': 'lower',
'color-hex-length': 'short',
'comment-empty-line-before': [
'always',
@@ -63,17 +52,7 @@ module.exports = {
message: (name) => `Expected custom property name "${name}" to be kebab-case`,
},
],
'declaration-bang-space-after': 'never',
'declaration-bang-space-before': 'always',
'declaration-block-semicolon-newline-after': 'always-multi-line',
'declaration-block-semicolon-space-after': 'always-single-line',
'declaration-block-semicolon-space-before': 'never',
'declaration-block-single-line-max-declarations': 1,
'declaration-block-trailing-semicolon': 'always',
'declaration-block-no-redundant-longhand-properties': true,
'declaration-colon-newline-after': 'always-multi-line',
'declaration-colon-space-after': 'always-single-line',
'declaration-colon-space-before': 'never',
'declaration-empty-line-before': [
'always',
{
@@ -82,45 +61,25 @@ module.exports = {
},
],
'font-family-name-quotes': 'always-where-recommended',
'function-comma-newline-after': 'always-multi-line',
'function-comma-space-after': 'always-single-line',
'function-comma-space-before': 'never',
'function-max-empty-lines': 0,
'function-name-case': 'lower',
'function-parentheses-newline-inside': 'always-multi-line',
'function-parentheses-space-inside': 'never-single-line',
'function-url-quotes': 'always',
'function-whitespace-after': 'always',
'hue-degree-notation': 'angle',
'import-notation': 'url',
indentation: 2,
'keyframe-selector-notation': 'percentage-unless-within-keyword-only-block',
'keyframes-name-pattern': [
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
{
message: (name) => `Expected keyframe name "${name}" to be kebab-case`,
},
],
'length-zero-no-unit': true,
'max-empty-lines': 1,
'max-line-length': 120,
'media-feature-colon-space-after': 'always',
'media-feature-colon-space-before': 'never',
'media-feature-name-case': 'lower',
'length-zero-no-unit': [
true,
{
ignore: ['custom-properties'],
},
],
'media-feature-name-no-vendor-prefix': true,
'media-feature-parentheses-space-inside': 'never',
'media-feature-range-operator-space-after': 'always',
'media-feature-range-operator-space-before': 'always',
'media-query-list-comma-newline-after': 'always-multi-line',
'media-query-list-comma-space-after': 'always-single-line',
'media-query-list-comma-space-before': 'never',
'no-empty-first-line': true,
'no-eol-whitespace': true,
'no-missing-end-of-source-newline': true,
'number-leading-zero': 'always',
'number-max-precision': 4,
'number-no-trailing-zeros': true,
'property-case': 'lower',
'property-no-vendor-prefix': true,
'rule-empty-line-before': [
'always-multi-line',
@@ -129,48 +88,30 @@ module.exports = {
ignore: ['after-comment'],
},
],
'selector-attribute-brackets-space-inside': 'never',
'selector-attribute-operator-space-after': 'never',
'selector-attribute-operator-space-before': 'never',
'selector-attribute-quotes': 'always',
'selector-class-pattern': [
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
{
message: (selector) => `Expected class selector "${selector}" to be kebab-case`,
},
],
'selector-combinator-space-after': 'always',
'selector-combinator-space-before': 'always',
'selector-descendant-combinator-no-non-space': true,
'selector-id-pattern': [
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
{
message: (selector) => `Expected id selector "${selector}" to be kebab-case`,
},
],
'selector-list-comma-newline-after': 'always',
'selector-list-comma-space-before': 'never',
'selector-max-empty-lines': 0,
'selector-no-vendor-prefix': true,
'selector-not-notation': 'complex',
'selector-pseudo-class-case': 'lower',
'selector-pseudo-class-parentheses-space-inside': 'never',
'selector-pseudo-element-case': 'lower',
'selector-pseudo-element-colon-notation': 'double',
'selector-type-case': 'lower',
'shorthand-property-no-redundant-values': true,
'string-quotes': 'double',
'unit-case': 'lower',
'value-keyword-case': 'lower',
'value-list-comma-newline-after': 'always-multi-line',
'value-list-comma-space-after': 'always-single-line',
'value-list-comma-space-before': 'never',
'value-list-max-empty-lines': 0,
'value-no-vendor-prefix': [
true,
{
// `-webkit-box` is allowed as standard. See https://www.w3.org/TR/css-overflow-3/#webkit-line-clamp
ignoreValues: ['box'],
ignoreValues: ['box', 'inline-box'],
},
],
},
2,951 changes: 1,599 additions & 1,352 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-config-standard",
"version": "29.0.0",
"version": "30.0.0",
"description": "Standard shareable config for Stylelint",
"keywords": [
"stylelint",
@@ -46,23 +46,23 @@
]
},
"dependencies": {
"stylelint-config-recommended": "^9.0.0"
"stylelint-config-recommended": "^10.0.0"
},
"devDependencies": {
"@stylelint/prettier-config": "^2.0.0",
"@stylelint/remark-preset": "^4.0.0",
"eslint": "^8.25.0",
"eslint-config-stylelint": "^17.0.0",
"husky": "^8.0.1",
"jest": "^28.1.3",
"lint-staged": "^13.0.3",
"np": "^7.6.2",
"eslint": "^8.33.0",
"eslint-config-stylelint": "^17.1.0",
"husky": "^8.0.3",
"jest": "^29.4.2",
"lint-staged": "^13.1.1",
"np": "^7.6.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"prettier": "^2.8.4",
"remark-cli": "^11.0.0",
"stylelint": "^14.14.0"
"stylelint": "^15.0.0"
},
"peerDependencies": {
"stylelint": "^14.14.0"
"stylelint": "^15.0.0"
}
}