Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing regression issues caused by version bumps #6626

Merged
merged 1 commit into from
Jul 3, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module.exports = {
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
modules: true,
},
modules: true
}
},
env: {
browser: true,
Expand All @@ -31,7 +31,7 @@ module.exports = {
jest: true,
node: true
},
extends: ['airbnb','plugin:jest/recommended'],
extends: ['airbnb', 'plugin:jest/recommended'],
rules: {
'max-len': ['error', { code: 120, tabWidth: 4 }],
'require-jsdoc': [
Expand All @@ -40,24 +40,24 @@ module.exports = {
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
},
},
ClassDeclaration: true
}
}
],
'valid-jsdoc': [
'warn',
{
requireReturn: false,
},
requireReturn: false
}
],
indent: ['error', 4, { SwitchCase: 1 }],
'import/no-extraneous-dependencies': [
'off',
{
devDependencies: false,
optionalDependencies: false,
peerDependencies: false,
},
peerDependencies: false
}
],
'import/no-unresolved': ['off'],
'import/extensions': ['off'],
Expand All @@ -66,8 +66,8 @@ module.exports = {
'no-underscore-dangle': [
'error',
{
allowAfterThis: true,
},
allowAfterThis: true
}
],
'no-restricted-syntax': ['off'],
'no-plusplus': ['off'],
Expand All @@ -84,7 +84,7 @@ module.exports = {
'no-mixed-operators': ['error'],
'jsx-quotes': ['error', 'prefer-single'],
'no-else-return': 'off',
'no-unused-vars': ['error'],
'no-unused-vars': ['error']
},
plugins: ['react','jest'],
plugins: ['react', 'jest']
};

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wso2_apim_publisher",
"version": "3.0.0",
"description": "WSO2 API Manager Publisher Web App",
"description": "WSO2 API Manager Publisher Web App Note: `eslint-plugin-react` have a fixed version due to implementing prop-types does mark nested destructed props from `eslint-plugin-react` next version onwards",
"main": "app.jsx",
"scripts": {
"test": "jest",
Expand Down Expand Up @@ -70,7 +70,7 @@
"@babel/preset-env": "^7.4.4",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.4.4",
"@stoplight/prism-http": "^3.0.0-alpha.15",
"@stoplight/prism-http": "^3.0.0-beta.3",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
Expand All @@ -84,7 +84,7 @@
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jest": "^22.6.4",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"eslint-plugin-react": "v7.13.0",
"jest": "^24.8.0",
"jest-puppeteer": "^4.2.0",
"less": "^2.7.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Swagger-parser library(https://apidevtools.org/swagger-parser/) is used for parsing the swagger YAML file
* Prism-HTTP module is used for generating the mock data from the swagger definition
*/
import { generateStatic } from '@stoplight/prism-http/lib/mocker/generator/JSONSchema';
import { generateStatic } from '@stoplight/prism-http/dist/mocker/generator/JSONSchema';
import SwaggerParser from 'swagger-parser';
import path from 'path';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function ApiCreate(props) {
}

ApiCreate.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({ content: PropTypes.string }).isRequired,
};

export default withStyles(styles)(ApiCreate);
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,12 @@ Details.subPaths = {
Object.freeze(Details.paths);

Details.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
LeftMenu: PropTypes.string,
content: PropTypes.string,
leftLInkMain: PropTypes.string,
contentInside: PropTypes.string,
}).isRequired,
match: PropTypes.shape({
params: PropTypes.object,
}).isRequired,
Expand All @@ -443,7 +448,11 @@ Details.propTypes = {
history: PropTypes.shape({
push: PropTypes.object,
}).isRequired,
theme: PropTypes.shape({}).isRequired,
theme: PropTypes.shape({
custom: PropTypes.shape({
leftMenuIconMainSize: PropTypes.number,
}),
}).isRequired,
};

export default withStyles(styles, { withTheme: true })(Details);
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ Listing.propTypes = {
location: PropTypes.shape({
pathname: PropTypes.string,
}).isRequired,
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
content: PropTypes.string,
contentInside: PropTypes.string,
}).isRequired,
theme: PropTypes.shape({
custom: PropTypes.string,
}).isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ class Avatar extends Component {
}
}
Avatar.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
userLink: PropTypes.string,
profileMenu: PropTypes.string,
accountIcon: PropTypes.string,
}).isRequired,
user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,
toggleTheme: PropTypes.func.isRequired,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,18 @@ Header.defaultProps = {
};

