Skip to content

Commit 151bb2b

Browse files
Schweinepriesterljharb
authored andcommitted
[Docs] HTTP => HTTPS
1 parent ccf3c35 commit 151bb2b

16 files changed

+59
-57
lines changed

CHANGELOG.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
3-
This project adheres to [Semantic Versioning](http://semver.org/).
4-
This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com).
3+
This project adheres to [Semantic Versioning](https://semver.org/).
4+
This change log adheres to standards from [Keep a CHANGELOG](https://keepachangelog.com).
55

66
## Unreleased
77

@@ -13,9 +13,11 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
1313

1414
### Changed
1515
* [readme] change [`jsx-runtime`] link from branch to sha ([#3160][] @tatsushitoji)
16+
* [Docs] HTTP => HTTPS ([#3133][] @Schweinepriester)
1617

1718
[#3163]: https://github.com/yannickcr/eslint-plugin-react/pull/3163
1819
[#3160]: https://github.com/yannickcr/eslint-plugin-react/pull/3160
20+
[#3133]: https://github.com/yannickcr/eslint-plugin-react/pull/3133
1921
[#2921]: https://github.com/yannickcr/eslint-plugin-react/pull/2921
2022

2123
## [7.28.0] - 2021.12.22
@@ -2189,7 +2191,7 @@ React ([#1073][] @jomasti)
21892191
* Add support for `PureComponent` in [`prefer-stateless-function`][] ([#781][] @tiemevanveen)
21902192

21912193
### Fixed
2192-
* Fix [`jsx-uses-vars`][] to work better with [`prefer-const`](http://eslint.org/docs/rules/prefer-const). You'll need to upgrade to ESLint 3.4.0 to completely fix the compatibility issue ([#716][])
2194+
* Fix [`jsx-uses-vars`][] to work better with [`prefer-const`](https://eslint.org/docs/rules/prefer-const). You'll need to upgrade to ESLint 3.4.0 to completely fix the compatibility issue ([#716][])
21932195
* Fix [`require-render-return`][] crash ([#784][])
21942196
* Fix related components detection in [`prop-types`][] ([#735][])
21952197
* Fix component detection to ignore functions expression without a parent component

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ This pairs well with the `eslint:all` rule.
262262
}
263263
```
264264

265-
**Note**: These configurations will import `eslint-plugin-react` and enable JSX in [parser options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options).
265+
**Note**: These configurations will import `eslint-plugin-react` and enable JSX in [parser options](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options).
266266

267267
# License
268268

269-
`eslint-plugin-react` is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
269+
`eslint-plugin-react` is licensed under the [MIT License](https://opensource.org/licenses/mit-license.php).
270270

271271

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

docs/rules/boolean-prop-naming.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ This value is boolean. It tells if nested props should be validated as well. By
118118
```
119119

120120
[PropTypes]: https://reactjs.org/docs/typechecking-with-proptypes.html
121-
[TypeScript]: http://www.typescriptlang.org/
121+
[TypeScript]: https://www.typescriptlang.org/
122122
[Flow]: https://flow.org/

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,5 @@ If you don't care about stray `defaultsProps` in your components, you can disabl
196196
- [Official React documentation on defaultProps](https://facebook.github.io/react/docs/typechecking-with-proptypes.html#default-prop-values)
197197

198198
[PropTypes]: https://reactjs.org/docs/typechecking-with-proptypes.html
199-
[TypeScript]: http://www.typescriptlang.org/
199+
[TypeScript]: https://www.typescriptlang.org/
200200
[Flow]: https://flow.org/

docs/rules/jsx-curly-spacing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Examples of **correct** code for this rule, when configured with `"never"` and `
219219
<App blah={3} foo={ {bar: true, baz: true} } />;
220220
```
221221

222-
Please note that spacing of the object literal curly braces themselves is controlled by the built-in [`object-curly-spacing`](http://eslint.org/docs/rules/object-curly-spacing) rule.
222+
Please note that spacing of the object literal curly braces themselves is controlled by the built-in [`object-curly-spacing`](https://eslint.org/docs/rules/object-curly-spacing) rule.
223223

224224
### Shorthand options
225225

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ This rule aims to prevent user generated link hrefs and form actions from creati
3737
Examples of **incorrect** code for this rule, when configured with `{ "enforceDynamicLinks": "always" }`:
3838

3939
```jsx
40-
var Hello = <a target='_blank' href="http://example.com/"></a>
40+
var Hello = <a target='_blank' href="https://example.com/"></a>
4141
var Hello = <a target='_blank' href={dynamicLink}></a>
4242
```
4343

4444
Examples of **correct** code for this rule:
4545

4646
```jsx
4747
var Hello = <p target="_blank"></p>
48-
var Hello = <a target="_blank" rel="noreferrer" href="http://example.com"></a>
49-
var Hello = <a target="_blank" rel="noopener noreferrer" href="http://example.com"></a>
48+
var Hello = <a target="_blank" rel="noreferrer" href="https://example.com"></a>
49+
var Hello = <a target="_blank" rel="noopener noreferrer" href="https://example.com"></a>
5050
var Hello = <a target="_blank" href="relative/path/in/the/host"></a>
5151
var Hello = <a target="_blank" href="/absolute/path/in/the/host"></a>
5252
var Hello = <a></a>
@@ -68,7 +68,7 @@ Spread attributes are a handy way of passing programmatically-generated props to
6868

6969
```jsx
7070
const unsafeProps = {
71-
href: "http://example.com",
71+
href: "https://example.com",
7272
target: "_blank",
7373
};
7474

@@ -88,13 +88,13 @@ Defaults to false. If false, this rule will ignore all spread attributes. If tru
8888
When option `forms` is set to `true`, the following is considered an error:
8989

9090
```jsx
91-
var Hello = <form target="_blank" action="http://example.com/"></form>;
91+
var Hello = <form target="_blank" action="https://example.com/"></form>;
9292
```
9393

9494
When option `links` is set to `true`, the following is considered an error:
9595

9696
```jsx
97-
var Hello = <a target='_blank' href="http://example.com/"></form>
97+
var Hello = <a target='_blank' href="https://example.com/"></form>
9898
```
9999

100100
### Custom link components
@@ -104,14 +104,14 @@ This rule supports the ability to use custom components for links, such as `<Lin
104104
Examples of **incorrect** code for this rule:
105105

106106
```jsx
107-
var Hello = <Link target="_blank" to="http://example.com/"></Link>
107+
var Hello = <Link target="_blank" to="https://example.com/"></Link>
108108
var Hello = <Link target="_blank" to={dynamicLink}></Link>
109109
```
110110

111111
Examples of **correct** code for this rule:
112112

113113
```jsx
114-
var Hello = <Link target="_blank" rel="noopener noreferrer" to="http://example.com"></Link>
114+
var Hello = <Link target="_blank" rel="noopener noreferrer" to="https://example.com"></Link>
115115
var Hello = <Link target="_blank" to="relative/path/in/the/host"></Link>
116116
var Hello = <Link target="_blank" to="/absolute/path/in/the/host"></Link>
117117
var Hello = <Link />

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](https://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/no-render-return-value.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prevent usage of the return value of ReactDOM.render (react/no-render-return-value)
22

3-
> `ReactDOM.render()` currently returns a reference to the root `ReactComponent` instance. However, using this return value is legacy and should be avoided because future versions of React may render components asynchronously in some cases. If you need a reference to the root `ReactComponent` instance, the preferred solution is to attach a [callback ref](http://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute) to the root element.
3+
> `ReactDOM.render()` currently returns a reference to the root `ReactComponent` instance. However, using this return value is legacy and should be avoided because future versions of React may render components asynchronously in some cases. If you need a reference to the root `ReactComponent` instance, the preferred solution is to attach a [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) to the root element.
44
55
Source: [ReactDOM documentation](https://facebook.github.io/react/docs/react-dom.html#render)
66

docs/rules/no-unused-prop-types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,5 @@ AComponent.propTypes = {
140140
```
141141

142142
[PropTypes]: https://reactjs.org/docs/typechecking-with-proptypes.html
143-
[TypeScript]: http://www.typescriptlang.org/
143+
[TypeScript]: https://www.typescriptlang.org/
144144
[Flow]: https://flow.org/

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](https://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

docs/rules/prop-types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@ For now we should detect components created with:
176176
* an ES6 class that inherit from `React.Component` or `Component`
177177

178178
[PropTypes]: https://reactjs.org/docs/typechecking-with-proptypes.html
179-
[TypeScript]: http://www.typescriptlang.org/
179+
[TypeScript]: https://www.typescriptlang.org/
180180
[Flow]: https://flow.org/

docs/rules/require-default-props.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,5 +348,5 @@ If you don't care about using `defaultProps` for your component's props that are
348348
- [Official React documentation on defaultProps](https://facebook.github.io/react/docs/typechecking-with-proptypes.html#default-prop-values)
349349

350350
[PropTypes]: https://reactjs.org/docs/typechecking-with-proptypes.html
351-
[TypeScript]: http://www.typescriptlang.org/
351+
[TypeScript]: https://www.typescriptlang.org/
352352
[Flow]: https://flow.org/

lib/rules/no-unknown-property.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function getDOMPropertyNames(context) {
154154
const tagConvention = /^[a-z][^-]*$/;
155155
function isTagName(node) {
156156
if (tagConvention.test(node.parent.name.name)) {
157-
// http://www.w3.org/TR/custom-elements/#type-extension-semantics
157+
// https://www.w3.org/TR/custom-elements/#type-extension-semantics
158158
return !node.parent.attributes.some((attrNode) => (
159159
attrNode.type === 'JSXAttribute'
160160
&& attrNode.name.type === 'JSXIdentifier'

lib/util/pragma.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const JS_IDENTIFIER_REGEX = /^[_$a-zA-Z][_$a-zA-Z0-9]*$/;
1111

1212
function getCreateClassFromContext(context) {
1313
let pragma = 'createReactClass';
14-
// .eslintrc shared settings (http://eslint.org/docs/user-guide/configuring#adding-shared-settings)
14+
// .eslintrc shared settings (https://eslint.org/docs/user-guide/configuring#adding-shared-settings)
1515
if (context.settings.react && context.settings.react.createClass) {
1616
pragma = context.settings.react.createClass;
1717
}
@@ -23,7 +23,7 @@ function getCreateClassFromContext(context) {
2323

2424
function getFragmentFromContext(context) {
2525
let pragma = 'Fragment';
26-
// .eslintrc shared settings (http://eslint.org/docs/user-guide/configuring#adding-shared-settings)
26+
// .eslintrc shared settings (https://eslint.org/docs/user-guide/configuring#adding-shared-settings)
2727
if (context.settings.react && context.settings.react.fragment) {
2828
pragma = context.settings.react.fragment;
2929
}
@@ -42,7 +42,7 @@ function getFromContext(context) {
4242
if (pragmaNode) {
4343
const matches = JSX_ANNOTATION_REGEX.exec(pragmaNode.value);
4444
pragma = matches[1].split('.')[0];
45-
// .eslintrc shared settings (http://eslint.org/docs/user-guide/configuring#adding-shared-settings)
45+
// .eslintrc shared settings (https://eslint.org/docs/user-guide/configuring#adding-shared-settings)
4646
} else if (context.settings.react && context.settings.react.pragma) {
4747
pragma = context.settings.react.pragma;
4848
}

lib/util/version.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function detectReactVersion(context) {
7171

7272
function getReactVersionFromContext(context) {
7373
let confVer = '999.999.999';
74-
// .eslintrc shared settings (http://eslint.org/docs/user-guide/configuring#adding-shared-settings)
74+
// .eslintrc shared settings (https://eslint.org/docs/user-guide/configuring#adding-shared-settings)
7575
if (context.settings && context.settings.react && context.settings.react.version) {
7676
let settingsVersion = context.settings.react.version;
7777
if (settingsVersion === 'detect') {
@@ -111,7 +111,7 @@ function detectFlowVersion(context) {
111111

112112
function getFlowVersionFromContext(context) {
113113
let confVer = '999.999.999';
114-
// .eslintrc shared settings (http://eslint.org/docs/user-guide/configuring#adding-shared-settings)
114+
// .eslintrc shared settings (https://eslint.org/docs/user-guide/configuring#adding-shared-settings)
115115
if (context.settings.react && context.settings.react.flowVersion) {
116116
let flowVersion = context.settings.react.flowVersion;
117117
if (flowVersion === 'detect') {

tests/lib/rules/jsx-no-target-blank.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ ruleTester.run('jsx-no-target-blank', rule, {
4646
{ code: '<a href={`foobar`} target={`_blank`} rel={`noreferrer`}></a>' },
4747
{ code: '<a target="_blank" {...spreadProps} rel="noopener noreferrer"></a>' },
4848
{ code: '<a target="_blank" {...spreadProps} rel="noreferrer"></a>' },
49-
{ code: '<a {...spreadProps} target="_blank" rel="noopener noreferrer" href="http://example.com">s</a>' },
50-
{ code: '<a {...spreadProps} target="_blank" rel="noreferrer" href="http://example.com">s</a>' },
49+
{ code: '<a {...spreadProps} target="_blank" rel="noopener noreferrer" href="https://example.com">s</a>' },
50+
{ code: '<a {...spreadProps} target="_blank" rel="noreferrer" href="https://example.com">s</a>' },
5151
{ code: '<a target="_blank" rel="noopener noreferrer" {...spreadProps}></a>' },
5252
{ code: '<a target="_blank" rel="noreferrer" {...spreadProps}></a>' },
5353
{ code: '<p target="_blank"></p>' },
@@ -127,15 +127,15 @@ ruleTester.run('jsx-no-target-blank', rule, {
127127
options: [{ forms: false, links: true }],
128128
},
129129
{
130-
code: '<form action="http://example.com" target="_blank"></form>',
130+
code: '<form action="https://example.com" target="_blank"></form>',
131131
options: [],
132132
},
133133
{
134-
code: '<form action="http://example.com" target="_blank" rel="noopener noreferrer"></form>',
134+
code: '<form action="https://example.com" target="_blank" rel="noopener noreferrer"></form>',
135135
options: [{ forms: true }],
136136
},
137137
{
138-
code: '<form action="http://example.com" target="_blank" rel="noopener noreferrer"></form>',
138+
code: '<form action="https://example.com" target="_blank" rel="noopener noreferrer"></form>',
139139
options: [{ forms: true, links: false }],
140140
},
141141
{
@@ -144,48 +144,48 @@ ruleTester.run('jsx-no-target-blank', rule, {
144144
]),
145145
invalid: parsers.all([
146146
{
147-
code: '<a target="_blank" href="http://example.com/1"></a>',
148-
output: '<a target="_blank" href="http://example.com/1" rel="noreferrer"></a>',
147+
code: '<a target="_blank" href="https://example.com/1"></a>',
148+
output: '<a target="_blank" href="https://example.com/1" rel="noreferrer"></a>',
149149
errors: defaultErrors,
150150
},
151151
{
152-
code: '<a target="_blank" rel="" href="http://example.com/2"></a>',
153-
output: '<a target="_blank" rel="noreferrer" href="http://example.com/2"></a>',
152+
code: '<a target="_blank" rel="" href="https://example.com/2"></a>',
153+
output: '<a target="_blank" rel="noreferrer" href="https://example.com/2"></a>',
154154
errors: defaultErrors,
155155
},
156156
{
157-
code: '<a target="_blank" rel={0} href="http://example.com/3"></a>',
158-
output: '<a target="_blank" rel="noreferrer" href="http://example.com/3"></a>',
157+
code: '<a target="_blank" rel={0} href="https://example.com/3"></a>',
158+
output: '<a target="_blank" rel="noreferrer" href="https://example.com/3"></a>',
159159
errors: defaultErrors,
160160
},
161161
{
162-
code: '<a target="_blank" rel={1} href="http://example.com/3"></a>',
163-
output: '<a target="_blank" rel="noreferrer" href="http://example.com/3"></a>',
162+
code: '<a target="_blank" rel={1} href="https://example.com/3"></a>',
163+
output: '<a target="_blank" rel="noreferrer" href="https://example.com/3"></a>',
164164
errors: defaultErrors,
165165
},
166166
{
167-
code: '<a target="_blank" rel={false} href="http://example.com/4"></a>',
168-
output: '<a target="_blank" rel="noreferrer" href="http://example.com/4"></a>',
167+
code: '<a target="_blank" rel={false} href="https://example.com/4"></a>',
168+
output: '<a target="_blank" rel="noreferrer" href="https://example.com/4"></a>',
169169
errors: defaultErrors,
170170
},
171171
{
172-
code: '<a target="_blank" rel={null} href="http://example.com/5"></a>',
173-
output: '<a target="_blank" rel="noreferrer" href="http://example.com/5"></a>',
172+
code: '<a target="_blank" rel={null} href="https://example.com/5"></a>',
173+
output: '<a target="_blank" rel="noreferrer" href="https://example.com/5"></a>',
174174
errors: defaultErrors,
175175
},
176176
{
177-
code: '<a target="_blank" rel="noopenernoreferrer" href="http://example.com/6"></a>',
178-
output: '<a target="_blank" rel="noopener noreferrer" href="http://example.com/6"></a>',
177+
code: '<a target="_blank" rel="noopenernoreferrer" href="https://example.com/6"></a>',
178+
output: '<a target="_blank" rel="noopener noreferrer" href="https://example.com/6"></a>',
179179
errors: defaultErrors,
180180
},
181181
{
182-
code: '<a target="_blank" rel="no referrer" href="http://example.com/7"></a>',
183-
output: '<a target="_blank" rel="no referrer noreferrer" href="http://example.com/7"></a>',
182+
code: '<a target="_blank" rel="no referrer" href="https://example.com/7"></a>',
183+
output: '<a target="_blank" rel="no referrer noreferrer" href="https://example.com/7"></a>',
184184
errors: defaultErrors,
185185
},
186186
{
187-
code: '<a target="_BLANK" href="http://example.com/8"></a>',
188-
output: '<a target="_BLANK" href="http://example.com/8" rel="noreferrer"></a>',
187+
code: '<a target="_BLANK" href="https://example.com/8"></a>',
188+
output: '<a target="_BLANK" href="https://example.com/8" rel="noreferrer"></a>',
189189
errors: defaultErrors,
190190
},
191191
{
@@ -248,8 +248,8 @@ ruleTester.run('jsx-no-target-blank', rule, {
248248
errors: defaultErrors,
249249
},
250250
{
251-
code: '<a href="http://example.com/20" target="_blank"></a>',
252-
output: '<a href="http://example.com/20" target="_blank" rel="noreferrer"></a>',
251+
code: '<a href="https://example.com/20" target="_blank"></a>',
252+
output: '<a href="https://example.com/20" target="_blank" rel="noreferrer"></a>',
253253
options: [{ allowReferrer: true }],
254254
errors: [{ messageId: 'noTargetBlankWithoutNoopener' }],
255255
},
@@ -327,22 +327,22 @@ ruleTester.run('jsx-no-target-blank', rule, {
327327
errors: defaultErrors,
328328
},
329329
{
330-
code: '<form method="POST" action="http://example.com" target="_blank"></form>',
330+
code: '<form method="POST" action="https://example.com" target="_blank"></form>',
331331
options: [{ forms: true }],
332332
errors: defaultErrors,
333333
},
334334
{
335-
code: '<form method="POST" action="http://example.com" rel="" target="_blank"></form>',
335+
code: '<form method="POST" action="https://example.com" rel="" target="_blank"></form>',
336336
options: [{ forms: true }],
337337
errors: defaultErrors,
338338
},
339339
{
340-
code: '<form method="POST" action="http://example.com" rel="noopenernoreferrer" target="_blank"></form>',
340+
code: '<form method="POST" action="https://example.com" rel="noopenernoreferrer" target="_blank"></form>',
341341
options: [{ forms: true }],
342342
errors: defaultErrors,
343343
},
344344
{
345-
code: '<form method="POST" action="http://example.com" rel="noopenernoreferrer" target="_blank"></form>',
345+
code: '<form method="POST" action="https://example.com" rel="noopenernoreferrer" target="_blank"></form>',
346346
options: [{ forms: true, links: false }],
347347
errors: defaultErrors,
348348
},

0 commit comments

Comments
 (0)