Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✖ stylelint --fix: TypeError: opts.node.rangeBy is not a function #2808

Closed
1 task done
QYG2297248353 opened this issue Nov 17, 2023 · 6 comments
Closed
1 task done

Comments

@QYG2297248353
Copy link

基本信息

额外补充

一份依赖 npm ls
-- @arco-design/[email protected]
-- @arco-plugins/[email protected]
-- @commitlint/[email protected]
-- @commitlint/[email protected]
-- @types/[email protected]
-- @types/[email protected]
-- @types/[email protected]
-- @types/[email protected]
-- @typescript-eslint/[email protected]
-- @typescript-eslint/[email protected]
-- @vitejs/[email protected]
-- @vitejs/[email protected]
-- @vue/[email protected]
-- @vueuse/[email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
`-- [email protected]

预期结果

正常提交

复现步骤

修改任何 vue 文件
git commit -am 'test: test'
执行到 npx lint-staged
[STARTED] stylelint --fix
[FAILED] stylelint --fix [FAILED]
[FAILED] stylelint --fix [FAILED]
[FAILED] stylelint --fix [FAILED]

报错内容
✖ stylelint --fix:
TypeError: opts.node.rangeBy is not a function

@Axbros
Copy link

Axbros commented Jan 18, 2024

请问修复了吗

@QYG2297248353
Copy link
Author

请问修复了吗

没有,强迫症可能受不了,但是不影响代码运行,把提交效验也去掉。
影响:代码规范

@laopoom
Copy link

laopoom commented Mar 28, 2024

image
版本兼容问题,用这个组合可以不报错了 @QYG2297248353

@mortence
Copy link

image 版本兼容问题,用这个组合可以不报错了 @QYG2297248353

问题的根源貌似是 stylelint-config-rational-order 插件依赖的 stylelint版本太老了,卸载 stylelint-config-rational-order 后就可以了

@betgar
Copy link

betgar commented Jul 26, 2024

image 版本兼容问题,用这个组合可以不报错了 @QYG2297248353

问题的根源貌似是 stylelint-config-rational-order 插件依赖的 stylelint版本太老了,卸载 stylelint-config-rational-order 后就可以了

没错了,这个插件依赖postcss版本太旧,卸载插件,我使用 stylelint-config-recess-order代替了,记得修改stylelint的配置文件

@z7z
Copy link

z7z commented Sep 12, 2024

解决了?我怎么还是遇到了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants