You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-45
Original file line number
Diff line number
Diff line change
@@ -34,47 +34,47 @@ You should also specify settings that will be shared across all the plugin rules
34
34
35
35
```json5
36
36
{
37
-
"settings": {
38
-
"react": {
39
-
"createClass":"createReactClass", // Regex for Component Factory to use,
40
-
// default to "createReactClass"
41
-
"pragma":"React", // Pragma to use, default to "React"
42
-
"fragment":"Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
43
-
"version":"detect", // React version. "detect" automatically picks the version you have installed.
44
-
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
45
-
// Defaults to the "defaultVersion" setting and warns if missing, and to "detect" in the future
46
-
"defaultVersion":"", // Default React version to use when the version you have installed cannot be detected.
47
-
// If not provided, defaults to the latest React version.
48
-
"flowVersion":"0.53"// Flow version
37
+
settings: {
38
+
react: {
39
+
createClass:'createReactClass', // Regex for Component Factory to use,
40
+
// default to "createReactClass"
41
+
pragma:'React',// Pragma to use, default to "React"
42
+
fragment:'Fragment',// Fragment to use (may be a property of <pragma>), default to "Fragment"
43
+
version:'detect', // React version. "detect" automatically picks the version you have installed.
44
+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
45
+
// Defaults to the "defaultVersion" setting and warns if missing, and to "detect" in the future
46
+
defaultVersion:'', // Default React version to use when the version you have installed cannot be detected.
47
+
// If not provided, defaults to the latest React version.
48
+
flowVersion:'0.53',// Flow version
49
49
},
50
-
"propWrapperFunctions": [
51
-
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
52
-
"forbidExtraProps",
53
-
{"property":"freeze", "object":"Object"},
54
-
{"property":"myFavoriteWrapper"},
55
-
// for rules that check exact prop wrappers
56
-
{"property":"forbidExtraProps", "exact":true}
50
+
propWrapperFunctions: [
51
+
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
52
+
'forbidExtraProps',
53
+
{ property:'freeze', object:'Object'},
54
+
{ property:'myFavoriteWrapper'},
55
+
// for rules that check exact prop wrappers
56
+
{ property:'forbidExtraProps', exact:true },
57
57
],
58
-
"componentWrapperFunctions": [
59
-
// The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.
60
-
"observer", // `property`
61
-
{"property":"styled"}, // `object` is optional
62
-
{"property":"observer", "object":"Mobx"},
63
-
{"property":"observer", "object":"<pragma>"}// sets `object` to whatever value `settings.react.pragma` is set to
58
+
componentWrapperFunctions: [
59
+
// The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped.
60
+
'observer', // `property`
61
+
{ property:'styled'}, // `object` is optional
62
+
{ property:'observer', object:'Mobx'},
63
+
{ property:'observer', object:'<pragma>' },// sets `object` to whatever value `settings.react.pragma` is set to
64
64
],
65
-
"formComponents": [
65
+
formComponents: [
66
66
// Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />
This rule requires blank lines between each sibling HTML tag by default.
21
+
22
+
A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "br", next: "div" }` means “one or more blank lines are required between a `br` tag and a `div` tag.” You can supply any number of configurations. If a tag pair matches multiple configurations, the last matched configuration will be used.
23
+
24
+
-`blankLine` is one of the following:
25
+
-`always` requires one or more blank lines.
26
+
-`never` disallows blank lines.
27
+
-`consistent` requires or disallows a blank line based on the first sibling element.
0 commit comments