Stylelint v15 で stylistic rules が非推奨になったので対応する
はじめに
Stylelint の
Stylelint の
Migrating to 15.0.0 - Deprecated stylistic rules
When we created these rules, pretty printers (like Prettier) didn't exist. They now offer a better way to consistently format code, especially whitespace. Linters and pretty printers are complementary tools that work together to help you write consistent and error-free code.
stylelint-stylistic などの
ただ、
方法
stylelint を
1npm install --save-dev stylelint-prettier prettier
1module.exports = {
2 extends: [
3 "stylelint-config-standard",
4 "stylelint-config-recess-order",
5 "stylelint-prettier/recommended", // ← 追加
6 ],
7 rules: {
8 "font-family-no-missing-generic-family-keyword": [
9 true,
10 {
11 ignoreFontFamilies: "Menlo",
12 },
13 ],
14 "selector-class-pattern": "^[a-z]|^[a-z][a-zA-Z0-9]+$",
15 "comment-empty-line-before": [
16 "always",
17 {
18 except: ["first-nested"],
19 ignore: ["after-comment"],
20 },
21 ],
22 },
23};
これでplugins
にextends
に
Stylelint を
1npm run stylelint --fix **/*.css
問題発生
一箇所、

すでに
おわりに
これまでは stylelint-config-prettier
を