configure stylelint

This commit is contained in:
Ray Elliott 2021-01-03 23:19:33 +00:00
parent ab036c29b1
commit 86e3e475ce
6 changed files with 1407 additions and 0 deletions

3
.vim/coc-settings.json Normal file
View File

@ -0,0 +1,3 @@
{
"css.validate": false
}

9
static-html/.stylelintrc Normal file
View File

@ -0,0 +1,9 @@
{
"extends": "stylelint-config-recommended",
"rules": {
"at-rule-no-unknown": [
true,
ignoreAtRules: ["mixin", "define-mixin"]
]
}
}

View File

@ -106,3 +106,7 @@ for `asset` default size is 8kb. - can configure see
## Environment variables
to use environment variables, must change module.exports to use a function.
stylelint - could only get it to read .stylelintrc after installing
coc-stylelintplus (adds extra features to coc-ctylelint)

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,9 @@
"postcss-preset-env": "^6.7.0",
"postcss-simple-vars": "^6.0.2",
"style-loader": "^2.0.0",
"stylelint": "^13.8.0",
"stylelint-config-recommended": "^3.0.0",
"stylelint-webpack-plugin": "^2.1.1",
"webpack": "^5.11.1",
"webpack-cli": "^4.3.1",
"webpack-dev-server": "^3.11.1"

View File

@ -2,6 +2,7 @@ const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssnanoPlugin = require ('cssnano-webpack-plugin');
const StylelintPlugin = require('stylelint-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = env => {
@ -28,6 +29,7 @@ module.exports = env => {
new HtmlWebpackPlugin({
template: './src/templates/index.ejs'
}),
new StylelintPlugin(),
],
module: {
rules: [