0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-17 23:45:29 -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 35 additions and 5 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 @@
.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',
}),
],
};

View file

@ -5107,6 +5107,10 @@ querystringify@~1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb"
ramda@^0.24.1:
version "0.24.1"
resolved "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz#c3b7755197f35b8dc3502228262c4c91ddb6b857"
randomatic@^1.1.3:
version "1.1.7"
resolved "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@ -6018,7 +6022,17 @@ stylelint-config-standard@16.0.0:
version "16.0.0"
resolved "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-16.0.0.tgz#bb7387bff1d7dd7186a52b3ebf885b2405d691bf"
stylelint@7.13.0:
stylelint-webpack-plugin@0.8.0:
version "0.8.0"
resolved "https://registry.npmjs.org/stylelint-webpack-plugin/-/stylelint-webpack-plugin-0.8.0.tgz#948aec50e0d3b512374cce067cbbde3661c7d410"
dependencies:
arrify "^1.0.1"
minimatch "^3.0.3"
object-assign "^4.1.0"
ramda "^0.24.1"
stylelint "^7.7.0"
stylelint@7.13.0, stylelint@^7.7.0:
version "7.13.0"
resolved "https://registry.npmjs.org/stylelint/-/stylelint-7.13.0.tgz#111f97b6da72e775c80800d6bb6f5f869997785d"
dependencies: