From 2e718a1053f4bba232bcb35304615d1b9566fb0d Mon Sep 17 00:00:00 2001 From: GitCaddy Date: Tue, 13 Jan 2026 00:00:45 +0000 Subject: [PATCH] fix: use process.cwd() for stylelint config path resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes stylelint configuration error on CI runners where import.meta.url resolves to the cached node_modules location instead of the project root. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- stylelint.config.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/stylelint.config.ts b/stylelint.config.ts index 8a5b87e17c..4f3bfd6649 100644 --- a/stylelint.config.ts +++ b/stylelint.config.ts @@ -1,10 +1,11 @@ -import {fileURLToPath} from 'node:url'; +import path from 'node:path'; import type {Config} from 'stylelint'; +// Use process.cwd() for more reliable path resolution across different environments const cssVarFiles = [ - fileURLToPath(new URL('web_src/css/base.css', import.meta.url)), - fileURLToPath(new URL('web_src/css/themes/theme-gitea-light.css', import.meta.url)), - fileURLToPath(new URL('web_src/css/themes/theme-gitea-dark.css', import.meta.url)), + path.join(process.cwd(), 'web_src/css/base.css'), + path.join(process.cwd(), 'web_src/css/themes/theme-gitea-light.css'), + path.join(process.cwd(), 'web_src/css/themes/theme-gitea-dark.css'), ]; export default { @@ -133,9 +134,9 @@ export default { 'media-feature-name-no-vendor-prefix': true, 'no-descending-specificity': null, 'no-invalid-position-at-import-rule': [true, {ignoreAtRules: ['tailwind']}], - 'no-unknown-animations': null, // disabled until stylelint supports multi-file linting - 'no-unknown-custom-media': null, // disabled until stylelint supports multi-file linting - 'no-unknown-custom-properties': null, // disabled until stylelint supports multi-file linting + 'no-unknown-animations': null, + 'no-unknown-custom-media': null, + 'no-unknown-custom-properties': null, 'plugin/declaration-block-no-ignored-properties': true, 'scale-unlimited/declaration-strict-value': [['/color$/', 'font-weight'], {ignoreValues: '/^(inherit|transparent|unset|initial|currentcolor|none)$/', ignoreFunctions: true, disableFix: true, expandShorthand: true}], 'selector-attribute-quotes': 'always',