Skip to content

Commit 96b3b06

Browse files
committed
[meta] reflect the repo rename; remove travis badge
1 parent e52eed5 commit 96b3b06

24 files changed

+1377
-1380
lines changed

.github/workflows/smoke-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
smoke-test:
10-
if: ${{ github.repository == 'yannickcr/eslint-plugin-react' || github.event_name == 'workflow_dispatch' }}
10+
if: ${{ github.repository == 'jsx-eslint/eslint-plugin-react' || github.event_name == 'workflow_dispatch' }}
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 1342 additions & 1342 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
`eslint-plugin-react`
22
===================
33

4-
[![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]
4+
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Code Climate][climate-image]][climate-url] [![Tidelift][tidelift-image]][tidelift-url]
55

66
React specific linting rules for `eslint`
77

@@ -25,7 +25,7 @@ Use [our preset](#recommended) to get reasonable defaults:
2525
]
2626
```
2727

28-
If you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), extend [`react/jsx-runtime`](https://github.com/yannickcr/eslint-plugin-react/blob/c8917b0885094b5e4cc2a6f613f7fb6f16fe932e/index.js#L163-L176) in your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`) to disable the relevant rules.
28+
If you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), extend [`react/jsx-runtime`](https://github.com/jsx-eslint/eslint-plugin-react/blob/c8917b0885094b5e4cc2a6f613f7fb6f16fe932e/index.js#L163-L176) in your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`) to disable the relevant rules.
2929

3030
You should also specify settings that will be shared across all the plugin rules. ([More about eslint shared settings](https://eslint.org/docs/user-guide/configuring/configuration-files#adding-shared-settings))
3131

@@ -266,17 +266,14 @@ This pairs well with the `eslint:all` rule.
266266
[npm-url]: https://npmjs.org/package/eslint-plugin-react
267267
[npm-image]: https://img.shields.io/npm/v/eslint-plugin-react.svg
268268

269-
[travis-url]: https://travis-ci.org/yannickcr/eslint-plugin-react
270-
[travis-image]: https://img.shields.io/travis/yannickcr/eslint-plugin-react/master.svg
269+
[deps-url]: https://david-dm.org/jsx-eslint/eslint-plugin-react
270+
[deps-image]: https://img.shields.io/david/dev/jsx-eslint/eslint-plugin-react.svg
271271

272-
[deps-url]: https://david-dm.org/yannickcr/eslint-plugin-react
273-
[deps-image]: https://img.shields.io/david/dev/yannickcr/eslint-plugin-react.svg
272+
[climate-url]: https://codeclimate.com/github/jsx-eslint/eslint-plugin-react
273+
[climate-image]: https://img.shields.io/codeclimate/maintainability/jsx-eslint/eslint-plugin-react.svg
274274

275-
[climate-url]: https://codeclimate.com/github/yannickcr/eslint-plugin-react
276-
[climate-image]: https://img.shields.io/codeclimate/maintainability/yannickcr/eslint-plugin-react.svg
277-
278-
[status-url]: https://github.com/yannickcr/eslint-plugin-react/pulse
279-
[status-image]: https://img.shields.io/github/last-commit/yannickcr/eslint-plugin-react.svg
275+
[status-url]: https://github.com/jsx-eslint/eslint-plugin-react/pulse
276+
[status-image]: https://img.shields.io/github/last-commit/jsx-eslint/eslint-plugin-react.svg
280277

281278
[tidelift-url]: https://tidelift.com/subscription/pkg/npm-eslint-plugin-react?utm_source=npm-eslint-plugin-react&utm_medium=referral&utm_campaign=readme
282-
[tidelift-image]: https://tidelift.com/badges/github/yannickcr/eslint-plugin-react?style=flat
279+
[tidelift-image]: https://tidelift.com/badges/github/jsx-eslint/eslint-plugin-react?style=flat

docs/rules/jsx-no-target-blank.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var Hello = <a target='_blank' href="https://example.com/"></form>
9999

100100
### Custom link components
101101

102-
This rule supports the ability to use custom components for links, such as `<Link />` which is popular in libraries like `react-router`, `next.js` and `gatsby`. To enable this, define your custom link components in the global [shared settings](https://github.com/yannickcr/eslint-plugin-react/blob/master/README.md#configuration) under the `linkComponents` configuration area. Once configured, this rule will check those components as if they were `<a />` elements.
102+
This rule supports the ability to use custom components for links, such as `<Link />` which is popular in libraries like `react-router`, `next.js` and `gatsby`. To enable this, define your custom link components in the global [shared settings](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/README.md#configuration) under the `linkComponents` configuration area. Once configured, this rule will check those components as if they were `<a />` elements.
103103

104104
Examples of **incorrect** code for this rule:
105105

@@ -119,7 +119,7 @@ var Hello = <Link />
119119

120120
### Custom form components
121121

122-
This rule supports the ability to use custom components for forms. To enable this, define your custom form components in the global [shared settings](https://github.com/yannickcr/eslint-plugin-react/blob/master/README.md#configuration) under the `formComponents` configuration area. Once configured, this rule will check those components as if they were `<form />` elements.
122+
This rule supports the ability to use custom components for forms. To enable this, define your custom form components in the global [shared settings](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/README.md#configuration) under the `formComponents` configuration area. Once configured, this rule will check those components as if they were `<form />` elements.
123123

124124
## When To Override It
125125

docs/rules/jsx-space-before-closing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Validate spacing before closing bracket in JSX (react/jsx-space-before-closing)
22

3-
**Deprecation notice**: This rule is deprecated. Please use the `"beforeSelfClosing"` option of the [jsx-tag-spacing](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md) rule instead.
3+
**Deprecation notice**: This rule is deprecated. Please use the `"beforeSelfClosing"` option of the [jsx-tag-spacing](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md) rule instead.
44

55
Enforce or forbid spaces before the closing bracket of self-closing JSX elements.
66

docs/rules/jsx-uses-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ var Hello = <div>Hello {this.props.name}</div>;
4545

4646
If you are not using JSX, if React is declared as global variable, or if you do not use the `no-unused-vars` rule.
4747

48-
If you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), you should disable this rule by extending [`react/jsx-runtime`](https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/index.js#L163-L176) in your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`).
48+
If you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), you should disable this rule by extending [`react/jsx-runtime`](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/index.js#L163-L176) in your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`).

docs/rules/no-array-index-key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ things.reduceRight((collection, thing) => (
106106

107107
## When Not To Use It
108108

109-
If there is nothing unique about the items, for example [you are breaking an array down in to chunks](https://github.com/yannickcr/eslint-plugin-react/issues/1123), then you may want to disable this rule with an override.
109+
If there is nothing unique about the items, for example [you are breaking an array down in to chunks](https://github.com/jsx-eslint/eslint-plugin-react/issues/1123), then you may want to disable this rule with an override.

docs/rules/no-find-dom-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Facebook will eventually deprecate `findDOMNode` as it blocks certain improvements in React in the future.
44

5-
It is recommended to use callback refs instead. See [Dan Abramov comments and examples](https://github.com/yannickcr/eslint-plugin-react/issues/678#issue-165177220).
5+
It is recommended to use callback refs instead. See [Dan Abramov comments and examples](https://github.com/jsx-eslint/eslint-plugin-react/issues/678#issue-165177220).
66

77
## Rule Details
88

docs/rules/prefer-stateless-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This rule will check your class based React components for
1111
* extension of `React.PureComponent` (if the `ignorePureComponents` flag is true)
1212
* presence of `ref` attribute in JSX
1313
* the use of decorators
14-
* `render` method that return anything but JSX: `undefined`, `null`, etc. (only in React <15.0.0, see [shared settings](https://github.com/yannickcr/eslint-plugin-react/blob/master/README.md#configuration) for React version configuration)
14+
* `render` method that return anything but JSX: `undefined`, `null`, etc. (only in React <15.0.0, see [shared settings](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/README.md#configuration) for React version configuration)
1515

1616
If none of these elements are found, the rule will warn you to write this component as a pure function.
1717

docs/rules/prop-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ It would seem that some common properties such as `props.children` or `props.cla
153153
(and alike) need to be treated as exceptions.
154154

155155
As it aptly noticed in
156-
[#7](https://github.com/yannickcr/eslint-plugin-react/issues/7)
156+
[#7](https://github.com/jsx-eslint/eslint-plugin-react/issues/7)
157157

158158
> Why should children be an exception?
159159
> Most components don't need `this.props.children`, so that makes it extra important

docs/rules/react-in-jsx-scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ var Hello = <div>Hello {this.props.name}</div>;
4444

4545
If you are not using JSX, or if you are setting `React` as a global variable.
4646

47-
If you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), you should disable this rule by extending [`react/jsx-runtime`](https://github.com/yannickcr/eslint-plugin-react/blob/8cf47a8ac2242ee00ea36eac4b6ae51956ba4411/index.js#L165-L179) in your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`).
47+
If you are using the [new JSX transform from React 17](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports), you should disable this rule by extending [`react/jsx-runtime`](https://github.com/jsx-eslint/eslint-plugin-react/blob/8cf47a8ac2242ee00ea36eac4b6ae51956ba4411/index.js#L165-L179) in your eslint config (add `"plugin:react/jsx-runtime"` to `"extends"`).

lib/rules/no-deprecated.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module.exports = {
8585
// 16.9.0
8686
// For now the following life-cycle methods are just legacy, not deprecated:
8787
// `componentWillMount`, `componentWillReceiveProps`, `componentWillUpdate`
88-
// https://github.com/yannickcr/eslint-plugin-react/pull/1750#issuecomment-425975934
88+
// https://github.com/jsx-eslint/eslint-plugin-react/pull/1750#issuecomment-425975934
8989
deprecated.componentWillMount = [
9090
'16.9.0',
9191
'UNSAFE_componentWillMount',

lib/rules/no-unused-prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'use strict';
77

88
// As for exceptions for props.children or props.className (and alike) look at
9-
// https://github.com/yannickcr/eslint-plugin-react/issues/7
9+
// https://github.com/jsx-eslint/eslint-plugin-react/issues/7
1010

1111
const Components = require('../util/Components');
1212
const docsUrl = require('../util/docsUrl');

lib/rules/prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'use strict';
77

88
// As for exceptions for props.children or props.className (and alike) look at
9-
// https://github.com/yannickcr/eslint-plugin-react/issues/7
9+
// https://github.com/jsx-eslint/eslint-plugin-react/issues/7
1010

1111
const Components = require('../util/Components');
1212
const docsUrl = require('../util/docsUrl');

lib/util/docsUrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
function docsUrl(ruleName) {
4-
return `https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules/${ruleName}.md`;
4+
return `https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/${ruleName}.md`;
55
}
66

77
module.exports = docsUrl;

lib/util/propTypes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ module.exports = function propTypesInstructions(context, components, utils) {
10291029
return;
10301030
}
10311031

1032-
// https://github.com/yannickcr/eslint-plugin-react/issues/2784
1032+
// https://github.com/jsx-eslint/eslint-plugin-react/issues/2784
10331033
if (isInsideClassBody(node) && !astUtil.isFunction(node)) {
10341034
return;
10351035
}
@@ -1053,7 +1053,7 @@ module.exports = function propTypesInstructions(context, components, utils) {
10531053
markPropTypesAsDeclared(node, resolveTypeAnnotation(param));
10541054
}
10551055
} else {
1056-
// implements what's discussed here: https://github.com/yannickcr/eslint-plugin-react/issues/2777#issuecomment-683944481
1056+
// implements what's discussed here: https://github.com/jsx-eslint/eslint-plugin-react/issues/2777#issuecomment-683944481
10571057
const annotation = siblingIdentifier.typeAnnotation.typeAnnotation;
10581058

10591059
if (

lib/util/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function getReactVersionFromContext(context) {
8787
confVer = String(settingsVersion);
8888
} else if (!warnedForMissingVersion) {
8989
error('Warning: React version not specified in eslint-plugin-react settings. '
90-
+ 'See https://github.com/yannickcr/eslint-plugin-react#configuration .');
90+
+ 'See https://github.com/jsx-eslint/eslint-plugin-react#configuration .');
9191
warnedForMissingVersion = true;
9292
}
9393
confVer = /^[0-9]+\.[0-9]+$/.test(confVer) ? `${confVer}.0` : confVer;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
],
2424
"repository": {
2525
"type": "git",
26-
"url": "https://github.com/yannickcr/eslint-plugin-react"
26+
"url": "https://github.com/jsx-eslint/eslint-plugin-react"
2727
},
28-
"homepage": "https://github.com/yannickcr/eslint-plugin-react",
29-
"bugs": "https://github.com/yannickcr/eslint-plugin-react/issues",
28+
"homepage": "https://github.com/jsx-eslint/eslint-plugin-react",
29+
"bugs": "https://github.com/jsx-eslint/eslint-plugin-react/issues",
3030
"dependencies": {
3131
"array-includes": "^3.1.4",
3232
"array.prototype.flatmap": "^1.2.5",

tests/lib/rules/destructuring-assignment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ ruleTester.run('destructuring-assignment', rule, {
252252
options: ['always', { ignoreClassFields: true }],
253253
features: ['class fields'],
254254
},
255-
// https://github.com/yannickcr/eslint-plugin-react/issues/2911
255+
// https://github.com/jsx-eslint/eslint-plugin-react/issues/2911
256256
{
257257
code: `
258258
function Foo({ context }) {

tests/lib/rules/function-component-definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ ruleTester.run('function-component-definition', rule, {
195195
options: [{ namedComponents: 'function-declaration' }],
196196
features: ['types'],
197197
},
198-
// https://github.com/yannickcr/eslint-plugin-react/issues/2765
198+
// https://github.com/jsx-eslint/eslint-plugin-react/issues/2765
199199
{
200200
code: `
201201
const obj = {

tests/lib/rules/no-access-state-in-setstate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ruleTester.run('no-access-state-in-setstate', rule, {
110110
parserOptions,
111111
},
112112
{
113-
// https://github.com/yannickcr/eslint-plugin-react/pull/1611
113+
// https://github.com/jsx-eslint/eslint-plugin-react/pull/1611
114114
code: `
115115
function testFunction({a, b}) {
116116
};

tests/lib/rules/no-typos.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ ruleTester.run('no-typos', rule, {
290290
parserOptions,
291291
},
292292
{
293-
// https://github.com/yannickcr/eslint-plugin-react/issues/1353
293+
// https://github.com/jsx-eslint/eslint-plugin-react/issues/1353
294294
code: `
295295
function test(b) {
296296
return a.bind(b);

tests/lib/rules/no-unused-prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ ruleTester.run('no-unused-prop-types', rule, {
20482048
`,
20492049
},
20502050
{
2051-
// The next two test cases are related to: https://github.com/yannickcr/eslint-plugin-react/issues/1183
2051+
// The next two test cases are related to: https://github.com/jsx-eslint/eslint-plugin-react/issues/1183
20522052
code: `
20532053
export default function SomeComponent(props) {
20542054
const callback = () => {

tests/lib/rules/prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3344,7 +3344,7 @@ ruleTester.run('prop-types', rule, {
33443344
features: ['ts', 'no-babel'],
33453345
},
33463346
{
3347-
// issue: https://github.com/yannickcr/eslint-plugin-react/issues/2786
3347+
// issue: https://github.com/jsx-eslint/eslint-plugin-react/issues/2786
33483348
code: `
33493349
import React from 'react';
33503350

0 commit comments

Comments
 (0)