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

Stylelint v15 update #276

Merged
merged 3 commits into from Mar 13, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [12, 14, 16]
node: [14, 16, 18]
os: [ubuntu-latest]

steps:
Expand Down
16 changes: 8 additions & 8 deletions __tests__/unit/qualifying-element.spec.js
Expand Up @@ -31,14 +31,14 @@ test("Qualifying element scss", t => {
.then(checkResult)
.catch(logError)

function checkResult(result) {
t.equal(result.warnings().length, 5, "flags 5 warning")
t.is(result.warnings()[0].text, "Expected \"div#thing\" to have no more than 0 ID selectors (selector-max-id)", "correct warning text")
t.is(result.warnings()[1].text, "Unexpected qualifying type selector (selector-no-qualifying-type)", "correct warning text")
t.is(result.warnings()[2].text, "Unexpected qualifying type selector (selector-no-qualifying-type)", "correct warning text")
t.is(result.warnings()[3].text, "Unexpected qualifying type selector (selector-no-qualifying-type)", "correct warning text")
t.is(result.warnings()[4].text, "Unexpected qualifying type selector (selector-no-qualifying-type)", "correct warning text")
}
function checkResult(result) {
t.equal(result.warnings().length, 5, "flags 5 warning")
t.is(result.warnings()[0].text, "Expected \"div#thing\" to have no more than 0 ID selectors (selector-max-id)", "correct warning text")
t.is(result.warnings()[1].text, "Unexpected qualifying type selector \"div#thing\" (selector-no-qualifying-type)", "correct warning text")
t.is(result.warnings()[2].text, "Unexpected qualifying type selector \"ul.list\" (selector-no-qualifying-type)", "correct warning text")
t.is(result.warnings()[3].text, "Unexpected qualifying type selector \"li.item\" (selector-no-qualifying-type)", "correct warning text")
t.is(result.warnings()[4].text, "Unexpected qualifying type selector \"a[href=\'place\']\" (selector-no-qualifying-type)", "correct warning text")
}
})

function logError(err) {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/shorthand.spec.js
Expand Up @@ -21,7 +21,7 @@ test("Shorthand scss", t => {

function checkResult(result) {
t.equal(result.warnings().length, 1, "flags 1 warning")
t.is(result.warnings()[0].text, "Unexpected longhand value \'1px 1px 1px 1px\' instead of \'1px\' (shorthand-property-no-redundant-values)", "correct warning text")
t.is(result.warnings()[0].text, "Expected \"1px 1px 1px 1px\" to be \"1px\" (shorthand-property-no-redundant-values)", "correct warning text")
}
})

Expand Down
34 changes: 0 additions & 34 deletions __tests__/unit/single-line-per-property.spec.js

This file was deleted.

18 changes: 0 additions & 18 deletions index.js
Expand Up @@ -6,30 +6,18 @@ module.exports = {
"at-rule-no-unknown": null,
"at-rule-no-vendor-prefix": true,
"block-no-empty": true,
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-named": "never",
"color-no-invalid-hex": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-property-value-disallowed-list": {
"border": ["none"],
"border-top": ["none"],
"border-right": ["none"],
"border-bottom": ["none"],
"border-left": ["none"]
},
"function-comma-space-after": "always-single-line",
"function-parentheses-space-inside": "never",
"function-url-quotes": "always",
"indentation": 2,
"length-zero-no-unit": true,
"max-nesting-depth": [
1,
Expand All @@ -43,10 +31,6 @@ module.exports = {
}
],
"media-feature-name-no-vendor-prefix": true,
"media-feature-parentheses-space-inside": "never",
"no-missing-end-of-source-newline": true,
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"order/order": [
[
"custom-properties",
Expand Down Expand Up @@ -97,15 +81,13 @@ module.exports = {
"Selector should be written in lowercase with hyphens (selector-class-pattern)"
}
],
"selector-list-comma-newline-after": "always",
"selector-max-compound-selectors": 3,
"selector-max-id": 0,
"selector-no-qualifying-type": true,
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"shorthand-property-no-redundant-values": true,
"string-quotes": "single",
"value-no-vendor-prefix": true
}
}