From 994006f527aeb51616d3c065cc3b89ef2544fbc2 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 6 Sep 2018 19:34:43 +0200 Subject: [PATCH] Add stylelint --- ui/package.json | 12 +++++++++--- ui/webpack.config.dev.js | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ui/package.json b/ui/package.json index 1b8ceda7f2..498de06d4f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -100,6 +100,7 @@ "copy-webpack-plugin": "^3.0.1", "cross-env": "^3.2.4", "css-loader": "^0.25.0", + "directory-tree": "^2.1.0", "eslint": "^3.4.0", "eslint-config-angular": "^0.5.0", "eslint-loader": "^1.5.0", @@ -112,6 +113,7 @@ "html-minifier-loader": "^1.3.4", "html-webpack-plugin": "^2.30.1", "img-loader": "^1.3.1", + "jsonminify": "^0.4.1", "less": "^2.7.1", "less-loader": "^2.2.3", "ng-annotate-loader": "^0.1.1", @@ -122,14 +124,18 @@ "react-hot-loader": "^3.0.0-beta.6", "sass-loader": "^4.0.2", "style-loader": "^0.13.1", + "stylelint": "^9.5.0", + "stylelint-config-recommended-scss": "^3.2.0", + "stylelint-config-standard": "^18.2.0", + "stylelint-order": "^1.0.0", + "stylelint-scss": "^3.3.0", + "stylelint-webpack-plugin": "^0.10.5", "url-loader": "^0.5.7", "webpack": "^1.13.2", "webpack-dev-middleware": "^1.6.1", "webpack-dev-server": "^1.15.1", "webpack-hot-middleware": "^2.12.2", - "webpack-material-design-icons": "^0.1.0", - "directory-tree": "^2.1.0", - "jsonminify": "^0.4.1" + "webpack-material-design-icons": "^0.1.0" }, "engine": "node >= 5.9.0", "nyc": { diff --git a/ui/webpack.config.dev.js b/ui/webpack.config.dev.js index 242ad9d7aa..cfff811b23 100644 --- a/ui/webpack.config.dev.js +++ b/ui/webpack.config.dev.js @@ -18,6 +18,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); +const StyleLintPlugin = require('stylelint-webpack-plugin') + const webpack = require('webpack'); const path = require('path'); const dirTree = require('directory-tree'); @@ -76,6 +78,7 @@ module.exports = { title: 'ThingsBoard', inject: 'body', }), + new StyleLintPlugin(), new webpack.optimize.OccurrenceOrderPlugin(), new webpack.NoErrorsPlugin(), new ExtractTextPlugin('style.[contentHash].css', {