Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

feat: merge cra v4.0.0 #8

Merged
merged 127 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
79dbc33
Update template tests (#8705)
MichaelDeBoey Mar 24, 2020
edc671e
Bump TypeScript template to 3.8 (#8713)
braedongough Mar 27, 2020
bc41892
Add .cjs and .mjs files support to test runner (#8768)
ai Apr 4, 2020
56d34c0
Use simplified import of @testing-library/jest-dom (#8763)
Dremora Apr 4, 2020
c7352c7
Include absoluteRuntime in babel preset docs (#5847)
iddan Apr 4, 2020
4cbb003
Specify what files are served form a bare local copy (#8749)
challet Apr 4, 2020
e0b179c
fix: handle templates without main package field (#8734)
mrmckeb Apr 4, 2020
c5b96c2
Add experimental react-refresh support (#8582)
charrondev Apr 6, 2020
53cace5
Add setupTests.js to the list of generated files (#8791)
MostafaNawara Apr 7, 2020
f0f4d5b
Simplify wording in setting-up-your-editor.md (#8684)
coryhouse Apr 7, 2020
d80e533
Update url to see prettier in action (#8610)
M165437 Apr 7, 2020
a4fa63f
Bump acorn from 6.4.0 to 6.4.1 in /docusaurus/website (#8656)
dependabot[bot] Apr 7, 2020
e89f153
Don't use webpack multi entry unnecessarily (#8834)
sebmarkbage Apr 15, 2020
855a984
Widen eslint-config-react-app peer dependency versions (#8892)
NMinhNguyen Apr 27, 2020
3771237
Revert "Replace favicon in templates (#8194)" (#8925)
gaearon Apr 28, 2020
9cc1bdf
Minor/patch dependency upgrades (#8947)
ianschmitz May 3, 2020
9904075
Upgrade to Jest 25 (#8362)
skovhus May 4, 2020
8b0d21f
Drop Node 8 support (#8948)
ianschmitz May 4, 2020
fa93437
Bump React Hooks ESLint plugin to 4.0.0 (#8939)
gaearon May 4, 2020
99f1b6b
Update build script deployment URL (#8651)
StenAL May 4, 2020
2975939
Do not check for interactive session to shut down dev server (#8845)
jeremywadsack May 4, 2020
b37cff9
Support source maps for scss in dev environments (#8638)
MKorostoff May 4, 2020
790fba9
Skip stdin resuming to support lerna parallel (#8700)
hieuxlu May 4, 2020
4974a20
Set resetMocks to true by default in jest config (#7899)
alexkrolick May 4, 2020
3c2f2d4
Add import/no-anonymous-default-export lint rule (#8926)
shakib609 May 4, 2020
5d437b8
Upgrade testing-library packages (#8406)
gnapse May 4, 2020
5a019e6
Bump style-loader to 1.2.1 (#8891)
chybisov May 4, 2020
2473a73
Support devDependencies in templates (#8838)
mrmckeb May 4, 2020
62e8e3d
fix react-refresh babel plugin not applied (#8952)
tanhauhau May 4, 2020
6a7aaa2
Add a VSCode tip in the CSS reset section (#8246)
maazadeeb May 5, 2020
408c065
Add back in --stats output from webpack. (#8790)
samccone May 5, 2020
1f81469
Fix --use-pnp for Yarn 2 (#8460)
nickserv May 5, 2020
6b28c60
Replace period in CSS Module classnames (#8492)
evankennedy May 5, 2020
9123aae
Move shortlinks to cra.link (#8957)
iansu May 5, 2020
0cfccd8
Remove outdated comment (#8858)
availchet May 8, 2020
a0b3753
bump webpack-dev-server to 3.11.0 (#8975)
mhassan1 May 8, 2020
f5c3bdb
Dependency major version upgrades (#8950)
ianschmitz May 13, 2020
d97fbad
Update packages (#9081)
ianschmitz May 29, 2020
26a1c7f
Fix dotenv file loading order (#9037)
Timer May 29, 2020
285f9cb
feat: remove typescript flag and NODE_PATH support (#8934)
mrmckeb May 29, 2020
461775a
Update question issue template
iansu May 30, 2020
78e13b0
Update getting-started.md to match templates (#9089)
josenriagu May 31, 2020
c87ab79
Upgrade to Jest 26 (#8955)
ianschmitz Jun 1, 2020
538d527
feat(react-scripts): allow testMatch for jest config (#9114)
favna Jun 6, 2020
fa648da
Add support for absolute paths when using url() in CSS (#7937)
atlanteh Jun 7, 2020
2814124
Upgrade dependencies (#9132)
ianschmitz Jun 10, 2020
a2dac9e
Fix typo in docs (#9135)
sonicdoe Jun 10, 2020
8fda779
Add performance relayer + documentation (web-vitals) (#9116)
housseindjirdeh Jun 11, 2020
b389928
Update deployment docs for Azure Static Web Apps (#9042)
burkeholland Jun 14, 2020
41a1088
Replace Spectrum links with GitHub Discussions (#9102)
iansu Jun 14, 2020
71facad
Use process.execPath to spawn node subprocess (#8694)
anuraaga Jun 20, 2020
697dffe
Upgrade dependencies (#9196)
ianschmitz Jun 20, 2020
fdbde1f
Bump version of Verdaccio (#7787)
ianschmitz Jun 20, 2020
6223fd9
Support ESLint 7.x (#8978)
MichaelDeBoey Jun 23, 2020
abe2369
Fix chai URL (#8895)
BMorearty Jun 26, 2020
2da5517
Explain how to uninstall create-react-app globally (#9244)
nickserv Jul 2, 2020
759696d
Upgrade dependencies (#9317)
ianschmitz Jul 16, 2020
8e720ae
Switch to the Workbox InjectManifest plugin (#9205)
jeffposnick Jul 22, 2020
d1f32c4
Upgrade refresh plugin (#9348)
ianschmitz Jul 22, 2020
2bef8a5
feat: Update ESLint dependencies (#9251)
MichaelDeBoey Jul 22, 2020
bdae9b6
Remove server worker registration from default templates (#9349)
iansu Jul 23, 2020
a01b1c5
Clarify wording in adding TypeScript to existing project (#9231)
merelinguist Jul 27, 2020
66bf7df
feat: better refresh plugin integration (#9375)
pmmmwh Jul 28, 2020
a79d8b8
feat: exit on outdated create-react-app version (#9359)
mrmckeb Jul 29, 2020
7ab0116
Prepare 4.0.0 alpha release
iansu Jul 30, 2020
58db16b
Updated README.md Templates to Follow ESLint Markdown Rules (#9241)
Aug 1, 2020
de27bcf
[Doc] fix React Testing Library example (#9245)
sakit0 Aug 1, 2020
1a6ef92
Update running-tests.md (#9380)
andycanderson Aug 1, 2020
aeaf575
Add Fast Refresh warning when using React < 16.10 (#9350)
iansu Aug 2, 2020
5bd6e73
Publish refreshOverlayInterop with react-dev-utils (#9390)
klinem Aug 2, 2020
2c2e224
fix: remove deprecated rule (#9401)
ljosberinn Aug 2, 2020
ebab256
clean formatMessage usage (#9059)
chenxsan Aug 5, 2020
3cf2b06
feat: Update testing-library dependencies to latest (#9252)
MichaelDeBoey Aug 5, 2020
f86cf44
fix: use default modules option from `preset-env` (#9374)
JLHwung Aug 5, 2020
42dcf79
Bump immer version (#8933)
staff0rd Aug 5, 2020
6cd3826
Upgrade whatwg-fetch (#9392)
Lapz Aug 5, 2020
5036825
Fix template name handling (#9412)
iansu Aug 5, 2020
3d74b79
Prepare 4.0.0 alpha release
iansu Aug 5, 2020
c8ea284
chore: update to jest@26.3 (#9461)
SimenB Aug 11, 2020
5e41ca0
Create SECURITY.md
gaearon Aug 11, 2020
5e703a5
Add 3.4.2 to changelog
gaearon Aug 11, 2020
8e761d1
Add 3.4.3 to the changelog
gaearon Aug 12, 2020
7763737
Fixes in the /packages/react-devs-utils/README.md file (#9471)
webdott Aug 17, 2020
edfc30a
Added CRA logo in README.md (#9363)
raihan71 Aug 24, 2020
cf74eb9
Update Vercel deployment documentation (#9560)
timothyis Aug 28, 2020
97695bc
Fix insensitive language in Docusaurus docs (#9618)
timothyis Sep 9, 2020
e258532
Remove ESLint extends and add Jest rules (#9587)
mrmckeb Sep 13, 2020
cef668a
fix: Fix azure-pipelines' endOfLine (#9258)
MichaelDeBoey Sep 14, 2020
2a8237c
Update template dependencies to latest version (#9526)
MichaelDeBoey Sep 14, 2020
6abc7a5
Update running-tests.md (#9073)
MichaelDeBoey Sep 14, 2020
22b61c9
feat: Update ESLint dependencies (#9434)
MichaelDeBoey Sep 14, 2020
ce1e2af
Emphasise that Next.js is capable of SSG (#9630)
liamness Sep 14, 2020
65d8eb2
docs: add alt tag to homepage logo (#9499)
tobiasbueschel Sep 14, 2020
552c7a9
fix: resolve CI build failure (#9640)
mrmckeb Sep 16, 2020
730438c
Use new JSX transform with React 17 (#9645)
iansu Sep 16, 2020
14b7868
Upgrade dependencies (#9639)
ianschmitz Sep 16, 2020
930b5db
Prepare 4.0.0 alpha release
iansu Sep 16, 2020
13e0d1c
Update postcss-safe-parser
iansu Sep 16, 2020
025f273
Prepare 4.0.0 alpha release
iansu Sep 16, 2020
7e4949a
Update CODEOWNERS
iansu Sep 30, 2020
d5c0fe2
fix: resolve ESLint config from appPath (#9683)
mrmckeb Sep 30, 2020
6a51dcd
Add AVIF image support (#9611)
hongbo-miao Oct 14, 2020
1f2d387
fix: resolve new JSX runtime issues (#9788)
mrmckeb Oct 15, 2020
6f3e32e
Upgrade Docusaurus to latest version (#9728)
lex111 Oct 16, 2020
d07b7d0
Replace deprecated eslint-loader with eslint-webpack-plugin (#9751)
tooppaaa Oct 20, 2020
b1f8536
Add 3.4.4 to the changelog
gaearon Oct 20, 2020
7965594
Bump resolve-url-loader version (#9841)
johannespfeiffer Oct 20, 2020
0a93e32
Fix refreshOverlayInterop module scope error (#9805)
ianschmitz Oct 21, 2020
ed919b1
Make eslint-plugin-jest an optional peerDependency (#9670)
MichaelDeBoey Oct 22, 2020
10fa972
feat(eslint-config-react-app): Add jest & testing-library rules (#8963)
MichaelDeBoey Oct 22, 2020
329f392
feat: Update ESLint dependencies (#9856)
MichaelDeBoey Oct 22, 2020
85ab02b
feat: remove unused React imports (#9853)
mrmckeb Oct 22, 2020
fe785b2
feat: Update all dependencies (#9857)
MichaelDeBoey Oct 22, 2020
e63de79
New JSX Transform opt out (#9861)
iansu Oct 23, 2020
d61347d
Use new JSX setting with TypeScript 4.1.0 (#9734)
iansu Oct 23, 2020
4bc639c
Upgrade to React 17 (#9863)
iansu Oct 23, 2020
f2aef41
Prepare 4.0.0 alpha release
iansu Oct 23, 2020
2b1161b
Pass JSX runtime setting to Babel preset in Jest config (#9865)
iansu Oct 23, 2020
014ca01
Prepare 4.0.0 release
iansu Oct 23, 2020
af616ab
Update CHANGELOG
iansu Oct 23, 2020
523b416
Add link to Open Collective (#9864)
iansu Oct 23, 2020
95265c3
Update CHANGELOG
iansu Oct 23, 2020
d23d615
Update react dom in error overlay
iansu Oct 23, 2020
88ca4f6
Prepare 4.0.0 release
iansu Oct 23, 2020
ed95893
Publish
iansu Oct 23, 2020
9065023
Merge tag 'v4.0.0' into merge
Nov 11, 2020
2400133
undo antd-package removel
Nov 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace deprecated eslint-loader with eslint-webpack-plugin (facebook…
…#9751)

* Replace deprecated eslint-loader by eslint-webpack-plugin

* Update eslintFormatter for eslint-webpack-plugin

* fix: always enable jsx-uses-react

Co-authored-by: Brody McKee <mrmckeb@hotmail.com>
  • Loading branch information
tooppaaa and mrmckeb committed Oct 20, 2020
commit d07b7d025f5933710fcb01718617dbdf4bc54c33
2 changes: 1 addition & 1 deletion packages/eslint-config-react-app/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ module.exports = {

rules: {
'react/jsx-uses-vars': 'warn',
'react/jsx-uses-react': 'warn',
...(!hasJsxRuntime && {
'react/jsx-uses-react': 'warn',
'react/react-in-jsx-scope': 'error',
}),
},
Expand Down
11 changes: 11 additions & 0 deletions packages/react-dev-utils/eslintFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,24 @@

'use strict';

const path = require('path');
const chalk = require('chalk');
const stripAnsi = require('strip-ansi');
const table = require('text-table');

const cwd = process.cwd();

function isError(message) {
if (message.fatal || message.severity === 2) {
return true;
}
return false;
}

function getRelativePath(filePath) {
return path.relative(cwd, filePath);
}

function formatter(results) {
let output = '\n';
let hasErrors = false;
Expand Down Expand Up @@ -73,6 +80,10 @@ function formatter(results) {
},
});

// print the filename and relative path
output += `${getRelativePath(result.filePath)}\n`;

// print the errors
output += `${outputTable}\n\n`;
});

Expand Down
37 changes: 14 additions & 23 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const ESLintPlugin = require('eslint-webpack-plugin');
const paths = require('./paths');
const modules = require('./modules');
const getClientEnvironment = require('./env');
Expand Down Expand Up @@ -349,29 +350,6 @@ module.exports = function (webpackEnv) {
rules: [
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },

// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
enforce: 'pre',
use: [
{
options: {
cache: true,
cwd: paths.appPath,
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
baseConfig: {
extends: [require.resolve('eslint-config-react-app/base')],
},
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
Expand Down Expand Up @@ -742,6 +720,19 @@ module.exports = function (webpackEnv) {
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined,
}),
new ESLintPlugin({
// Plugin options
extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
context: paths.appSrc,
// ESLint class options
cwd: paths.appPath,
resolvePluginsRelativeTo: __dirname,
baseConfig: {
extends: [require.resolve('eslint-config-react-app/base')],
},
}),
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell webpack to provide empty mocks for them so importing them works.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"dotenv-expand": "5.1.0",
"eslint": "^7.9.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^24.0.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.2",
"eslint-webpack-plugin": "^2.1.0",
"file-loader": "6.1.0",
"fs-extra": "^9.0.0",
"html-webpack-plugin": "4.4.1",
Expand Down