主题 lint 失败,因为 -- 未能找到 "@discourse/lint-configs/stylelint"

我有一个主题组件,是几天前从一个骨架开始的。在我本地运行时,它似乎通过了测试,但在 GitHub 上却失败了。所以我运行了 mass-pr 来更新主题内容,现在它失败了,看起来不是我的错:

Run if test -f stylelint.config.mjs; then
  if test -f stylelint.config.mjs; then
    pnpm stylelint --allow-empty-input "{javascripts,desktop,mobile,common,scss}/**/*.scss"
  fi
  shell: /usr/bin/bash -e {0}
  env:
    JS_PKG_MANAGER_NULL_VALUE: none
Error: Could not find "@discourse/lint-configs/stylelint". Do you need to install the package or use the "configBasedir" option?
    at configurationError (file:///home/runner/work/right-sidebar-blocks-customization/right-sidebar-blocks-customization/node_modules/.pnpm/stylelint@16.14.1_typescript@5.8.2/node_modules/stylelint/lib/utils/configurationError.mjs:12:49)
    at getModulePath (file:///home/runner/work/right-sidebar-blocks-customization/right-sidebar-blocks-customization/node_modules/.pnpm/stylelint@16.14.1_typescript@5.8.2/node_modules/stylelint/lib/utils/getModulePath.mjs:29:9)
    at loadExtendedConfig (file:///home/runner/work/right-sidebar-blocks-customization/right-sidebar-blocks-customization/node_modules/.pnpm/stylelint@16.14.1_typescript@5.8.2/node_modules/stylelint/lib/augmentConfig.mjs:225:21)

有什么我能做的吗?

3 个赞

查看您的 package.json,发现 @discourse/lint-configs 的版本回退到了 \"@discourse/lint-configs\": \"2.4.0\"

最新的 lint-configs 版本实际上是 2.11.0
https://www.npmjs.com/package/@discourse/lint-configs/v/2.11.0?activeTab=readme

2 个赞

啊,我们还没有将 mass-pr 的更改合并到 stylelint。但我们更新了骨架。所以运行 mass-pr 的 main 版本让你的仓库倒退了 :sweat_smile:

有一个 PR 正在进行中 在此处,所以你也许可以查看一下并用它来修复问题。

@cvx 我们能合并这个 PR 吗?还是还有更多需要添加的?)

2 个赞

我想,质量を引き抜いたのはスケルトンからだ。もっと注意を払ってみます。

1 个赞

已推送所有剩余更改,准备重新审查!

没错,但它只复制了一些文件(它知道的文件)::smiley:

4 个赞