0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix: extend scss lint to webpack dev and prod env

This commit is contained in:
Juan Picado @jotadeveloper 2017-07-22 17:34:29 +02:00
parent d72ee76d74
commit e84ff197ec
No known key found for this signature in database
GPG key ID: 18AC54485952D158
5 changed files with 20 additions and 4 deletions

View file

@ -74,10 +74,10 @@
"eslint-plugin-import": "2.6.1",
"eslint-plugin-react": "7.1.0",
"extract-text-webpack-plugin": "3.0.0",
"github-markdown-css": "2.8.0",
"file-loader": "0.11.2",
"flow-runtime": "0.13.0",
"friendly-errors-webpack-plugin": "1.6.1",
"github-markdown-css": "2.8.0",
"html-webpack-plugin": "2.29.0",
"in-publish": "2.0.0",
"localstorage-memory": "1.0.2",
@ -99,6 +99,7 @@
"style-loader": "0.18.2",
"stylelint": "7.13.0",
"stylelint-config-standard": "16.0.0",
"stylelint-webpack-plugin": "0.8.0",
"url-loader": "0.5.8",
"webpack": "3.2.0",
"webpack-dev-server": "2.5.0",
@ -124,7 +125,7 @@
"test-only": "mocha ./test/functional ./test/unit",
"lint": "eslint .",
"lint:css": "stylelint 'src/**/*.scss' --syntax scss",
"pre:webpack": "npm run lint:css && npm run lint",
"pre:webpack": "npm run lint",
"build:webui": "npm run pre:webpack && rimraf static/* && webpack --config tools/webpack.prod.config.babel.js --debug",
"dev:webui": "babel-node tools/dev.server.js",
"prepublish": "in-publish && npm run build:webui || not-in-publish",

View file

@ -1,7 +1,6 @@
@import '../../styles/variable';
.pkgDetail {
.title {
font-size: 28px;
color: $text-black;
@ -10,5 +9,4 @@ .pkgDetail {
.readme {
margin-bottom: 5em;
}
}

View file

@ -1,4 +1,5 @@
const env = require('../src/config/env');
const StyleLintPlugin = require('stylelint-webpack-plugin');
const isDev = process.env.NODE_ENV === 'development';
@ -14,6 +15,15 @@ module.exports = {
extensions: ['.js', '.jsx'],
},
plugins: [
new StyleLintPlugin({
files: ['src/**/*.scss'],
failOnError: false,
emitErrors: true,
syntax: 'scss',
}),
],
module: {
rules: [
/* Pre loader */

View file

@ -3,6 +3,7 @@ import HTMLWebpackPlugin from 'html-webpack-plugin';
import FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin';
import baseConfig from './webpack.config';
import env from '../src/config/env';
import StyleLintPlugin from 'stylelint-webpack-plugin';
export default {
...baseConfig,
@ -36,5 +37,11 @@ export default {
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new FriendlyErrorsPlugin(),
new StyleLintPlugin({
files: ['src/**/*.scss'],
failOnError: false,
emitErrors: false,
syntax: 'scss',
}),
],
};

BIN
yarn.lock

Binary file not shown.