diff --git a/.all-contributorsrc b/.all-contributorsrc
index f48f6d709b..858168d6dd 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -168,6 +168,16 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "Can-Sahin",
+ "name": "Can Sahin",
+ "avatar_url": "https://avatars2.githubusercontent.com/u/33245689?v=4",
+ "profile": "https://github.com/Can-Sahin",
+ "contributions": [
+ "code",
+ "doc",
+ ]
}
],
"contributorsPerLine": 8
diff --git a/.eslintrc.js b/.eslintrc.js
index 0ee1945040..79e16463f2 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -29,7 +29,6 @@ module.exports = {
'import/imports-first': 0,
'import/newline-after-import': 0,
'import/no-dynamic-require': 0,
- 'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 0,
'import/no-unresolved': 2,
'import/no-webpack-loader-syntax': 0,
@@ -69,6 +68,7 @@ module.exports = {
'react/forbid-prop-types': 0,
'react/jsx-first-prop-new-line': [2, 'multiline'],
'react/jsx-filename-extension': 0,
+ 'react/jsx-props-no-spreading': 0,
'react/jsx-no-target-blank': 0,
'react/jsx-uses-vars': 2,
'react/require-default-props': 0,
@@ -79,6 +79,14 @@ module.exports = {
'redux-saga/yield-effects': 2,
'require-yield': 0,
},
+ overrides: [
+ {
+ files: ['internals/**/*.*', 'server/**/*.*'],
+ rules: {
+ 'import/no-extraneous-dependencies': 0,
+ },
+ },
+ ],
settings: {
'import/resolver': {
webpack: {
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000000..92b6a870e2
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,2 @@
+# Global owners
+* @julienben @gretzky @justingreenberg @jwinn @Mensae
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000000..1b38c40795
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,4 @@
+# These are supported funding model platforms
+
+github: [julienben, gretzky]
+open_collective: react-boilerplate
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index c2f460bacd..3bfe453f55 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,15 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
-
---
Before opening a new issue, please take a moment to review our [**community guidelines**](https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved.
## Description
+
A clear and concise description of what the bug is.
## Steps to reproduce
+
Steps to reproduce the behavior:
(Add link to a demo on https://jsfiddle.net or similar if possible)
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 066b2d920a..a09db44fb0 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,7 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project
-
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 1ddadf9ee4..5ff073a69c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -10,7 +10,7 @@ on something that might not end up being merged into the project.
Before opening a pull request, please ensure:
- [ ] You have followed our [**contributing guidelines**](https://github.com/react-boilerplate/react-boilerplate/blob/master/CONTRIBUTING.md)
-- [ ] Double-check your branch is based on `dev` and targets `dev`
+- [ ] Double-check your branch is based on `dev` and targets `dev`
- [ ] Pull request has tests (we are going for 100% coverage!)
- [ ] Code is well-commented, linted and follows project conventions
- [ ] Documentation is updated (if necessary)
diff --git a/.github/issue-close-app.yml b/.github/issue-close-app.yml
index 18794e3d03..e8a0f5549c 100644
--- a/.github/issue-close-app.yml
+++ b/.github/issue-close-app.yml
@@ -1,14 +1,19 @@
-comment: This issue was automatically closed because it does not follow either one of our templates. Please open a new issue and fill out the template that appears instead of deleting it. If you're reporting an issue, it's especially important that you provide detailed steps for how to reproduce it.
+comment: "This issue was automatically closed because it does not follow either one of react-boilerplate's templates.
-issueConfigs:
+If your issue is indeed a bug report or a feature request, please open a new issue and fill out the relevant template instead of deleting it.
+
+If you're reporting a bug, it's especially important that you provide detailed steps for how to reproduce it.
+Please note that requests for help should go to [our Spectrum channel](https://spectrum.chat/react-boilerplate?tab=posts)."
+
+issueConfigs:
- content:
- - Description
- - Steps to reproduce
- - Versions
+ - Description
+ - Steps to reproduce
+ - Versions
- content:
- - Is your feature request related to a problem
- - Describe the solution you'd like
- - Describe alternatives you've considered
- - Additional context
+ - Is your feature request related to a problem
+ - Describe the solution you'd like
+ - Describe alternatives you've considered
+ - Additional context
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000000..1dab4ed4c3
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+save-exact = true
diff --git a/.travis.yml b/.travis.yml
index 44220cdc66..0927cd37d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,9 @@ node_js:
- 'node'
- 'lts/*'
+services:
+ - xvfb
+
script:
- node ./internals/scripts/generate-templates-for-linting
- npm test -- --maxWorkers=4
@@ -12,7 +15,6 @@ script:
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
notifications:
email:
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 2ba83bd35e..4c0d842992 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-* The use of sexualized language or imagery and unwelcome sexual attention or
+- The use of sexualized language or imagery and unwelcome sexual attention or
advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic
address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
+- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f9d89b33f9..99b3d677ca 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -35,6 +35,7 @@ experience the problem? What would you expect to be the outcome? All these detai
Example:
> ## Description
+>
> A clear and concise description of what the bug is.
>
> Any other information you want to share that is relevant to the issue being
@@ -43,6 +44,7 @@ Example:
> merits).
>
> ## Steps to reproduce
+>
> Steps to reproduce the behavior:
>
> 1. This is the first step
diff --git a/Changelog.md b/Changelog.md
index 8f342b8bd9..71f4782c1c 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -54,7 +54,7 @@ We hope you enjoy this release and welcome any feedback, bug reports or feature
- Fix setup script for Windows environments (**@mensae**)
- Generate passing tests for components/containers (**@mjhost**)
- Rewrite generators code (**@mensae**)
-- Complete rewrite or `generate-templates-for-linting.js` (**@mensae**)
+- Complete rewrite of `generate-templates-for-linting.js` (**@mensae**)
- `webpack.DefinePlugin` => `webpack.EnvironmentPlugin` (**@nshimiye**)
- New Webpack code splitting config (**@julienben**)
- Remove `process.noDeprecation = true` (**@spawnia**)
diff --git a/README.md b/README.md
index 0907904fdf..ee091fbd4a 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ But wait... there's more!
- _Catch problems:_ AppVeyor and TravisCI setups included by default, so your
tests get run automatically on Windows and Unix.
-There’s also a fantastic video on how to structure your React.js apps with scalability in mind. It provides rationale for the majority of boilerplate's design decisions.
+There’s also a fantastic video on how to structure your React apps with scalability in mind. It provides rationale for the majority of boilerplate's design decisions.
Keywords: React.js, Redux, Hot Reloading, ESNext, Babel, react-router, Offline First, ServiceWorker, `styled-components`, redux-saga, FontFaceObserver
@@ -122,9 +122,18 @@ Now you're ready to rumble!
asynchronicity helpers, etc.
- [**Troubleshooting**](docs/general/gotchas.md): Solutions to common problems faced by developers.
+## Ongoing Work
+
+In between [releases](https://github.com/react-boilerplate/react-boilerplate/releases), we work on the `dev` branch and rarely ever update `master`. For that reason, it sometimes look like the repo isn't actively maintained. This isn't the case, React Boilerplate is alive and kicking.
+
+Please feel free to check out:
+
+- our [`dev` branch](https://github.com/react-boilerplate/react-boilerplate/tree/dev) for the latest updates. You are always welcome to use it as the basis for your project. We only merge to `dev` projects which are fully ready.
+- our open [issues](https://github.com/react-boilerplate/react-boilerplate/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and [pull requests](https://github.com/react-boilerplate/react-boilerplate/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) to see what we are currently working on. Suggestions and contributions are always welcome!
+
## Contributors
-Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
+Thanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -134,7 +143,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
-
## Supporters
This project would not be possible without the support of these amazing folks. [**Become a sponsor**](https://opencollective.com/react-boilerplate) to get your company in front of thousands of engaged react developers and help us out!
diff --git a/app/.nginx.conf b/app/.nginx.conf
index 6a71831151..c32facaaaf 100644
--- a/app/.nginx.conf
+++ b/app/.nginx.conf
@@ -73,11 +73,11 @@ server {
# To let nginx use its own DNS Resolver
# resolver ;
+# Set path
+ root /var/www/;
# Always serve index.html for any request
location / {
- # Set path
- root /var/www/;
try_files $uri /index.html;
}
diff --git a/app/app.js b/app/app.js
index 4c96195a3a..846ea655ce 100644
--- a/app/app.js
+++ b/app/app.js
@@ -5,12 +5,12 @@
* code.
*/
-// Needed for redux-saga es6 generator support
-import '@babel/polyfill';
+import 'react-app-polyfill/ie11';
+import 'react-app-polyfill/stable';
-// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
+import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'connected-react-router';
import FontFaceObserver from 'fontfaceobserver';
@@ -25,8 +25,9 @@ import LanguageProvider from 'containers/LanguageProvider';
// Load the favicon and the .htaccess file
import '!file-loader?name=[name].[ext]!./images/favicon.ico';
-import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions
+import 'file-loader?name=.htaccess!./.htaccess';
+import { HelmetProvider } from 'react-helmet-async';
import configureStore from './configureStore';
// Import i18n messages
@@ -46,24 +47,31 @@ const initialState = {};
const store = configureStore(initialState, history);
const MOUNT_NODE = document.getElementById('app');
-const render = messages => {
- ReactDOM.render(
-
-
-
+const ConnectedApp = props => (
+
+
+
+
-
-
- ,
- MOUNT_NODE,
- );
+
+
+
+
+);
+
+ConnectedApp.propTypes = {
+ messages: PropTypes.object,
+};
+
+const render = messages => {
+ ReactDOM.render(, MOUNT_NODE);
};
if (module.hot) {
- // Hot reloadable React components and translation json files
+ // Hot reloadable translation json files
// modules.hot.accept does not accept dynamic dependencies,
// have to be constants at compile-time
- module.hot.accept(['./i18n', 'containers/App'], () => {
+ module.hot.accept(['./i18n'], () => {
ReactDOM.unmountComponentAtNode(MOUNT_NODE);
render(translationMessages);
});
diff --git a/app/components/A/tests/index.test.js b/app/components/A/tests/index.test.js
index cb4c7beaa6..2a4e2129c9 100644
--- a/app/components/A/tests/index.test.js
+++ b/app/components/A/tests/index.test.js
@@ -3,50 +3,53 @@
*/
import React from 'react';
-import { render } from 'react-testing-library';
+import { render } from '@testing-library/react';
import A from '../index';
const href = 'http://mxstbr.com/';
const children =