stylelint-config-wordpress
Advanced tools
Comparing version 0.2.0 to 1.0.1
@@ -0,7 +1,20 @@ | ||
# 1.0.1 | ||
* Changed: config syntax. | ||
# 1.0.0 | ||
* Removed: `stylelint < 3.0.0` compatibility. | ||
* Changed: renamed the `function-space-after` rule to `function-whitespace-after`. | ||
* Changed: `at-rule-empty-line-before` with option `ignore: ["after-comment"],`. | ||
* Changed: `declaration-colon-space-after` with option `always-single-line`. | ||
* Added: `declaration-colon-newline-after` with option `always-multi-line`. | ||
* Added: `function-linear-gradient-no-nonstandard-direction`. | ||
# 0.2.0 | ||
* Fixed: No quotes for URLs -> `"function-url-quotes": [ 2, "none" ]` | ||
* Fixed: No quotes for URLs -> `"function-url-quotes": [ 2, "none" ]`. | ||
# 0.1.0 | ||
* Initial release | ||
* Initial release. |
105
index.js
module.exports = { | ||
"rules": { | ||
"at-rule-empty-line-before": [ 2, "always", { | ||
"at-rule-empty-line-before": [ "always", { | ||
except: ["blockless-group"], | ||
ignore: ["after-comment"], | ||
} ], | ||
"at-rule-no-vendor-prefix": 2, | ||
"block-closing-brace-newline-after": [ 2, "always" ], | ||
"block-closing-brace-newline-before": [ 2, "always" ], | ||
"block-opening-brace-newline-after": [ 2, "always" ], | ||
"block-opening-brace-space-before": [ 2, "always" ], | ||
"color-hex-case": [ 2, "lower" ], | ||
"color-hex-length": [ 2, "short" ], | ||
"color-no-invalid-hex": 2, | ||
"declaration-bang-space-after": [ 2, "never" ], | ||
"declaration-bang-space-before": [ 2, "always" ], | ||
"declaration-block-semicolon-newline-after": [ 2, "always" ], | ||
"declaration-block-semicolon-space-before": [ 2, "never" ], | ||
"declaration-colon-space-after": [ 2, "always" ], | ||
"declaration-colon-space-before": [ 2, "never" ], | ||
"function-calc-no-unspaced-operator": 2, | ||
"function-comma-space-after": [ 2, "always" ], | ||
"function-comma-space-before": [ 2, "never" ], | ||
"function-parentheses-space-inside": [ 2, "never" ], | ||
"function-space-after": [ 2, "always" ], | ||
"function-url-quotes": [ 2, "none" ], | ||
"indentation": [ 2, "tab" ], | ||
"media-feature-colon-space-after": [ 2, "always" ], | ||
"media-feature-colon-space-before": [ 2, "never" ], | ||
"media-feature-name-no-vendor-prefix": 2, | ||
"media-feature-range-operator-space-after": [ 2, "always" ], | ||
"media-feature-range-operator-space-before": [ 2, "always" ], | ||
"media-query-list-comma-newline-after": [ 2, "always-multi-line" ], | ||
"media-query-list-comma-space-after": [ 2, "always-single-line" ], | ||
"media-query-list-comma-space-before": [ 2, "never" ], | ||
"media-query-parentheses-space-inside": [ 2, "never" ], | ||
"no-eol-whitespace": 2, | ||
"no-missing-eof-newline": 2, | ||
"number-leading-zero": [ 2, "always" ], | ||
"number-no-trailing-zeros": 2, | ||
"number-zero-length-no-unit": 2, | ||
"property-no-vendor-prefix": 2, | ||
"rule-no-shorthand-property-overrides": 2, | ||
"rule-nested-empty-line-before": [ 2, "always" ], | ||
"rule-non-nested-empty-line-before": [ 2, "always" ], | ||
"rule-trailing-semicolon": [ 2, "always" ], | ||
"selector-combinator-space-after": [ 2, "always" ], | ||
"selector-combinator-space-before": [ 2, "always" ], | ||
"selector-list-comma-newline-after": [ 2, "always" ], | ||
"selector-list-comma-space-before": [ 2, "never" ], | ||
"selector-no-vendor-prefix": 2, | ||
"string-quotes": [ 2, "double" ], | ||
"value-list-comma-newline-after": [ 2, "always-multi-line" ], | ||
"value-list-comma-space-after": [ 2, "always-single-line" ], | ||
"value-list-comma-space-before": [ 2, "never" ], | ||
"value-no-vendor-prefix": 2, | ||
"at-rule-no-vendor-prefix": true, | ||
"block-closing-brace-newline-after": "always", | ||
"block-closing-brace-newline-before": "always", | ||
"block-opening-brace-newline-after": "always", | ||
"block-opening-brace-space-before": "always", | ||
"color-hex-case": "lower", | ||
"color-hex-length": "short", | ||
"color-no-invalid-hex": true, | ||
"declaration-bang-space-after": "never", | ||
"declaration-bang-space-before": "always", | ||
"declaration-block-semicolon-newline-after": "always", | ||
"declaration-block-semicolon-space-before": "never", | ||
"declaration-colon-newline-after": "always-multi-line", | ||
"declaration-colon-space-after": "always-single-line", | ||
"declaration-colon-space-before": "never", | ||
"function-calc-no-unspaced-operator": true, | ||
"function-comma-space-after": "always", | ||
"function-comma-space-before": "never", | ||
"function-linear-gradient-no-nonstandard-direction": true, | ||
"function-parentheses-space-inside": "never", | ||
"function-url-quotes": "none", | ||
"function-whitespace-after": "always", | ||
"indentation": "tab", | ||
"media-feature-colon-space-after": "always", | ||
"media-feature-colon-space-before": "never", | ||
"media-feature-name-no-vendor-prefix": true, | ||
"media-feature-range-operator-space-after": "always", | ||
"media-feature-range-operator-space-before": "always", | ||
"media-query-list-comma-newline-after": "always-multi-line", | ||
"media-query-list-comma-space-after": "always-single-line", | ||
"media-query-list-comma-space-before": "never", | ||
"media-query-parentheses-space-inside": "never", | ||
"no-eol-whitespace": true, | ||
"no-missing-eof-newline": true, | ||
"number-leading-zero": "always", | ||
"number-no-trailing-zeros": true, | ||
"number-zero-length-no-unit": true, | ||
"property-no-vendor-prefix": true, | ||
"rule-no-shorthand-property-overrides": true, | ||
"rule-nested-empty-line-before": "always", | ||
"rule-non-nested-empty-line-before": "always", | ||
"rule-trailing-semicolon": "always", | ||
"selector-combinator-space-after": "always", | ||
"selector-combinator-space-before": "always", | ||
"selector-list-comma-newline-after": "always", | ||
"selector-list-comma-space-before": "never", | ||
"selector-no-vendor-prefix": true, | ||
"string-quotes": "double", | ||
"value-list-comma-newline-after": "always-multi-line", | ||
"value-list-comma-space-after": "always-single-line", | ||
"value-list-comma-space-before": "never", | ||
"value-no-vendor-prefix": true, | ||
}, | ||
} |
{ | ||
"name": "stylelint-config-wordpress", | ||
"version": "0.2.0", | ||
"version": "1.0.1", | ||
"description": "WordPress shareable config for stylelint", | ||
@@ -22,9 +22,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"babel": "^5.8.20", | ||
"babel-tape-runner": "^1.2.0", | ||
"eslint": "^1.0.0", | ||
"babel": "^6.1.18", | ||
"babel-preset-es2015": "^6.1.18", | ||
"babel-tape-runner": "^1.3.0", | ||
"eslint": "^1.10.3", | ||
"eslint-config-stylelint": "^0.1.0", | ||
"postcss": "^4.1.16", | ||
"stylelint": "^0.8.0", | ||
"tape": "^4.0.2" | ||
"stylelint": "^3.0.2", | ||
"tape": "^4.2.2" | ||
}, | ||
@@ -35,3 +35,13 @@ "scripts": { | ||
"test": "npm run lint && npm run tape" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"es2015" | ||
] | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"stylelint" | ||
] | ||
} | ||
} |
# stylelint-config-wordpress | ||
[![NPM version](http://img.shields.io/npm/v/stylelint-config-wordpress.svg)](https://www.npmjs.org/package/stylelint-config-wordpress) [![Travis Build Status](https://img.shields.io/travis/stylelint/stylelint-config-wordpress/master.svg?label=unix%20build)](https://travis-ci.org/stylelint/stylelint-config-wordpress) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/jeddy3/stylelint-config-wordpress/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jeddy3/stylelint-config-wordpress) | ||
[![NPM version](http://img.shields.io/npm/v/stylelint-config-wordpress.svg)](https://www.npmjs.org/package/stylelint-config-wordpress) [![Travis Build Status](https://img.shields.io/travis/stylelint/stylelint-config-wordpress/master.svg?label=unix%20build)](https://travis-ci.org/stylelint/stylelint-config-wordpress) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/stylelint/stylelint-config-wordpress/master.svg?label=windows%20build)](https://ci.appveyor.com/project/stylelint/stylelint-config-wordpress) | ||
@@ -16,20 +16,25 @@ > WordPress shareable config for stylelint. | ||
Require the config and use it for stylelint's option. For example, using the JS API approach: | ||
Set your stylelint config to: | ||
```js | ||
var fs = require("fs") | ||
var postcss = require("postcss") | ||
var reporter = require("postcss-reporter") | ||
var stylelint = require("stylelint") | ||
var configWordPress = require("stylelint-config-wordpress") | ||
```json | ||
{ | ||
"extends": "stylelint-config-wordpress" | ||
} | ||
``` | ||
// css to be processed | ||
var css = fs.readFileSync("input.css", "utf8") | ||
### Extending the config | ||
postcss([ | ||
stylelint(configWordPress), // use stylelint-config-wordpress | ||
reporter(), | ||
]) | ||
.process(css, { from: "input.css" }) | ||
.then() | ||
Simply add a `"rules"` key to your config and add your overrides there. | ||
For example, to change the `indentation` to four spaces and turn off the `number-leading-zero` rule: | ||
```json | ||
{ | ||
"extends": "stylelint-config-wordpress", | ||
"rules": { | ||
"indentation": 4, | ||
"number-leading-zero": null | ||
} | ||
} | ||
``` | ||
@@ -36,0 +41,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6560
60
1
44
0