5t3ph / 5t3ph/html-sass-jumpstart

dependencies, deprecated / and lint job doesn't work out of the box.

Đang mở
#19 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
HTML
Star
90
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Thanks for this great jumpstart. There are some small issues, you perhaps want to fix:

1. the dependencies in package.json should probably be devDependencies and can be updated to the latest versions.
```
"devDependencies": {
"autoprefixer": "^10.3.2",
"browser-sync": "^2.27.5",
"copyfiles": "^2.4.1",
"cssnano": "^5.0.8",
"npm-run-all": "^4.1.5",
"onchange": "^7.1.0",
"postcss-cli": "^8.3.1",
"sass": "^1.38.1",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.20.1",
"stylelint-selector-bem-pattern": "^2.1.1"
}

```

2. ./sass/_buttons.scss uses a / to divide the border-radius ( border-radius: $tdbc-border-radius/2; ) , but that use is deprecated and you should change it to math.div().

```
> sass src/sass:public/css

Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($tdbc-border-radius, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div


11 │ border-radius: $tdbc-border-radius/2;
│ ^^^^^^^^^^^^^^^^^^^^^

src\sass\_buttons.scss 11:18 @import
```

After changing that the message changed to:
```
Error: There is no module with the namespace "math".

11 │ border-radius: math.div($tdbc-border-radius, 2);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\sass\_buttons.scss 11:18 @import
```
That error was resolved when I added `@use "sass:math";` as a first line in `_buttons.scss`, but after that the lint job reported:
```
src/sass/_buttons.scss
1:1 ✖ Unexpected unknown at-rule "@use" at-rule-no-unknown

```
and I have no solution for that yet.

3. The lint and lint:fix script didn't work for me out of the box.
```
> tdbc-html-sass-jumpstart@0.4.0 lint
> stylelint 'src/sass/**/*.scss' 'src/sass/**/**/*.scss' 'src/sass/**/**/**/*.scss'

Error: No files matching the pattern "'src/sass/**/*.scss', 'src/sass/**/**/*.scss', 'src/sass/**/**/**/*.scss'" were found.
at C:\Users\Hans\Local Sites\html-sass-jumpstart\node_modules\stylelint\lib\standalone.js:212:12
at processTicksAndRejections (node:internal/process/task_queues:96:5)

```
The error was solved when I changed the single quotes in the definition by escaped double quotes .

```
"lint": "stylelint \"src/sass/**/*.scss\" \"src/sass/**/**/*.scss\" \"src/sass/**/**/**/*.scss\"",
"lint:fix": "stylelint --fix \"src/sass/**/*.scss\" \"src/sass/**/**/*.scss\" \"src/sass/**/**/**/*.scss\"",

```

After those changes it worked and the only remaining error is a lint-error about the @use. Probably you know better how to solve that one.

My local environment is git bash on a windows 10 machine, using vscode as an editor and firefox dev ed as browser.

Thanks

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.