При запуске stylelint в выводе предупреждений не отображается имя файла, в котором произошла ошибка (с ошибками он работает нормально). Мои файлы выглядят так:
app.s css
@import './_file-with-error';
_file-with-error.s css
html body {
color: red;
}
body { // provocate an error ?
color: red;
}
Я использую Webpack Encore и stylelint как плагин Post CSS, при сборке я получаю:
michael@machine:~$ yarn encore dev
yarn run v1.21.1
$ /var/www/html/mop/mop/node_modules/.bin/encore dev
Running webpack ...
WARNING Compiled with 1 warnings 11:47:14 PM
warning in ./assets/scss/app.scss
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(5:1) Expected selector "body" to come before selector "html body" (no-descending-specificity)
Entrypoint app [big] = runtime.js vendors~app.js app.css app.js
Entrypoint home = runtime.js home.js
Entrypoint _tmp_copy = runtime.js
Done in 3.06s.
Так что все в порядке, просто я не вижу, откуда приходит предупреждение, мне нужно имя файла и строка . Как я могу это настроить?
Настройка
webpack.config. js
Encore.enablePostCssLoader();
post css .config. js
module.exports = {
plugins: {
autoprefixer: {},
stylelint: {},
},
};
.stylelintr c. json
{
"extends": "stylelint-config-standard",
"rules": {
"no-duplicate-selectors": null
}
}