AleshaOleg / AleshaOleg/postcss-sass

Fix false positives for hex colour containing "e2" for border property in unit-no-unknown

未關閉
#166 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
92
分支
12
PR 合併指標
30 天內沒有已合併 PR

描述

Cross posting from: https://github.com/stylelint/stylelint/issues/5377
Demo of the issue can be found [here.](https://stylelint.io/demo#N4Igxg9gJgpiBcIB0BnCBbGBaMAbAhiigDoB2ABOQEYQBOst85AjAA4Ae5auAllOQGIArDAAMAdhgAmEABoQKAJ6kALvnYIFhFHPARSAMx4BzTcDKViIWgFdcMEgnLmKlclZukeKrKQhZPAGs-AHdSKyYVWxgLcgBfMjiQOKA).

If the problem is related to this repo, and I can help in any way or form, please let me know.

---

> Clearly describe the bug

There are false positives when trying to declare a border like this:
```sass
border: 1px solid #5e07e2
```

> Which rule, if any, is the bug related to?

`unit-no-unknown`

> What code is needed to reproduce the bug?

```sass
.some-class
border: 1px solid #5e07e2
```

> What stylelint configuration is needed to reproduce the bug?

```js
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
plugins: ['stylelint-order'],
rules: {
'at-rule-no-unknown': null,
'max-nesting-depth': 5,
'order/properties-alphabetical-order': true,
'selector-pseudo-element-no-unknown': [
true,
{
ignorePseudoElements: ['v-deep'],
},
],
},
}

```

> Which version of stylelint are you using?

`13.13.1`

> How are you running stylelint: CLI, PostCSS plugin, Node.js API?

In a Nuxt.js project with:

`@nuxtjs/stylelint-module'`

Also, through VSCode `stylelint-vscode` extension.

`stylelint.config.js` is posted above.

> Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

Seems related to using SASS syntax (not SCSS).

> What did you expect to happen?

No errors to be raised.

> What actually happened (e.g. what warnings or errors did you get)?

The following errors were raised:

```shell
ERROR Failed to compile with 1 errors friendly-errors
ERROR StylelintError friendly-errors

components/BaseSnackbar.vue
37:21 ✖ Unexpected unknown unit "e2" unit-no-unknown
```

It refers to the `e2` at the end of `#5e07e2`.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。