Skip to content

Commit ec7370c

Browse files
committed
add stylelint for css with all rules disabled
1 parent 9e6c500 commit ec7370c

3 files changed

Lines changed: 51 additions & 17 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"oxlint-tsgolint": "0.20.0",
7474
"prettier": "3.7.1",
7575
"stylelint": "17.6.0",
76+
"stylelint-config-standard": "40.0.0",
7677
"stylelint-config-standard-scss": "17.0.0",
7778
"turbo": "2.7.5",
7879
"vitest": "4.1.0",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stylelint.config.mjs

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/** @type {import('stylelint').Config} */
22
export default {
3-
extends: ["stylelint-config-standard-scss"],
3+
extends: ["stylelint-config-standard"],
44
rules: {
5-
"font-family-no-missing-generic-family-keyword": [
6-
true,
7-
{ ignoreFontFamilies: ["Font Awesome", "Font Awesome Brands"] },
8-
], //default: true
5+
"no-descending-specificity": null, // add
96

10-
"selector-type-no-unknown": [
11-
true,
12-
{ ignore: ["custom-elements"], ignoreTypes: ["letter", "hint"] },
13-
], // default: [true, {ignore: ['custom-elements'],},]
7+
"no-duplicate-selectors": null, // add
8+
9+
"font-family-no-missing-generic-family-keyword": null, // add
10+
11+
"declaration-block-no-shorthand-property-overrides": null, // add
12+
13+
"at-rule-no-unknown": null, // consider adding
14+
"declaration-property-value-no-unknown": null, // add
15+
"selector-type-no-unknown": null, // add // default: [true, {ignore: ['custom-elements'],},]
1416

1517
"length-zero-no-unit": null, // default: [true, {ignore: ['custom-properties'], ignorePreludeOfAtRules: ['function', 'mixin'],},]
1618

19+
"property-no-vendor-prefix": null, // add
20+
21+
"value-keyword-case": null, // default: lower
22+
1723
"at-rule-empty-line-before": null, // default: ['always', {except: ['blockless-after-same-name-blockless', 'first-nested'], ignore: ['after-comment'],},]
1824
"comment-empty-line-before": null, // default: ['always', {except: ['first-nested'], ignore: ['stylelint-commands'],},]
1925
"custom-property-empty-line-before": null, // default: 'custom-property-empty-line-before': ['always',{except: ['after-custom-property', 'first-nested'],ignore: ['after-comment', 'inside-single-line-block'],},]
@@ -23,28 +29,52 @@ export default {
2329
"alpha-value-notation": null, // default: ['percentage',{exceptProperties: ['opacity','fill-opacity','flood-opacity','stop-opacity','stroke-opacity',],},]
2430
"color-function-alias-notation": null, // default: without-alpha
2531
"color-function-notation": null, // default: modern
32+
"color-hex-length": null, // default: short
2633
"hue-degree-notation": null, // default: angle
34+
"import-notation": null, // default: url
2735
"media-feature-range-notation": null, // default: context
2836
"selector-not-notation": null, // default: complex
37+
"selector-pseudo-element-colon-notation": null, // add // default: double
2938

3039
// default pattern for these rules is a kebab case pattern
3140
"custom-property-pattern": null,
3241
"keyframes-name-pattern": null,
3342
"selector-class-pattern": null,
3443
"selector-id-pattern": null,
3544

45+
"font-family-name-quotes": null, // add // default: always-where-recommended
46+
"function-url-quotes": null, // add // default: always
47+
3648
"declaration-block-no-redundant-longhand-properties": null,
3749
"shorthand-property-no-redundant-values": null,
3850

3951
"comment-whitespace-inside": null, // default: always
52+
},
53+
overrides: [
54+
{
55+
files: ["**/*.scss"],
56+
extends: ["stylelint-config-standard-scss"],
57+
rules: {
58+
"font-family-no-missing-generic-family-keyword": [
59+
true,
60+
{ ignoreFontFamilies: ["Font Awesome", "Font Awesome Brands"] },
61+
], //default: true
4062

41-
"scss/at-extend-no-missing-placeholder": null,
42-
"scss/load-no-partial-leading-underscore": null,
43-
"scss/load-partial-extension": null, // default: never,
44-
"scss/no-global-function-names": null,
63+
"selector-type-no-unknown": [
64+
true,
65+
{ ignore: ["custom-elements"], ignoreTypes: ["letter", "hint"] },
66+
], // default: [true, {ignore: ['custom-elements'],},]
4567

46-
"scss/dollar-variable-pattern": null, // default pattern is a kebab case pattern
47-
"scss/double-slash-comment-empty-line-before": null, // default: ['always', {except: ['first-nested'], ignore: ['between-comments', 'stylelint-commands'],},]
48-
"scss/double-slash-comment-whitespace-inside": null, // default: always
49-
},
68+
"scss/at-extend-no-missing-placeholder": null,
69+
"scss/load-no-partial-leading-underscore": null,
70+
"scss/load-partial-extension": null, // default: never,
71+
"scss/no-global-function-names": null,
72+
73+
"scss/dollar-variable-pattern": null,
74+
"scss/double-slash-comment-empty-line-before": null,
75+
"scss/double-slash-comment-whitespace-inside": null,
76+
},
77+
},
78+
],
79+
ignoreFiles: ["**/dist/**"],
5080
};

0 commit comments

Comments
 (0)