-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
114 lines (112 loc) · 2.64 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
const migrateRuleNames = require("./utils/migrateRuleNames");
const usesNewRuleNames = require("./utils/usesNewRuleNames");
const rules = {
"react-native/css-property-no-unknown": true,
"react-native/font-weight-no-ignored-values": [
true,
{
severity: "warning",
message:
"font-weight value other than 400, 700, normal or bold has not effect in React Native on Android.",
},
],
"value-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"at-rule-no-vendor-prefix": true,
"media-feature-name-no-vendor-prefix": true,
"declaration-no-important": [
true,
{
severity: "error",
message: "!important is not supported by React Native CSS modules.",
},
],
"at-rule-blacklist": [
[
"keyframes",
"font-face",
"supports",
"charset",
"viewport",
"page",
"namespace",
],
{
severity: "error",
message: "the @-rule is ignored by React Native CSS modules.",
},
],
"function-blacklist": [
[
"linear-gradient",
"radial-gradient",
"repeating-linear-gradient",
"repeating-radial-gradient",
"calc",
"url",
"translateZ",
"translate3d",
"rotate3d",
"matrix3d",
"scale3d",
],
{
severity: "error",
message: "the function is not supported by React Native CSS modules.",
},
],
"unit-whitelist": [
["px", "rem", "deg", "%", "vh", "vw", "vmin", "vmax"],
{
severity: "error",
message: "the unit is not supported by React Native CSS modules.",
},
],
"selector-pseudo-class-whitelist": [
["export", "root"],
{
severity: "error",
message:
"pseudo class selectors are ignored by React Native CSS modules.",
},
],
"selector-max-universal": [
0,
{
severity: "error",
message: "universal selectors are ignored by React Native CSS modules.",
},
],
"selector-max-attribute": [
0,
{
severity: "error",
message: "attribute selectors are ignored by React Native CSS modules.",
},
],
"selector-max-type": [
0,
{
severity: "error",
message: "type selectors are ignored by React Native CSS modules.",
},
],
"selector-max-combinators": [
0,
{
severity: "error",
message: "combinator selectors are ignored by React Native CSS modules.",
},
],
"selector-max-id": [
0,
{
severity: "error",
message: "id selectors are ignored by React Native CSS modules.",
},
],
};
module.exports = {
plugins: ["stylelint-react-native"],
rules: usesNewRuleNames() ? migrateRuleNames(rules) : rules,
};