gitech
/
stylelint.config.js
246 строк · 10.9 Кб
1import {fileURLToPath} from 'node:url';2
3const cssVarFiles = [4fileURLToPath(new URL('web_src/css/base.css', import.meta.url)),5fileURLToPath(new URL('web_src/css/themes/theme-gitea-light.css', import.meta.url)),6fileURLToPath(new URL('web_src/css/themes/theme-gitea-dark.css', import.meta.url)),7];8
9/** @type {import('stylelint').Config} */
10export default {11plugins: [12'stylelint-declaration-strict-value',13'stylelint-declaration-block-no-ignored-properties',14'stylelint-value-no-unknown-custom-properties',15'@stylistic/stylelint-plugin',16],17ignoreFiles: [18'**/*.go',19'/web_src/fomantic',20],21overrides: [22{23files: ['**/chroma/*', '**/codemirror/*', '**/standalone/*', '**/console.css', 'font_i18n.css'],24rules: {25'scale-unlimited/declaration-strict-value': null,26},27},28{29files: ['**/chroma/*', '**/codemirror/*'],30rules: {31'block-no-empty': null,32},33},34{35files: ['**/*.vue'],36customSyntax: 'postcss-html',37},38],39rules: {40'@stylistic/at-rule-name-case': null,41'@stylistic/at-rule-name-newline-after': null,42'@stylistic/at-rule-name-space-after': null,43'@stylistic/at-rule-semicolon-newline-after': null,44'@stylistic/at-rule-semicolon-space-before': null,45'@stylistic/block-closing-brace-empty-line-before': null,46'@stylistic/block-closing-brace-newline-after': null,47'@stylistic/block-closing-brace-newline-before': null,48'@stylistic/block-closing-brace-space-after': null,49'@stylistic/block-closing-brace-space-before': null,50'@stylistic/block-opening-brace-newline-after': null,51'@stylistic/block-opening-brace-newline-before': null,52'@stylistic/block-opening-brace-space-after': null,53'@stylistic/block-opening-brace-space-before': 'always',54'@stylistic/color-hex-case': 'lower',55'@stylistic/declaration-bang-space-after': 'never',56'@stylistic/declaration-bang-space-before': null,57'@stylistic/declaration-block-semicolon-newline-after': null,58'@stylistic/declaration-block-semicolon-newline-before': null,59'@stylistic/declaration-block-semicolon-space-after': null,60'@stylistic/declaration-block-semicolon-space-before': 'never',61'@stylistic/declaration-block-trailing-semicolon': null,62'@stylistic/declaration-colon-newline-after': null,63'@stylistic/declaration-colon-space-after': null,64'@stylistic/declaration-colon-space-before': 'never',65'@stylistic/function-comma-newline-after': null,66'@stylistic/function-comma-newline-before': null,67'@stylistic/function-comma-space-after': null,68'@stylistic/function-comma-space-before': null,69'@stylistic/function-max-empty-lines': 0,70'@stylistic/function-parentheses-newline-inside': 'never-multi-line',71'@stylistic/function-parentheses-space-inside': null,72'@stylistic/function-whitespace-after': null,73'@stylistic/indentation': 2,74'@stylistic/linebreaks': null,75'@stylistic/max-empty-lines': 1,76'@stylistic/max-line-length': null,77'@stylistic/media-feature-colon-space-after': null,78'@stylistic/media-feature-colon-space-before': 'never',79'@stylistic/media-feature-name-case': null,80'@stylistic/media-feature-parentheses-space-inside': null,81'@stylistic/media-feature-range-operator-space-after': 'always',82'@stylistic/media-feature-range-operator-space-before': 'always',83'@stylistic/media-query-list-comma-newline-after': null,84'@stylistic/media-query-list-comma-newline-before': null,85'@stylistic/media-query-list-comma-space-after': null,86'@stylistic/media-query-list-comma-space-before': null,87'@stylistic/named-grid-areas-alignment': null,88'@stylistic/no-empty-first-line': null,89'@stylistic/no-eol-whitespace': true,90'@stylistic/no-extra-semicolons': true,91'@stylistic/no-missing-end-of-source-newline': null,92'@stylistic/number-leading-zero': null,93'@stylistic/number-no-trailing-zeros': null,94'@stylistic/property-case': 'lower',95'@stylistic/selector-attribute-brackets-space-inside': null,96'@stylistic/selector-attribute-operator-space-after': null,97'@stylistic/selector-attribute-operator-space-before': null,98'@stylistic/selector-combinator-space-after': null,99'@stylistic/selector-combinator-space-before': null,100'@stylistic/selector-descendant-combinator-no-non-space': null,101'@stylistic/selector-list-comma-newline-after': null,102'@stylistic/selector-list-comma-newline-before': null,103'@stylistic/selector-list-comma-space-after': 'always-single-line',104'@stylistic/selector-list-comma-space-before': 'never-single-line',105'@stylistic/selector-max-empty-lines': 0,106'@stylistic/selector-pseudo-class-case': 'lower',107'@stylistic/selector-pseudo-class-parentheses-space-inside': 'never',108'@stylistic/selector-pseudo-element-case': 'lower',109'@stylistic/string-quotes': 'double',110'@stylistic/unicode-bom': null,111'@stylistic/unit-case': 'lower',112'@stylistic/value-list-comma-newline-after': null,113'@stylistic/value-list-comma-newline-before': null,114'@stylistic/value-list-comma-space-after': null,115'@stylistic/value-list-comma-space-before': null,116'@stylistic/value-list-max-empty-lines': 0,117'alpha-value-notation': null,118'annotation-no-unknown': true,119'at-rule-allowed-list': null,120'at-rule-disallowed-list': null,121'at-rule-empty-line-before': null,122'at-rule-no-unknown': [true, {ignoreAtRules: ['tailwind']}],123'at-rule-no-vendor-prefix': true,124'at-rule-property-required-list': null,125'block-no-empty': true,126'color-function-notation': null,127'color-hex-alpha': null,128'color-hex-length': null,129'color-named': null,130'color-no-hex': null,131'color-no-invalid-hex': true,132'comment-empty-line-before': null,133'comment-no-empty': true,134'comment-pattern': null,135'comment-whitespace-inside': null,136'comment-word-disallowed-list': null,137'csstools/value-no-unknown-custom-properties': [true, {importFrom: cssVarFiles}],138'custom-media-pattern': null,139'custom-property-empty-line-before': null,140'custom-property-no-missing-var-function': true,141'custom-property-pattern': null,142'declaration-block-no-duplicate-custom-properties': true,143'declaration-block-no-duplicate-properties': [true, {ignore: ['consecutive-duplicates-with-different-values']}],144'declaration-block-no-redundant-longhand-properties': null,145'declaration-block-no-shorthand-property-overrides': null,146'declaration-block-single-line-max-declarations': null,147'declaration-empty-line-before': null,148'declaration-no-important': null,149'declaration-property-max-values': null,150'declaration-property-unit-allowed-list': null,151'declaration-property-unit-disallowed-list': {'line-height': ['em']},152'declaration-property-value-allowed-list': null,153'declaration-property-value-disallowed-list': null,154'declaration-property-value-no-unknown': true,155'font-family-name-quotes': 'always-where-recommended',156'font-family-no-duplicate-names': true,157'font-family-no-missing-generic-family-keyword': true,158'font-weight-notation': null,159'function-allowed-list': null,160'function-calc-no-unspaced-operator': true,161'function-disallowed-list': null,162'function-linear-gradient-no-nonstandard-direction': true,163'function-name-case': 'lower',164'function-no-unknown': true,165'function-url-no-scheme-relative': null,166'function-url-quotes': 'always',167'function-url-scheme-allowed-list': null,168'function-url-scheme-disallowed-list': null,169'hue-degree-notation': null,170'import-notation': 'string',171'keyframe-block-no-duplicate-selectors': true,172'keyframe-declaration-no-important': true,173'keyframe-selector-notation': null,174'keyframes-name-pattern': null,175'length-zero-no-unit': [true, {ignore: ['custom-properties']}, {ignoreFunctions: ['var']}],176'max-nesting-depth': null,177'media-feature-name-allowed-list': null,178'media-feature-name-disallowed-list': null,179'media-feature-name-no-unknown': true,180'media-feature-name-no-vendor-prefix': true,181'media-feature-name-unit-allowed-list': null,182'media-feature-name-value-allowed-list': null,183'media-feature-name-value-no-unknown': true,184'media-feature-range-notation': null,185'media-query-no-invalid': true,186'named-grid-areas-no-invalid': true,187'no-descending-specificity': null,188'no-duplicate-at-import-rules': true,189'no-duplicate-selectors': true,190'no-empty-source': true,191'no-invalid-double-slash-comments': true,192'no-invalid-position-at-import-rule': [true, {ignoreAtRules: ['tailwind']}],193'no-irregular-whitespace': true,194'no-unknown-animations': null,195'no-unknown-custom-properties': null,196'number-max-precision': null,197'plugin/declaration-block-no-ignored-properties': true,198'property-allowed-list': null,199'property-disallowed-list': null,200'property-no-unknown': true,201'property-no-vendor-prefix': null,202'rule-empty-line-before': null,203'rule-selector-property-disallowed-list': null,204'scale-unlimited/declaration-strict-value': [['/color$/', 'font-weight'], {ignoreValues: '/^(inherit|transparent|unset|initial|currentcolor|none)$/', ignoreFunctions: false, disableFix: true, expandShorthand: true}],205'selector-anb-no-unmatchable': true,206'selector-attribute-name-disallowed-list': null,207'selector-attribute-operator-allowed-list': null,208'selector-attribute-operator-disallowed-list': null,209'selector-attribute-quotes': 'always',210'selector-class-pattern': null,211'selector-combinator-allowed-list': null,212'selector-combinator-disallowed-list': null,213'selector-disallowed-list': null,214'selector-id-pattern': null,215'selector-max-attribute': null,216'selector-max-class': null,217'selector-max-combinators': null,218'selector-max-compound-selectors': null,219'selector-max-id': null,220'selector-max-pseudo-class': null,221'selector-max-specificity': null,222'selector-max-type': null,223'selector-max-universal': null,224'selector-nested-pattern': null,225'selector-no-qualifying-type': null,226'selector-no-vendor-prefix': true,227'selector-not-notation': null,228'selector-pseudo-class-allowed-list': null,229'selector-pseudo-class-disallowed-list': null,230'selector-pseudo-class-no-unknown': true,231'selector-pseudo-element-allowed-list': null,232'selector-pseudo-element-colon-notation': 'double',233'selector-pseudo-element-disallowed-list': null,234'selector-pseudo-element-no-unknown': true,235'selector-type-case': 'lower',236'selector-type-no-unknown': [true, {ignore: ['custom-elements']}],237'shorthand-property-no-redundant-values': true,238'string-no-newline': true,239'time-min-milliseconds': null,240'unit-allowed-list': null,241'unit-disallowed-list': null,242'unit-no-unknown': true,243'value-keyword-case': null,244'value-no-vendor-prefix': [true, {ignoreValues: ['box', 'inline-box']}],245},246};247