UNPKG

1.67 kBMarkdownView Raw
1# property-no-vendor-prefix
2
3Disallow vendor prefixes for properties.
4
5<!-- prettier-ignore -->
6```css
7a { -webkit-transform: scale(1); }
8/** ↑
9 * This prefix */
10```
11
12This rule does not blanketly condemn vendor prefixes. Instead, it uses [Autoprefixer's](https://github.com/postcss/autoprefixer) up-to-date data (from [caniuse.com](http://caniuse.com/)) to know whether a vendor prefix should cause a violation or not. _If you've included a vendor prefixed property that has a standard alternative, one that Autoprefixer could take care of for you, this rule will complain about it_. If, however, you use a non-standard vendor-prefixed property, one that Autoprefixer would ignore and could not provide (such as `-webkit-touch-callout`), this rule will ignore it.
13
14The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
15
16## Options
17
18### `true`
19
20The following patterns are considered violations:
21
22<!-- prettier-ignore -->
23```css
24a { -webkit-transform: scale(1); }
25```
26
27<!-- prettier-ignore -->
28```css
29a { -moz-columns: 2; }
30```
31
32The following patterns are _not_ considered violations:
33
34<!-- prettier-ignore -->
35```css
36a { transform: scale(1); }
37```
38
39<!-- prettier-ignore -->
40```css
41a {
42columns: 2; }
43```
44
45<!-- prettier-ignore -->
46```css
47a { -webkit-touch-callout: none; }
48```
49
50## Optional secondary options
51
52### `ignoreProperties: ["/regex/", /regex/, "string"]`
53
54Given:
55
56```
57["transform", "columns"]
58```
59
60The following patterns are _not_ considered violations:
61
62<!-- prettier-ignore -->
63```css
64a { -webkit-transform: scale(1); }
65```
66
67<!-- prettier-ignore -->
68```css
69a { -moz-columns: 2; }
70```