Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ module.exports = {
'templateStrings': true,
},
},
"settings": {
"react": {
"version": "16.3",
},
"propWrapperFunctions": ["forbidExtraProps"]
},
'plugins': ['react', 'class-property', 'babel', 'prettier'],
'rules': {
'arrow-body-style': 'off',
Expand Down Expand Up @@ -58,7 +64,7 @@ module.exports = {
'max-depth': ['warn', 4],
'max-len': ['error', 120],
'max-nested-callbacks': ['warn', 2],
'max-params': ['warn', 4],
'max-params': ['warn', 5],
'max-statements': ['off', 10],
'new-cap': 'error',
'new-parens': 'error',
Expand Down
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
This changelog references the relevant changes done between versions.

To get the diff for a specific change, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/compare/v0.4.0...v0.5.0
To get the diff between two versions, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/compare/v0.7.0...v0.8.0

- 0.9.0 (future release)
- Upgraded all dependencies removing alpha and beta versions.
- 0.8.0
- React new Context API is now used to manage state
- Decoupled from `react-intl` and `react-redux`
- Added React component testing using `react-testing-library`
- React new Context API is now used to manage state.
- Decoupled from `react-intl` and `react-redux`.
- [BC BREAK] Removed bridges for redux, browser, in-memory and local storage.
- [BC BREAK] Removed support for React and ReactDOM < 16.3 (Context API is not supported in those versions)
- [BC BREAK] Removed support for React and ReactDOM < 16.3 (Context API is not supported in those versions).
- Added React component testing using `react-testing-library`.
- Increased test code coverage.
- 0.7.0
- Added support for using an string-array as the path property as `react-router` does.
- 0.6.0
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,29 +99,29 @@
}
},
"dependencies": {
"@babel/preset-env": "^7.0.0-beta.49",
"@babel/preset-react": "^7.0.0-beta.49",
"babel-preset-minify": "^0.5.0-alpha.a28b6b00"
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"babel-preset-minify": "^0.5.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.49",
"@babel/core": "^7.0.0-beta.51",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.49",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.49",
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.49",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"babel-core": "^7.0.0-0",
"babel-eslint": "^8.2.3",
"babel-jest": "^23.0.1",
"eslint": "^4.19.1",
"eslint-plugin-babel": "^5.1.0",
"babel-eslint": "^8.2.6",
"babel-jest": "^23.6.0",
"eslint": "^5.11.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-class-property": "^1.1.0",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.9.1",
"jest": "^23.1.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.0",
"jest": "^23.6.0",
"mkdirp": "^0.5.1",
"npm-install-peers": "^1.2.1",
"prettier": "^1.10.2",
"react-testing-library": "^5.3.2",
"prettier": "^1.15.3",
"react-testing-library": "^5.4.2",
"regenerator-runtime": "^0.11.1",
"rimraf": "^2.6.2"
},
Expand Down
6 changes: 2 additions & 4 deletions src/renderTranslatedRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import flatMap from 'lodash.flatmap';

// eslint-disable-next-line max-params
const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale) => {
const {paths, ...configRouteRest} = configRoute;

Expand All @@ -21,7 +20,7 @@ const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPath
getRouteConfigForLocale = (configRoute, currentLocale, pathFromRouteForPathsAndLocale) => locale =>
getRouteConfig(configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale);

// eslint-disable-next-line max-params
/* eslint-disable max-params */
const renderTranslatedRoutesForLocales = (
configRoute,
routes,
Expand All @@ -45,7 +44,6 @@ const renderTranslatedRoutesForLocales = (
);
}),
),
// eslint-disable-next-line max-params
renderTranslatedRoutesForConfig = (
configRoute,
routes,
Expand All @@ -61,8 +59,8 @@ const renderTranslatedRoutesForLocales = (
pathFromRouteForPathsAndLocale,
getRouteConfigForCurrentLocale,
);
/* eslint-enable max-params */

// eslint-disable-next-line max-params
const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale) => currentLocale => (
config,
iterationLocale,
Expand Down