Skip to content

Commit 038e6fa

Browse files
lukythianschmitz
andauthored
Widen eslint-config-react-app peer dependency versions (#7790)
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
1 parent 7e6d6cd commit 038e6fa

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ npx create-react-app my-app
1616
cd my-app
1717
npm start
1818
```
19+
1920
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that npx always uses the latest version.
2021

2122
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_

docusaurus/docs/integrating-with-an-api-backend.md

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ It allows creating hypermedia and GraphQL APIs in minutes.
2424
It is shipped with an official Progressive Web App generator as well as a dynamic administration interface, both built for Create React App.
2525
Check out [this tutorial](https://api-platform.com/docs/distribution).
2626

27-
2827
## C# (ASP.NET Core)
2928

3029
ASP.NET Core has a React project template that uses Create React App. Check out [their documentation](https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/react).

docusaurus/docs/using-https-in-development.md

-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ HTTPS=true npm start
3232

3333
Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page.
3434

35-
3635
## Custom SSL certificate
3736

3837
To set a custom certificate, set the `SSL_CRT_FILE` and `SSL_KEY_FILE` environment variables to the path of the certificate and key files in the same way you do for `HTTPS` above. Note that you will also need to set `HTTPS=true`.
@@ -43,7 +42,6 @@ To set a custom certificate, set the `SSL_CRT_FILE` and `SSL_KEY_FILE` environme
4342
HTTPS=true SSL_CRT_FILE=cert.crt SSL_KEY_FILE=cert.key npm start
4443
```
4544

46-
4745
To avoid having to set the environment variable each time, you can either include in the `npm start` script like so:
4846

4947
```json
@@ -54,4 +52,3 @@ To avoid having to set the environment variable each time, you can either includ
5452

5553
Or you can create a `.env` file with `HTTPS=true` set.
5654
[Learn more about environment variables in CRA](https://create-react-app.dev/docs/adding-custom-environment-variables).
57-

packages/cra-template/template/src/serviceWorker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function registerValidSW(swUrl, config) {
101101
function checkValidServiceWorker(swUrl, config) {
102102
// Check if the service worker can be found. If it can't reload the page.
103103
fetch(swUrl, {
104-
headers: { 'Service-Worker': 'script' }
104+
headers: { 'Service-Worker': 'script' },
105105
})
106106
.then(response => {
107107
// Ensure service worker exists, and that we really are getting a JS file.

packages/eslint-config-react-app/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you want to use this ESLint configuration in a project not built with Create
1919
First, install this package, ESLint and the necessary plugins.
2020

2121
```sh
22-
npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@2.x @typescript-eslint/parser@2.x babel-eslint@10.x eslint@6.x eslint-plugin-flowtype@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@1.x
22+
npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@2.x @typescript-eslint/parser@2.x babel-eslint@10.x eslint@6.x eslint-plugin-flowtype@4.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@2.x
2323
```
2424

2525
Then create a file named `.eslintrc.json` with following contents in the root folder of your project:

packages/eslint-config-react-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"@typescript-eslint/parser": "2.x",
2020
"babel-eslint": "10.x",
2121
"eslint": "6.x",
22-
"eslint-plugin-flowtype": "3.x",
22+
"eslint-plugin-flowtype": "3.x || 4.x",
2323
"eslint-plugin-import": "2.x",
2424
"eslint-plugin-jsx-a11y": "6.x",
2525
"eslint-plugin-react": "7.x",
26-
"eslint-plugin-react-hooks": "1.x"
26+
"eslint-plugin-react-hooks": "1.x || 2.x"
2727
},
2828
"dependencies": {
2929
"confusing-browser-globals": "^1.0.9"

packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/ArrayDestructuring.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import React, { Component } from 'react';
99
import PropTypes from 'prop-types';
1010

1111
function load() {
12-
return [[1, '1'], [2, '2'], [3, '3'], [4, '4']];
12+
return [
13+
[1, '1'],
14+
[2, '2'],
15+
[3, '3'],
16+
[4, '4'],
17+
];
1318
}
1419

1520
export default class extends Component {

0 commit comments

Comments
 (0)