Skip to content

Commit 0636a8b

Browse files
committed
[Docs] lowercase eslint consistently
1 parent d06f27b commit 0636a8b

10 files changed

+28
-28
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to ESLint-plugin-React
1+
# Contributing to `eslint-plugin-react`
22

3-
## ESLint Rules
3+
## `eslint` Rules
44

55
### Markup
66

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
ESLint-plugin-React
1+
`eslint-plugin-react`
22
===================
33

44
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][deps-image]][deps-url] [![Code Climate][climate-image]][climate-url] [![Tidelift][tidelift-image]][tidelift-url]
55

6-
React specific linting rules for ESLint
6+
React specific linting rules for `eslint`
77

88
# Installation
99

10-
Install [ESLint](https://www.github.com/eslint/eslint) either locally or globally. (Note that locally, per project, is strongly preferred)
10+
Install [`eslint`](https://www.github.com/eslint/eslint) either locally or globally. (Note that locally, per project, is strongly preferred)
1111

1212
```sh
1313
$ npm install eslint --save-dev
1414
```
1515

16-
If you installed `ESLint` globally, you have to install React plugin globally too. Otherwise, install it locally.
16+
If you installed `eslint` globally, you have to install React plugin globally too. Otherwise, install it locally.
1717

1818
```sh
1919
$ npm install eslint-plugin-react --save-dev
@@ -92,7 +92,7 @@ Add "react" to the plugins section.
9292

9393
Enable JSX support.
9494

95-
With ESLint 2+
95+
With `eslint` 2+
9696

9797
```json
9898
{
@@ -244,7 +244,7 @@ To enable this configuration use the `extends` property in your `.eslintrc` conf
244244
}
245245
```
246246

247-
See [ESLint documentation](https://eslint.org/docs/user-guide/configuring/configuration-files#extending-configuration-files) for more information about extending configuration files.
247+
See [`eslint` documentation](https://eslint.org/docs/user-guide/configuring/configuration-files#extending-configuration-files) for more information about extending configuration files.
248248

249249
## All
250250

@@ -264,7 +264,7 @@ This pairs well with the `eslint:all` rule.
264264

265265
# License
266266

267-
ESLint-plugin-React is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
267+
`eslint-plugin-react` is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
268268

269269

270270
[npm-url]: https://npmjs.org/package/eslint-plugin-react

docs/rules/jsx-uses-vars.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prevent variables used in JSX to be incorrectly marked as unused (react/jsx-uses-vars)
22

3-
Since 0.17.0 the ESLint `no-unused-vars` rule does not detect variables used in JSX ([see details](http://eslint.org/blog/2015/03/eslint-0.17.0-released#changes-to-jsxreact-handling)). This rule will find variables used in JSX and mark them as used.
3+
Since 0.17.0 the `eslint` `no-unused-vars` rule does not detect variables used in JSX ([see details](http://eslint.org/blog/2015/03/eslint-0.17.0-released#changes-to-jsxreact-handling)). This rule will find variables used in JSX and mark them as used.
44

55
This rule only has an effect when the `no-unused-vars` rule is enabled.
66

docs/rules/prefer-stateless-function.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Stateless functional components are simpler than class based components and will
66

77
This rule will check your class based React components for
88

9-
* methods/properties other than `displayName`, `propTypes`, `contextTypes`, `defaultProps`, `render` and useless constructor (same detection as ESLint [no-useless-constructor rule](http://eslint.org/docs/rules/no-useless-constructor))
9+
* methods/properties other than `displayName`, `propTypes`, `contextTypes`, `defaultProps`, `render` and useless constructor (same detection as `eslint` [no-useless-constructor rule](http://eslint.org/docs/rules/no-useless-constructor))
1010
* instance property other than `this.props` and `this.context`
1111
* extension of `React.PureComponent` (if the `ignorePureComponents` flag is true)
1212
* presence of `ref` attribute in JSX

lib/rules/boolean-prop-naming.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ module.exports = {
7979
* @returns {string | null}
8080
*/
8181
function getPropKey(node) {
82-
// Check for `ExperimentalSpreadProperty` (ESLint 3/4) and `SpreadElement` (ESLint 5)
82+
// Check for `ExperimentalSpreadProperty` (eslint 3/4) and `SpreadElement` (eslint 5)
8383
// so we can skip validation of those fields.
84-
// Otherwise it will look for `node.value.property` which doesn't exist and breaks ESLint.
84+
// Otherwise it will look for `node.value.property` which doesn't exist and breaks eslint.
8585
if (node.type === 'ExperimentalSpreadProperty' || node.type === 'SpreadElement') {
8686
return null;
8787
}

lib/rules/jsx-curly-spacing.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ module.exports = {
251251
const nextToken = sourceCode.getTokenAfter(token);
252252
let nextComment;
253253

254-
// ESLint >=4.x
254+
// eslint >=4.x
255255
if (sourceCode.getCommentsAfter) {
256256
nextComment = sourceCode.getCommentsAfter(token);
257-
// ESLint 3.x
257+
// eslint 3.x
258258
} else {
259259
const potentialComment = sourceCode.getTokenAfter(token, { includeComments: true });
260260
nextComment = nextToken === potentialComment ? [] : [potentialComment];
@@ -288,10 +288,10 @@ module.exports = {
288288
const previousToken = sourceCode.getTokenBefore(token);
289289
let previousComment;
290290

291-
// ESLint >=4.x
291+
// eslint >=4.x
292292
if (sourceCode.getCommentsBefore) {
293293
previousComment = sourceCode.getCommentsBefore(token);
294-
// ESLint 3.x
294+
// eslint 3.x
295295
} else {
296296
const potentialComment = sourceCode.getTokenBefore(token, { includeComments: true });
297297
previousComment = previousToken === potentialComment ? [] : [potentialComment];

lib/rules/jsx-fragments.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function replaceNode(source, node, text) {
2222

2323
const messages = {
2424
fragmentsNotSupported: 'Fragments are only supported starting from React v16.2. '
25-
+ 'Please disable the `react/jsx-fragments` rule in ESLint settings or upgrade your version of React.',
25+
+ 'Please disable the `react/jsx-fragments` rule in `eslint` settings or upgrade your version of React.',
2626
preferPragma: 'Prefer {{react}}.{{fragment}} over fragment shorthand',
2727
preferFragment: 'Prefer fragment shorthand over {{react}}.{{fragment}}',
2828
};

lib/rules/prefer-stateless-function.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = {
5454

5555
/**
5656
* Checks whether a given array of statements is a single call of `super`.
57-
* @see ESLint no-useless-constructor rule
57+
* @see eslint no-useless-constructor rule
5858
* @param {ASTNode[]} body - An array of statements to check.
5959
* @returns {boolean} `true` if the body is a single call of `super`.
6060
*/
@@ -70,7 +70,7 @@ module.exports = {
7070
/**
7171
* Checks whether a given node is a pattern which doesn't have any side effects.
7272
* Default parameters and Destructuring parameters can have side effects.
73-
* @see ESLint no-useless-constructor rule
73+
* @see eslint no-useless-constructor rule
7474
* @param {ASTNode} node - A pattern node.
7575
* @returns {boolean} `true` if the node doesn't have any side effects.
7676
*/
@@ -81,7 +81,7 @@ module.exports = {
8181
/**
8282
* Checks whether a given array of expressions is `...arguments` or not.
8383
* `super(...arguments)` passes all arguments through.
84-
* @see ESLint no-useless-constructor rule
84+
* @see eslint no-useless-constructor rule
8585
* @param {ASTNode[]} superArgs - An array of expressions to check.
8686
* @returns {boolean} `true` if the superArgs is `...arguments`.
8787
*/
@@ -96,7 +96,7 @@ module.exports = {
9696

9797
/**
9898
* Checks whether given 2 nodes are identifiers which have the same name or not.
99-
* @see ESLint no-useless-constructor rule
99+
* @see eslint no-useless-constructor rule
100100
* @param {ASTNode} ctorParam - A node to check.
101101
* @param {ASTNode} superArg - A node to check.
102102
* @returns {boolean} `true` if the nodes are identifiers which have the same
@@ -112,7 +112,7 @@ module.exports = {
112112

113113
/**
114114
* Checks whether given 2 nodes are a rest/spread pair which has the same values.
115-
* @see ESLint no-useless-constructor rule
115+
* @see eslint no-useless-constructor rule
116116
* @param {ASTNode} ctorParam - A node to check.
117117
* @param {ASTNode} superArg - A node to check.
118118
* @returns {boolean} `true` if the nodes are a rest/spread pair which has the
@@ -128,7 +128,7 @@ module.exports = {
128128

129129
/**
130130
* Checks whether given 2 nodes have the same value or not.
131-
* @see ESLint no-useless-constructor rule
131+
* @see eslint no-useless-constructor rule
132132
* @param {ASTNode} ctorParam - A node to check.
133133
* @param {ASTNode} superArg - A node to check.
134134
* @returns {boolean} `true` if the nodes have the same value or not.
@@ -143,7 +143,7 @@ module.exports = {
143143
/**
144144
* Checks whether the parameters of a constructor and the arguments of `super()`
145145
* have the same values or not.
146-
* @see ESLint no-useless-constructor rule
146+
* @see eslint no-useless-constructor rule
147147
* @param {ASTNode[]} ctorParams - The parameters of a constructor to check.
148148
* @param {ASTNode} superArgs - The arguments of `super()` to check.
149149
* @returns {boolean} `true` if those have the same values.
@@ -164,7 +164,7 @@ module.exports = {
164164

165165
/**
166166
* Checks whether the constructor body is a redundant super call.
167-
* @see ESLint no-useless-constructor rule
167+
* @see eslint no-useless-constructor rule
168168
* @param {Array} body - constructor body content.
169169
* @param {Array} ctorParams - The params to check against super call.
170170
* @returns {boolean} true if the construtor body is redundant

tests/lib/rules/boolean-prop-naming.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ ruleTester.run('boolean-prop-naming', rule, {
903903
],
904904
},
905905
{
906-
// Custom messages use ESLint string templating.
906+
// Custom messages use eslint string templating.
907907
code: `
908908
class Hello extends React.Component {
909909
render () { return <div />; }

tests/lib/rules/no-typos.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2416,7 +2416,7 @@ ruleTester.run('no-typos', rule, {
24162416
/*
24172417
// PropTypes declared on a component that is detected through JSDoc comments and is
24182418
// declared AFTER the PropTypes assignment
2419-
// Commented out since it only works with ESLint 5.
2419+
// Commented out since it only works with eslint 5.
24202420
,{
24212421
code: `
24222422
MyComponent.PROPTYPES = {}

0 commit comments

Comments
 (0)