fix: use import.meta.dirname for stylelint config path resolution
The previous process.cwd() approach still failed on CI runners. Using import.meta.dirname gives us the actual directory of the config file, which is the project root, regardless of runner execution context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import path from 'node:path';
|
||||
import type {Config} from 'stylelint';
|
||||
|
||||
// Use process.cwd() for more reliable path resolution across different environments
|
||||
// Use import.meta.dirname for reliable path resolution in ESM context
|
||||
// This gives us the directory where this config file lives (project root)
|
||||
const cssVarFiles = [
|
||||
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'),
|
||||
path.join(import.meta.dirname, 'web_src/css/base.css'),
|
||||
path.join(import.meta.dirname, 'web_src/css/themes/theme-gitea-light.css'),
|
||||
path.join(import.meta.dirname, 'web_src/css/themes/theme-gitea-dark.css'),
|
||||
];
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user