Header.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
appBar: PropTypes.string,
menuIcon: PropTypes.string,
toolbar: PropTypes.string,
}).isRequired,
avatar: PropTypes.element,
theme: PropTypes.shape({}).isRequired,
theme: PropTypes.shape({
custom: PropTypes.shape({
logo: PropTypes.string,
title: PropTypes.string,
}),
}).isRequired,
};

export default withStyles(styles, { withTheme: true })(Header);
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,20 @@ const GlobalNavBar = (props) => {
GlobalNavBar.propTypes = {
open: PropTypes.bool.isRequired,
toggleGlobalNavBar: PropTypes.func.isRequired,
classes: PropTypes.shape({}).isRequired,
theme: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
drawerStyles: PropTypes.string,
list: PropTypes.string,
listText: PropTypes.string,
}).isRequired,
theme: PropTypes.shape({
palette: PropTypes.shape({
getContrastText: PropTypes.func,
background: PropTypes.shape({
drawer: PropTypes.string,
leftMenu: PropTypes.string,
}),
}),
}).isRequired,
};

export default withStyles(styles, { withTheme: true })(GlobalNavBar);
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,20 @@ class AppErrorBoundary extends React.Component {

AppErrorBoundary.propTypes = {
children: PropTypes.node.isRequired,
classes: PropTypes.shape({}).isRequired,
theme: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
appBar: PropTypes.string,
toolbar: PropTypes.string,
errorDisplay: PropTypes.string,
errorDisplayContent: PropTypes.string,
errorTitle: PropTypes.string,
link: PropTypes.string,
}).isRequired,
theme: PropTypes.shape({
custom: PropTypes.shape({
logo: PropTypes.string,
title: PropTypes.string,
}),
}).isRequired,
};

export default withStyles(styles, { withTheme: true })(AppErrorBoundary);
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ class InlineMessage extends React.Component {
}

InlineMessage.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
root: PropTypes.string,
iconItem: PropTypes.string,
content: PropTypes.string,
}).isRequired,
height: PropTypes.number,
type: PropTypes.string,
children: PropTypes.shape({}).isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ InteractiveButton.propTypes = {
loading: PropTypes.bool,
success: PropTypes.bool,
children: PropTypes.node.isRequired,
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
buttonSuccess: PropTypes.string,
wrapper: PropTypes.string,
buttonProgress: PropTypes.string,
}).isRequired,
/**
* The color of the component. It supports those theme colors that make sense for this component.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,30 @@ function LeftMenuItem(props) {
);
}
LeftMenuItem.propTypes = {
classes: PropTypes.shape({}).isRequired,
theme: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
divider: PropTypes.string,
leftLInk: PropTypes.string,
leftLink_IconLeft: PropTypes.string,
noIcon: PropTypes.string,
leftLink_Icon: PropTypes.string,
leftLInkText: PropTypes.string,
leftLInkText_IconLeft: PropTypes.string,
leftLInkText_NoText: PropTypes.string,
}).isRequired,
theme: PropTypes.shape({
custom: PropTypes.shape({
leftMenu: PropTypes.string,
leftMenuIconSize: PropTypes.number,
}),
palette: PropTypes.shape({
getContrastText: PropTypes.func,
background: PropTypes.shape({
leftMenu: PropTypes.string,
appBar: PropTypes.string,
}),
leftMenu: PropTypes.string,
}),
}).isRequired,
Icon: PropTypes.element.isRequired,
text: PropTypes.string.isRequired,
handleMenuSelect: PropTypes.func.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ Message.iconTypes = {
};

Message.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
root: PropTypes.string,
close: PropTypes.string,

}).isRequired,
message: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
handleClose: PropTypes.func.isRequired,
type: PropTypes.string.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ function VerticalDivider(props) {
}

VerticalDivider.propTypes = {
classes: PropTypes.shape({}).isRequired,
classes: PropTypes.shape({
divider: PropTypes.string,
}).isRequired,
height: PropTypes.shape({}).isRequired,
marginLeft: PropTypes.shape({}).isRequired,
marginRight: PropTypes.shape({}).isRequired,
Expand Down