11import type { Config } from "stylelint" ;
22
33import { tailwindConfig } from "./config/tailwind" ;
4- import { astroFiles , sassFiles } from "./files" ;
4+ import { astroFiles } from "./files" ;
55import { mergeConfigs } from "./util" ;
66
77type PresetOptions = {
@@ -23,12 +23,6 @@ type PresetOptions = {
2323 * @default false
2424 */
2525 cssModulesKit ?: boolean ;
26- /**
27- * Enable sass / scss rules.
28- *
29- * @default false
30- */
31- sass ?: boolean ;
3226 /**
3327 * Enable tailwindcss rules.
3428 *
@@ -55,7 +49,6 @@ export const createConfig = (
5549 a11y = true ,
5650 astro = false ,
5751 cssModulesKit = false ,
58- sass = false ,
5952 tailwindcss = false ,
6053 } = options ;
6154
@@ -89,80 +82,7 @@ export const createConfig = (
8982 } ) ;
9083 }
9184
92- if ( sass ) {
93- configs . push ( {
94- overrides : [
95- {
96- extends : [
97- "stylelint-config-standard-scss" ,
98- "stylelint-config-sass-guidelines" ,
99- ] ,
100- files : sassFiles ,
101- name : "@virtual-live-lab/stylelint-config/sass" ,
102- rules : {
103- // see: https://github.com/VirtualLiveLab/js-config/issues/178
104- "@stylistic/block-opening-brace-space-before" : null ,
105- "@stylistic/color-hex-case" : null ,
106- "@stylistic/declaration-bang-space-after" : null ,
107- "@stylistic/declaration-bang-space-before" : null ,
108- "@stylistic/declaration-block-semicolon-newline-after" : null ,
109- "@stylistic/declaration-block-semicolon-space-before" : null ,
110- "@stylistic/declaration-block-trailing-semicolon" : null ,
111- "@stylistic/declaration-colon-space-after" : null ,
112- "@stylistic/declaration-colon-space-before" : null ,
113- "@stylistic/function-comma-space-after" : null ,
114- "@stylistic/function-parentheses-space-inside" : null ,
115- "@stylistic/indentation" : null ,
116- "@stylistic/media-feature-parentheses-space-inside" : null ,
117- "@stylistic/no-missing-end-of-source-newline" : null ,
118- "@stylistic/number-leading-zero" : null ,
119- "@stylistic/number-no-trailing-zeros" : null ,
120- "@stylistic/selector-list-comma-newline-after" : null ,
121- "@stylistic/string-quotes" : null ,
122- } ,
123- } ,
124- ] ,
125- } ) ;
126- }
127-
12885 if ( astro ) {
129- // extends: ["stylelint-config-html/astro"] は最後に override に追加しないとパーサーの設定が壊れる
130- if ( sass ) {
131- configs . push ( {
132- overrides : [
133- {
134- extends : [
135- "stylelint-config-standard-scss" ,
136- "stylelint-config-sass-guidelines" ,
137- ] ,
138- files : astroFiles ,
139- name : "@virtual-live-lab/stylelint-config/astro/sass" ,
140- rules : {
141- // see: https://github.com/VirtualLiveLab/js-config/issues/178
142- "@stylistic/block-opening-brace-space-before" : null ,
143- "@stylistic/color-hex-case" : null ,
144- "@stylistic/declaration-bang-space-after" : null ,
145- "@stylistic/declaration-bang-space-before" : null ,
146- "@stylistic/declaration-block-semicolon-newline-after" : null ,
147- "@stylistic/declaration-block-semicolon-space-before" : null ,
148- "@stylistic/declaration-block-trailing-semicolon" : null ,
149- "@stylistic/declaration-colon-space-after" : null ,
150- "@stylistic/declaration-colon-space-before" : null ,
151- "@stylistic/function-comma-space-after" : null ,
152- "@stylistic/function-parentheses-space-inside" : null ,
153- "@stylistic/indentation" : null ,
154- "@stylistic/media-feature-parentheses-space-inside" : null ,
155- "@stylistic/no-missing-end-of-source-newline" : null ,
156- "@stylistic/number-leading-zero" : null ,
157- "@stylistic/number-no-trailing-zeros" : null ,
158- "@stylistic/selector-list-comma-newline-after" : null ,
159- "@stylistic/string-quotes" : null ,
160- } ,
161- } ,
162- ] ,
163- } ) ;
164- }
165-
16686 // この push が astro 向け override の最後であることを確認すること
16787 configs . push ( {
16888 overrides : [
@@ -176,7 +96,7 @@ export const createConfig = (
17696 }
17797
17898 if ( tailwindcss ) {
179- configs . push ( tailwindConfig ( { astro, sass } ) ) ;
99+ configs . push ( tailwindConfig ( { astro } ) ) ;
180100 }
181101
182102 if ( cssModulesKit ) {
0 commit comments