diff --git a/.eslintrc b/.eslintrc index c8a232b..db21f05 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,6 +2,9 @@ # babel support more syntax stuff than eslint for now parser: babel-eslint +root: true +extends: eslint:recommended + ecmaFeatures: modules: true @@ -20,7 +23,6 @@ rules: brace-style: [2, "stroustrup"] comma-dangle: [2, "always-multiline"] comma-style: [2, "last"] - computed-property-spacing: [2, "never"] dot-location: [2, "property"] one-var: [2, "never"] @@ -28,10 +30,13 @@ rules: prefer-const: [2] no-bitwise: [2] - object-shorthand: [2, "methods"] + object-curly-spacing: [2, "never"] + array-bracket-spacing: [2, "never"] + computed-property-spacing: [2, "never"] + + space-unary-ops: [2, {"words": true, "nonwords": false}] space-after-keywords: [2, "always"] space-before-blocks: [2, "always"] space-before-function-paren: [2, "never"] - space-in-brackets: [2, "never"] space-in-parens: [2, "never"] - spaced-line-comment: [2, "always"] + spaced-comment: [2, "always"] diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d24638..0fbb5e6 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.0.0 - 2015-08-25 + +- Removed: compatibility with postcss v4.x +- Added: compatibility with postcss v5.x + # 1.2.1 - 2015-06-16 - Fixed: selector was updated as an array, which is wrong. diff --git a/package.json b/package.json index 5ab0d5c..6f6441f 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "postcss-selector-not", - "version": "1.2.1", + "version": "2.0.0", "description": "PostCSS plugin to transform :not() W3C CSS leve 4 pseudo class to :not() CSS level 3 selectors", "keywords": [ "postcss", + "postcss-plugin", "selectors", "selector", "Not" @@ -14,25 +15,19 @@ "type": "git", "url": "https://github.com/postcss/postcss-selector-not.git" }, - "homepage": "https://github.com/postcss/postcss-selector-not", - "bugs": { - "url": "https://github.com/postcss/postcss-selector-not/issues" - }, + "main": "dist/index.js", "files": [ - "CHANGELOG.md", - "LICENSE", "dist" ], - "main": "dist/index.js", "dependencies": { "balanced-match": "^0.2.0", - "postcss": "^4.1.7" + "postcss": "^5.0.0" }, "devDependencies": { "babel": "^5.1.13", "babel-eslint": "^3.1.15", "babel-tape-runner": "^1.1.0", - "eslint": "^0.23.0", + "eslint": "^1.0.0", "tape": "^4.0.0" }, "scripts": { diff --git a/src/index.js b/src/index.js index 38a61d5..b6f1530 100644 --- a/src/index.js +++ b/src/index.js @@ -26,7 +26,7 @@ function explodeSelector(pseudoClass, selector) { function explodeSelectors(pseudoClass) { return () => { return (css) => { - css.eachRule(rule => { + css.walkRules(rule => { if (rule.selector && rule.selector.indexOf(pseudoClass) > -1) { rule.selector = explodeSelector(pseudoClass, rule.selector) }