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

Unknown word CssSyntaxError #286

Open
1 task
strongyc opened this issue Apr 6, 2023 · 8 comments
Open
1 task

Unknown word CssSyntaxError #286

strongyc opened this issue Apr 6, 2023 · 8 comments

Comments

@strongyc
Copy link

strongyc commented Apr 6, 2023

Basic Info

  • Package Name And Version: arco-design-pro-vue@2.7.1
  • Browser: chrome109.0.0.0

Extra info

D:\vue3Project\sso-arco-web\sso-arco-web\src\assets\style\breakpoint.less: When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-less", and use the "customSyntax" option
D:\vue3Project\sso-arco-web\sso-arco-web\src\assets\style\global.less: When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-less", and use the "customSyntax" option

src/assets/style/breakpoint.less
1:1 ✖ Unknown word CssSyntaxError

What is expected?

D:\vue3Project\sso-arco-web\sso-arco-web\src\assets\style\breakpoint.less: When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-less", and use the "customSyntax" option
D:\vue3Project\sso-arco-web\sso-arco-web\src\assets\style\global.less: When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-less", and use the "customSyntax" option

src/assets/style/breakpoint.less
1:1 ✖ Unknown word CssSyntaxError

@sHow8e
Copy link
Member

sHow8e commented Apr 17, 2023

@strongyc 如何复现呢?建议先重装依赖看看哈。

@chenxi2015
Copy link

我也有这个错误 怎么都提交不上去 请问如何解决

@wilhantian
Copy link

@sHow8e 使用arco-cli创建默认项目,git commit 后就会报错

@sHow8e
Copy link
Member

sHow8e commented Jul 3, 2023

@wilhantian #235 参考一下这个?

@wilhantian
Copy link

wilhantian commented Jul 3, 2023

@wilhantian #235 参考一下这个?

@sHow8e 尝试添加 postcss-less & stylelint-config-recommended-less,错误还在。是否还有其他办法?

@chenzio
Copy link

chenzio commented Jul 10, 2023

@wilhantian #235 参考一下这个?

@sHow8e 尝试添加 postcss-less & stylelint-config-recommended-less,错误还在。是否还有其他办法?

添加了postcss-less & stylelint-config-recommended-less,并在stylelint config中添加

module.exports = {
  customSyntax: 'postcss-html',
  extends: [
    'stylelint-config-standard',
    'stylelint-config-rational-order',
    'stylelint-config-prettier',
    'stylelint-config-recommended-vue',
    'stylelint-config-recommended-less',
  ],

之后遇到了另一个问题,

src/views/redirect/index.vue
 16:27  ✖  Unknown rule selector-anb-no-unmatchable  selector-anb-no-unmatchable

通过升级 "stylelint": "^15.3.0",解决

@techless
Copy link

最后配置成这样,我这没有peer 和stylelint 问题

.stylelintrc.js

customSyntax: 'postcss-html',
extends: [
  'stylelint-config-standard',
  'stylelint-config-rational-order',
  'stylelint-config-recommended-vue',
],

package.json

"devDependencies": {
    "stylelint": "^15.10.1",
    "stylelint-config-rational-order": "^0.1.2",
    "stylelint-config-recommended-vue": "^1.4.0",
    "stylelint-config-standard": "^34.0.0",
    "stylelint-order": "^6.0.3"
}

@xiaoriri-cloud
Copy link

.stylelintrc.js
加入下面这个就可以了,我最新版拉下来的也是这样
customSyntax: 'postcss-html',

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

7 participants