Skip to content

Commit 17a7e47

Browse files
authored
Merge pull request #1467 from felicio/patch-1
[WIP] Update styling of files documenting rules
2 parents 329857d + b4d76e9 commit 17a7e47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+128
-114
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Contributing to ESLint-plugin-React
2+
3+
## ESLint Rules
4+
5+
### Markup
6+
7+
Files documenting individual rules live in docs/rules folder. They're annotated
8+
using Markdown, which adds extra layer of legibility and better visual orientation
9+
to the documents. Consider this when writing supporting text for the rules.
10+
11+
See the list below for some guidelines that need to be followed when adding to the
12+
collection.
13+
14+
- Negative adverbs preceding snippets in 'Rule Details' sections must be **bold**.

docs/rules/boolean-prop-naming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var Hello = createReactClass({
1515
});
1616
```
1717

18-
The following patterns are not considered warnings:
18+
The following patterns are **not** considered warnings:
1919

2020
```jsx
2121
var Hello = createReactClass({
@@ -64,4 +64,4 @@ For supporting "is" naming:
6464

6565
```jsx
6666
"react/boolean-prop-naming": ["error", { "rule": "^is[A-Z]([A-Za-z0-9]?)+" }]
67-
```
67+
```

docs/rules/default-props-match-prop-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ MyStatelessComponent.defaultProps = {
9898
}
9999
```
100100

101-
The following patterns are not considered warnings:
101+
The following patterns are **not** considered warnings:
102102

103103
```jsx
104104
function MyStatelessComponent({ foo, bar }) {

docs/rules/display-name.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var Hello = createReactClass({
1414
});
1515
```
1616

17-
The following patterns are not considered warnings:
17+
The following patterns are **not** considered warnings:
1818

1919
```jsx
2020
var Hello = createReactClass({
@@ -37,7 +37,7 @@ var Hello = createReactClass({
3737

3838
When `true` the rule will ignore the name set by the transpiler and require a `displayName` property in this case.
3939

40-
The following patterns are considered okay and do not cause warnings:
40+
The following patterns are considered okay and do **not** cause warnings:
4141

4242
```jsx
4343
var Hello = createReactClass({

docs/rules/forbid-component-props.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following patterns are considered warnings:
1717
<Hello style={{color: 'red'}} />
1818
```
1919

20-
The following patterns are not considered warnings:
20+
The following patterns are **not** considered warnings:
2121

2222
```jsx
2323
<Hello name='Joe' />

docs/rules/forbid-elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ An array of strings and/or objects. An object in this array may have the followi
2323

2424
A string item in the array is a shorthand for `{ element: string }`.
2525

26-
The following patterns are not considered warnings:
26+
The following patterns are **not** considered warnings:
2727

2828
```jsx
2929
// [1, { "forbid": ["button"] }]

docs/rules/forbid-foreign-prop-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var { propTypes } = SomeComponent;
1919
SomeComponent['propTypes'];
2020
```
2121

22-
The following patterns are not considered warnings:
22+
The following patterns are **not** considered warnings:
2323

2424
```js
2525
import SomeComponent, {propTypes as someComponentPropTypes} from './SomeComponent';

docs/rules/jsx-boolean-value.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The following patterns are considered warnings when configured `"never"`, or wit
1616
var Hello = <Hello personal={true} />;
1717
```
1818

19-
The following patterns are not considered warnings when configured `"never"`, or with `"always", { "never": ["personal"] }`:
19+
The following patterns are **not** considered warnings when configured `"never"`, or with `"always", { "never": ["personal"] }`:
2020

2121
```jsx
2222
var Hello = <Hello personal />;
@@ -28,7 +28,7 @@ The following patterns are considered warnings when configured `"always"`, or wi
2828
var Hello = <Hello personal />;
2929
```
3030

31-
The following patterns are not considered warnings when configured `"always"`, or with `"never", { "always": ["personal"] }`:
31+
The following patterns are **not** considered warnings when configured `"always"`, or with `"never", { "always": ["personal"] }`:
3232

3333
```jsx
3434
var Hello = <Hello personal={true} />;

docs/rules/jsx-closing-bracket-location.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following patterns are considered warnings:
2121
/>;
2222
```
2323

24-
The following patterns are not considered warnings:
24+
The following patterns are **not** considered warnings:
2525

2626
```jsx
2727
<Hello firstName="John" lastName="Smith" />;
@@ -138,7 +138,7 @@ var x = function() {
138138
</Say>;
139139
```
140140

141-
The following patterns are not considered warnings:
141+
The following patterns are **not** considered warnings:
142142

143143
```jsx
144144
// 'jsx-closing-bracket-location': 1

docs/rules/jsx-closing-tag-location.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following patterns are considered warnings:
2121
marklar</Hello>
2222
```
2323

24-
The following are not considered warnings:
24+
The following are **not** considered warnings:
2525

2626
```jsx
2727
<Hello>

0 commit comments

Comments
 (0)