Skip to content

Commit 70f4310

Browse files
committed
Update dependencies and use PostCSS 5.0
1 parent ecd5650 commit 70f4310

File tree

5 files changed

+135
-25
lines changed

5 files changed

+135
-25
lines changed

.eslintrc

Lines changed: 118 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,123 @@
11
{
22
"rules": {
3-
"no-unused-expressions": [0],
4-
"no-underscore-dangle": [0],
5-
"no-reserved-keys": [2],
6-
"no-multi-spaces": [0],
7-
"no-extra-parens": [2],
8-
"no-unused-vars": [2],
9-
"no-loop-func": [0],
10-
"key-spacing": [0],
11-
"max-len": [2],
12-
"strict": [0],
13-
"indent": [2],
14-
"quotes": [2, "single", "avoid-escape"],
15-
"curly": [0]
3+
"space-before-function-paren": [2, { "named": "never" }],
4+
"no-shadow-restricted-names": [2],
5+
"computed-property-spacing": [2],
6+
"no-empty-character-class": [2],
7+
"no-irregular-whitespace": [2],
8+
"no-unexpected-multiline": [2],
9+
"no-multiple-empty-lines": [2],
10+
"space-return-throw-case": [2],
11+
"no-constant-condition": [2],
12+
"no-extra-boolean-cast": [2],
13+
"no-inner-declarations": [2],
14+
"no-this-before-super": [2],
15+
"no-use-before-define": [2],
16+
"no-array-constructor": [2],
17+
"object-curly-spacing": [2, "always"],
18+
"no-floating-decimal": [2],
19+
"no-warning-comments": [2],
20+
"handle-callback-err": [2],
21+
"no-unneeded-ternary": [2],
22+
"operator-assignment": [2],
23+
"space-before-blocks": [2],
24+
"no-native-reassign": [2],
25+
"no-trailing-spaces": [2],
26+
"operator-linebreak": [2, "after"],
27+
"consistent-return": [2],
28+
"no-duplicate-case": [2],
29+
"no-invalid-regexp": [2],
30+
"no-negated-in-lhs": [2],
31+
"constructor-super": [2],
32+
"no-nested-ternary": [2],
33+
"no-extend-native": [2],
34+
"block-scoped-var": [2],
35+
"no-control-regex": [2],
36+
"no-sparse-arrays": [2],
37+
"no-throw-literal": [2],
38+
"no-return-assign": [2],
39+
"no-const-assign": [2],
40+
"no-class-assign": [2],
41+
"no-extra-parens": [2],
42+
"no-regex-spaces": [2],
43+
"no-implied-eval": [2],
44+
"no-useless-call": [2],
45+
"no-self-compare": [2],
46+
"no-octal-escape": [2],
47+
"no-new-wrappers": [2],
48+
"no-process-exit": [2],
49+
"no-catch-shadow": [2],
50+
"linebreak-style": [2],
51+
"space-infix-ops": [2],
52+
"space-unary-ops": [2],
53+
"no-cond-assign": [2],
54+
"no-func-assign": [2],
55+
"no-unreachable": [2],
56+
"accessor-pairs": [2],
57+
"no-empty-label": [2],
58+
"no-fallthrough": [2],
59+
"no-path-concat": [2],
60+
"no-new-require": [2],
61+
"no-spaced-func": [2],
62+
"no-unused-vars": [2],
63+
"spaced-comment": [2],
64+
"no-delete-var": [2],
65+
"comma-spacing": [2],
66+
"no-extra-semi": [2],
67+
"no-extra-bind": [2],
68+
"arrow-spacing": [2],
69+
"prefer-spread": [2],
70+
"no-new-object": [2],
71+
"no-multi-str": [2],
72+
"semi-spacing": [2],
73+
"no-lonely-if": [2],
74+
"dot-notation": [2],
75+
"dot-location": [2, "property"],
76+
"comma-dangle": [2, "never"],
77+
"no-dupe-args": [2],
78+
"no-dupe-keys": [2],
79+
"no-ex-assign": [2],
80+
"no-obj-calls": [2],
81+
"valid-typeof": [2],
82+
"default-case": [2],
83+
"no-redeclare": [2],
84+
"no-div-regex": [2],
85+
"no-sequences": [2],
86+
"no-label-var": [2],
87+
"comma-style": [2],
88+
"brace-style": [2],
89+
"no-debugger": [2],
90+
"quote-props": [2, "as-needed"],
91+
"no-iterator": [2],
92+
"no-new-func": [2],
93+
"key-spacing": [2, { "align": "value" }],
94+
"complexity": [2],
95+
"new-parens": [2],
96+
"no-eq-null": [2],
97+
"no-bitwise": [2],
98+
"wrap-iife": [2],
99+
"no-caller": [2],
100+
"use-isnan": [2],
101+
"no-labels": [2],
102+
"no-shadow": [2],
103+
"camelcase": [2],
104+
"eol-last": [2],
105+
"no-octal": [2],
106+
"no-empty": [2],
107+
"no-alert": [2],
108+
"no-proto": [2],
109+
"no-undef": [2],
110+
"no-eval": [2],
111+
"no-with": [2],
112+
"no-void": [2],
113+
"max-len": [2, 80],
114+
"new-cap": [2],
115+
"eqeqeq": [2],
116+
"no-new": [2],
117+
"quotes": [2, "single"],
118+
"indent": [2, 4],
119+
"semi": [2, "always"],
120+
"yoda": [2, "never"]
16121
},
17122
"env": {
18123
"mocha": true,

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ gulp.task('lint', function () {
1515
});
1616

1717
gulp.task('build', ['clean'], function () {
18-
var webpack = require('gulp-webpack');
18+
var webpack = require('webpack-stream');
1919
return gulp.src('')
2020
.pipe(webpack(require('./test/webpack.config')))
2121
.pipe(gulp.dest('build/'));

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ module.exports = function (source, map) {
2121
}
2222

2323
if ( map && map.mappings ) opts.map.prev = map;
24-
if ( params.safe ) opts.safe = true;
24+
if ( params.syntax ) opts.syntax = require(params.syntax);
25+
if ( params.parser ) opts.parser = require(params.parser);
26+
if ( params.stringifier ) opts.stringifier = require(params.stringifier);
2527

2628
var plugins = this.options.postcss;
2729
if ( typeof plugins === 'function' ) {

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@
1010
"url": "https://github.com/postcss/postcss-loader.git"
1111
},
1212
"dependencies": {
13-
"loader-utils": "^0.2.10",
14-
"postcss": "^4.1.13"
13+
"loader-utils": "^0.2.11",
14+
"postcss": "^5.0.0"
1515
},
1616
"devDependencies": {
17-
"gulp-webpack": "1.5.0",
18-
"gulp-eslint": "0.14.0",
19-
"gulp-mocha": "2.1.2",
20-
"raw-loader": "0.5.1",
21-
"fs-extra": "0.20.1",
22-
"chai": "3.0.0",
23-
"gulp": "3.9.0"
17+
"postcss-safe-parser": "1.0.0",
18+
"webpack-stream": "2.1.0",
19+
"gulp-eslint": "1.0.0",
20+
"gulp-mocha": "2.1.3",
21+
"raw-loader": "0.5.1",
22+
"fs-extra": "0.23.1",
23+
"chai": "3.2.0",
24+
"gulp": "3.9.0"
2425
},
2526
"scripts": {
2627
"test": "gulp"

test/test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ describe('postcss-loader', function () {
1717
});
1818

1919
it('processes CSS in safe mode', function () {
20-
var css = require('!raw-loader!../?safe=1!./cases/broken.css');
20+
var css = require('!raw-loader!' +
21+
'../?parser=postcss-safe-parser!' +
22+
'./cases/broken.css');
2123
expect(css).to.eql('a { one color: red }\n');
2224
});
2325

0 commit comments

Comments
 (0)