arco-design / arco-design-vue

A Vue.js 3 UI Library based on Arco Design
https://arco.design/vue
MIT License
2.65k stars 514 forks source link

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

Closed QYG2297248353 closed 9 months ago

QYG2297248353 commented 9 months ago

基本信息

额外补充

一份依赖 npm ls -- @arco-design/web-vue@2.52.1 -- @arco-plugins/vite-vue@1.4.5 -- @commitlint/cli@17.8.1 -- @commitlint/config-conventional@17.8.1 -- @types/crypto-js@4.1.3 -- @types/lodash@4.14.200 -- @types/nprogress@0.2.2 -- @types/qrcode@1.5.4 -- @typescript-eslint/eslint-plugin@5.62.0 -- @typescript-eslint/parser@5.62.0 -- @vitejs/plugin-vue-jsx@2.1.1 -- @vitejs/plugin-vue@3.2.0 -- @vue/babel-plugin-jsx@1.1.5 -- @vueuse/core@9.13.0 -- arco-design-pro-vue@2.7.2 -- axios@1.6.0 -- consola@2.15.3 -- cross-env@7.0.3 -- crypto-js@4.2.0 -- eslint-config-airbnb-base@15.0.0 -- eslint-config-prettier@8.10.0 -- eslint-import-resolver-typescript@3.6.1 -- eslint-plugin-import@2.28.1 -- eslint-plugin-prettier@4.2.1 -- eslint-plugin-vue@9.17.0 -- eslint@8.52.0 -- husky@8.0.3 -- jsbarcode@3.11.5 -- jsencrypt@3.3.2 -- less@4.2.0 -- lint-staged@13.3.0 -- lodash@4.17.21 -- mitt@3.0.1 -- npm-run-all@4.1.5 -- nprogress@0.2.0 -- pinia-plugin-persistedstate@3.2.0 -- pinia@2.1.7 -- postcss-html@1.5.0 -- prettier@2.8.8 -- qrcode@1.5.3 -- rollup-plugin-visualizer@5.9.2 -- rollup@3.29.4 -- stylelint-config-prettier@9.0.5 -- stylelint-config-rational-order@0.0.4 -- stylelint-config-recommended-vue@1.5.0 -- stylelint-config-standard@29.0.0 -- stylelint-order@5.0.0 -- stylelint@14.16.1 -- terser@5.22.0 -- typescript@4.9.5 -- unplugin-vue-components@0.24.1 -- vite-plugin-compression@0.5.1 -- vite-plugin-eslint@1.8.1 -- vite-plugin-imagemin@0.6.1 -- vite-svg-loader@3.6.0 -- vite@3.2.7 -- vue-cropper@1.1.1 -- vue-i18n@9.5.0 -- vue-router@4.2.5 -- vue-tsc@1.8.19 -- vue@3.3.6 -- web-storage-cache@1.1.1 `-- xlsx@0.18.5

预期结果

正常提交

复现步骤

修改任何 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 commented 7 months ago

请问修复了吗

QYG2297248353 commented 6 months ago

请问修复了吗

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

laopoom commented 5 months ago

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

mortence commented 2 months ago

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

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

betgar commented 1 month ago

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

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

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