Skip to content

Commit 57458ed

Browse files
committed
plugin/ namespace
1 parent 0ef6f34 commit 57458ed

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
[![Dependency Status][gemnasium-img]][gemnasium]
66
[![Downloads][npm-d-img]][npm]
77

8-
A plugin pack of stylehacks related linting rules for [stylelint].
8+
A [stylelint] plugin that disallow browser hacks that are irrelevant to the
9+
browsers you are targeting, using [stylehacks].
910

1011
Original rule: [stylelint/no-browser-hacks][original-rule].
1112

@@ -21,14 +22,12 @@ If you are uncertain what "browser hacks" are, ["An Introduction to
2122
Browser-Specific Hacks"](https://www.sitepoint.com/browser-specific-css-hacks/)
2223
explains it well.
2324

24-
This rule uses [stylehacks](https://github.com/ben-eb/stylehacks) to detect the
25-
hacks. Then, in the spirit of stylelint, it tells you that you've done something
26-
wrong. If instead you would like to automatically remove browser hacks, use
27-
[stylehacks](https://github.com/ben-eb/stylehacks) directly.
25+
This rule uses [stylehacks] to detect the hacks. Then, in the spirit of
26+
stylelint, it tells you that you've done something wrong. If instead you would
27+
like to automatically remove browser hacks, use [stylehacks] directly.
2828

29-
[stylehacks](https://github.com/ben-eb/stylehacks) is only compatible with
30-
standard CSS syntax, and does not support nested properties nor custom property
31-
sets.
29+
[stylehacks] is only compatible with standard CSS syntax, and does not support
30+
nested properties nor custom property sets.
3231

3332
Bugs and feature requests should be reported on the
3433
[stylehacks issue tracker](https://github.com/ben-eb/stylehacks/issues).
@@ -43,7 +42,7 @@ npm install stylelint-no-browser-hacks
4342

4443
Add `stylelint-no-browser-hacks` to your stylelint config plugins array, then
4544
add rules you need to the rules list.
46-
Note that the rule is namespaced with `slam/`.
45+
Note that the rule is namespaced with `plugin/`.
4746

4847
Like so:
4948

@@ -55,7 +54,7 @@ Like so:
5554
],
5655
"rules": {
5756
// ...
58-
"slam/no-browser-hacks": [true, {
57+
"plugin/no-browser-hacks": [true, {
5958
browsers: [
6059
"last 2 versions",
6160
"ie >=7"
@@ -101,4 +100,5 @@ allowed.
101100
[gemnasium-img]: https://gemnasium.com/badges/github.com/Slamdunk/stylelint-no-browser-hacks.svg
102101
[gemnasium]: https://gemnasium.com/github.com/Slamdunk/stylelint-no-browser-hacks
103102
[stylelint]: https://stylelint.io/
103+
[stylehacks]: https://github.com/ben-eb/stylehacks
104104
[original-rule]: https://github.com/stylelint/stylelint/tree/7.8.0/lib/rules/no-browser-hacks

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const stylehacks = require("stylehacks");
55
const Result = require("postcss/lib/result");
66
const lodash = require("lodash");
77

8-
const ruleName = "slam/no-browser-hacks";
8+
const ruleName = "plugin/no-browser-hacks";
99
const messages = stylelint.utils.ruleMessages(ruleName, {rejected: (type, hack) => `Unexpected ${type} hack "${hack}"`});
1010

1111
const rule = stylelint.createPlugin(ruleName, (primaryOption, secondaryOptionObject) => (postcssRoot, postcssResult) => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stylelint-no-browser-hacks",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Stylelint plugin for stylehacks linting.",
55
"keywords": [
66
"no-browser-hacks",

0 commit comments

Comments
 (0)