Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.

Commit cd6e2bf

Browse files
committed
2.0.0 (switch to postcss 5.x)
1 parent 9774424 commit cd6e2bf

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

.eslintrc

+9-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# babel support more syntax stuff than eslint for now
33
parser: babel-eslint
44

5+
root: true
6+
extends: eslint:recommended
7+
58
ecmaFeatures:
69
modules: true
710

@@ -20,18 +23,20 @@ rules:
2023
brace-style: [2, "stroustrup"]
2124
comma-dangle: [2, "always-multiline"]
2225
comma-style: [2, "last"]
23-
computed-property-spacing: [2, "never"]
2426
dot-location: [2, "property"]
2527

2628
one-var: [2, "never"]
2729
no-var: [2]
2830
prefer-const: [2]
2931
no-bitwise: [2]
3032

31-
object-shorthand: [2, "methods"]
33+
object-curly-spacing: [2, "never"]
34+
array-bracket-spacing: [2, "never"]
35+
computed-property-spacing: [2, "never"]
36+
37+
space-unary-ops: [2, {"words": true, "nonwords": false}]
3238
space-after-keywords: [2, "always"]
3339
space-before-blocks: [2, "always"]
3440
space-before-function-paren: [2, "never"]
35-
space-in-brackets: [2, "never"]
3641
space-in-parens: [2, "never"]
37-
spaced-line-comment: [2, "always"]
42+
spaced-comment: [2, "always"]

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 2.0.0 - 2015-08-25
2+
3+
- Removed: compatibility with postcss v4.x
4+
- Added: compatibility with postcss v5.x
5+
16
# 1.2.1 - 2015-06-16
27

38
- Fixed: selector was updated as an array, which is wrong.

package.json

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "postcss-selector-not",
3-
"version": "1.2.1",
3+
"version": "2.0.0",
44
"description": "PostCSS plugin to transform :not() W3C CSS leve 4 pseudo class to :not() CSS level 3 selectors",
55
"keywords": [
66
"postcss",
7+
"postcss-plugin",
78
"selectors",
89
"selector",
910
"Not"
@@ -14,25 +15,19 @@
1415
"type": "git",
1516
"url": "https://github.com/postcss/postcss-selector-not.git"
1617
},
17-
"homepage": "https://github.com/postcss/postcss-selector-not",
18-
"bugs": {
19-
"url": "https://github.com/postcss/postcss-selector-not/issues"
20-
},
18+
"main": "dist/index.js",
2119
"files": [
22-
"CHANGELOG.md",
23-
"LICENSE",
2420
"dist"
2521
],
26-
"main": "dist/index.js",
2722
"dependencies": {
2823
"balanced-match": "^0.2.0",
29-
"postcss": "^4.1.7"
24+
"postcss": "^5.0.0"
3025
},
3126
"devDependencies": {
3227
"babel": "^5.1.13",
3328
"babel-eslint": "^3.1.15",
3429
"babel-tape-runner": "^1.1.0",
35-
"eslint": "^0.23.0",
30+
"eslint": "^1.0.0",
3631
"tape": "^4.0.0"
3732
},
3833
"scripts": {

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function explodeSelector(pseudoClass, selector) {
2626
function explodeSelectors(pseudoClass) {
2727
return () => {
2828
return (css) => {
29-
css.eachRule(rule => {
29+
css.walkRules(rule => {
3030
if (rule.selector && rule.selector.indexOf(pseudoClass) > -1) {
3131
rule.selector = explodeSelector(pseudoClass, rule.selector)
3232
}

0 commit comments

Comments
 (0)