1+ // @ts -check
2+ import { defineConfig } from 'stylelint-define-config' ;
13import { fileURLToPath } from 'node:url' ;
24
35const cssVarFiles = [
@@ -6,8 +8,7 @@ const cssVarFiles = [
68 fileURLToPath ( new URL ( 'web_src/css/themes/theme-gitea-dark.css' , import . meta. url ) ) ,
79] ;
810
9- /** @type {import('stylelint').Config } */
10- export default {
11+ export default defineConfig ( {
1112 extends : 'stylelint-config-recommended' ,
1213 plugins : [
1314 'stylelint-declaration-strict-value' ,
@@ -120,13 +121,15 @@ export default {
120121 'csstools/value-no-unknown-custom-properties' : [ true , { importFrom : cssVarFiles } ] ,
121122 'declaration-block-no-duplicate-properties' : [ true , { ignore : [ 'consecutive-duplicates-with-different-values' ] } ] ,
122123 'declaration-block-no-redundant-longhand-properties' : [ true , { ignoreShorthands : [ 'flex-flow' , 'overflow' , 'grid-template' ] } ] ,
124+ // @ts -expect-error - https://github.com/stylelint-types/stylelint-define-config/issues/1
123125 'declaration-property-unit-disallowed-list' : { 'line-height' : [ 'em' ] } ,
126+ // @ts -expect-error - https://github.com/stylelint-types/stylelint-define-config/issues/1
124127 'declaration-property-value-disallowed-list' : { 'word-break' : [ 'break-word' ] } ,
125128 'font-family-name-quotes' : 'always-where-recommended' ,
126129 'function-name-case' : 'lower' ,
127130 'function-url-quotes' : 'always' ,
128131 'import-notation' : 'string' ,
129- 'length-zero-no-unit' : [ true , { ignore : [ 'custom-properties' ] } , { ignoreFunctions : [ 'var' ] } ] ,
132+ 'length-zero-no-unit' : [ true , { ignore : [ 'custom-properties' ] , ignoreFunctions : [ 'var' ] } ] ,
130133 'media-feature-name-no-vendor-prefix' : true ,
131134 'no-descending-specificity' : null ,
132135 'no-invalid-position-at-import-rule' : [ true , { ignoreAtRules : [ 'tailwind' ] } ] ,
@@ -143,4 +146,4 @@ export default {
143146 'shorthand-property-no-redundant-values' : true ,
144147 'value-no-vendor-prefix' : [ true , { ignoreValues : [ 'box' , 'inline-box' ] } ] ,
145148 } ,
146- } ;
149+ } ) ;
0 commit comments