Skip to content

Commit

Permalink
Merge pull request #757 from ckpaliwal/fix-lint
Browse files Browse the repository at this point in the history
update lint rule
  • Loading branch information
ckpaliwal authored Jun 24, 2024
2 parents 4c5a279 + 24ae239 commit 3afbbfb
Show file tree
Hide file tree
Showing 23 changed files with 61 additions and 64 deletions.
5 changes: 1 addition & 4 deletions packages/apollo/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default [
},
},
"rules": {
"react/jsx-max-props-per-line": [1, { "maximum": 1 }],
"react/jsx-closing-bracket-location": [1, "line-aligned"],
"array-bracket-spacing": 0,
"space-before-function-paren": 0,
Expand Down Expand Up @@ -76,9 +75,8 @@ export default [
}
],
"max-depth": [1, 8],
"max-len": [1, 200],
"max-len": [1, 300],
"max-params": [1, 7],
"new-cap": 1,
"no-bitwise": 1,
"no-console": "off",
"no-multi-spaces": 1,
Expand All @@ -96,7 +94,6 @@ export default [
"no-var": 1,
"object-curly-spacing": [1, "always"],
"prefer-const": 0,
"quotes": [1, "single"],
"require-atomic-updates": 0,
"semi": [0, "always"],
"space-before-blocks": 1,
Expand Down
20 changes: 10 additions & 10 deletions packages/apollo/src/components/Access/Access.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,11 +784,11 @@ export function AuthenticatedUsers(props) {
addItems={
props.isManager
? [
{
text: 'add_new_users',
fn: props.onAdd,
},
]
{
text: 'add_new_users',
fn: props.onAdd,
},
]
: []
}
selectItem={
Expand Down Expand Up @@ -894,11 +894,11 @@ export function ApiKeys(props) {
addItems={
props.isManager
? [
{
text: 'add_new_apikey',
fn: props.onAdd,
},
]
{
text: 'add_new_apikey',
fn: props.onAdd,
},
]
: []
}
selectItem={
Expand Down
14 changes: 7 additions & 7 deletions packages/apollo/src/components/CADetails/CADetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,14 +633,14 @@ export class CADetails extends Component {
this.props.details.isUpgradeAvailable &&
this.props.details.location === 'ibm_saas' &&
ActionsHelper.canCreateComponent(this.props.userInfo, this.props.feature_flags) ? (
<div className="ibp-details-patch-container">
<div className="ibp-patch-available-tag ibp-node-details" onClick={() => this.openCASettings('upgrade')}>
{translate('patch_available')}
<div className="ibp-details-patch-container">
<div className="ibp-patch-available-tag ibp-node-details" onClick={() => this.openCASettings('upgrade')}>
{translate('patch_available')}
</div>
</div>
</div>
) : (
''
)}
) : (
''
)}
</Tab>
)}
</TabList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1254,16 +1254,13 @@ class ChannelDetails extends Component {
<div className="ibp__channel--container">
<Tabs aria-label="Tabs">
<TabList contained>
<Tab id="ibp-channel-detail-chaincode"
>
<Tab id="ibp-channel-detail-chaincode">
{translate('chaincode_management')}
</Tab>
<Tab id="ibp-channel-detail-tab-overview"
>
<Tab id="ibp-channel-detail-tab-overview">
{translate('transaction_overview')}
</Tab>
<Tab id="ibp-channel-detail-tab-detail"
>
<Tab id="ibp-channel-detail-tab-detail">
{translate('channel_details')}
</Tab>
</TabList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {TrashCan} from '@carbon/icons-react';
import { TrashCan } from '@carbon/icons-react';
import { Button, Checkbox } from "@carbon/react";
import _ from 'lodash';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -180,7 +180,7 @@ export class OrdererOrganizations extends Component {
) : [];

return (
<div className="ibp-channel-organizations">
<div className="ibp-channel-organizations">
<p className="ibp-channel-section-title">{translate('channel_orderer_organizations')}</p>
<p className="ibp-channel-section-desc">
{isChannelUpdate ? translate('update_channel_organization_desc') : translate('create_channel_orderer_org_desc')}
Expand Down Expand Up @@ -246,7 +246,7 @@ export class OrdererOrganizations extends Component {
{ordering_orgs &&
ordering_orgs.map((org, i) => {
return (
<div key={'org_' + i}
<div key={'org_' + i}
className="ibp-add-orgs-table"
>
<div className="ibp-add-orgs-msp">
Expand Down Expand Up @@ -291,7 +291,7 @@ export class OrdererOrganizations extends Component {
}}
/>
</div>
);
);
})}
{missingDefinitionError && (
<div className="ibp-missing-definition-error">
Expand All @@ -302,7 +302,7 @@ export class OrdererOrganizations extends Component {
)}
</div>
</div>
);
);
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/apollo/src/components/ChipInput.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-len */
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ class GenerateMSPModal extends Component {
error: error.title
? error
: {
title: 'error_add_identity',
details: error.details ? error.details : error,
},
title: 'error_add_identity',
details: error.details ? error.details : error,
},
loadingCert: false,
});
});
Expand Down Expand Up @@ -959,11 +959,11 @@ class GenerateMSPModal extends Component {
} else {
const generatedCertAdmin = this.props.generatedCert.certificate
? [
{
cert: this.props.generatedCert.certificate,
isReadOnly: true,
},
]
{
cert: this.props.generatedCert.certificate,
isReadOnly: true,
},
]
: [];
this.props.updateState(SCOPE, {
identityType: 'new',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Add, Upload} from '@carbon/icons-react';
import { Add, Upload } from '@carbon/icons-react';
import { Checkbox, RadioTile, TileGroup } from "@carbon/react";
import _ from 'lodash';
import PropTypes from 'prop-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Add, Upload} from '@carbon/icons-react';
import { Add, Upload } from '@carbon/icons-react';
import { Checkbox, Loading, RadioTile, TileGroup, Toggle } from "@carbon/react";
import _ from 'lodash';
import PropTypes from 'prop-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Add, Upload} from '@carbon/icons-react';
import { Add, Upload } from '@carbon/icons-react';
import { Checkbox, RadioTile, TileGroup } from "@carbon/react";
import _ from 'lodash';
import PropTypes from 'prop-types';
Expand Down
3 changes: 2 additions & 1 deletion packages/apollo/src/components/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ export class Login extends Component {
event.preventDefault();
onSubmit(event);
}
}}>
}}
>
<div className={`ibp-login-content ${this.props.changePassword ? 'ibp-change-password' : 'ibp-user-login'} `}>
<p className="ibp-login-content-title ibm-type-light">
{translate(this.props.changePassword ? 'change_your_password' : 'product_label_login')}
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo/src/components/PageContainer/PageContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ const PageContainer = props => {
};


{/* <div id="main-content"
{ /* <div id="main-content"
className="ibp-page-container cds--grid"
data-floating-menu-container
>
{props.children}
</div> */}
</div> */ }

PageContainer.propTypes = {
children: PropTypes.node,
Expand Down
10 changes: 5 additions & 5 deletions packages/apollo/src/components/PeerDetails/PeerDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,12 @@ class PeerDetails extends Component {
{details.isUpgradeAvailable &&
details.location === 'ibm_saas' &&
ActionsHelper.canCreateComponent(this.props.userInfo, this.props.feature_flags) ? (
<div className="ibp-details-patch-container">
<div className="ibp-patch-available-tag ibp-node-details" onClick={() => this.openPeerSettings('upgrade')}>
{translate('patch_available')}
<div className="ibp-details-patch-container">
<div className="ibp-patch-available-tag ibp-node-details" onClick={() => this.openPeerSettings('upgrade')}>
{translate('patch_available')}
</div>
</div>
</div>
) : null}
) : null}
</Tab>
</TabList>
<TabPanels>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,10 +982,10 @@ class ProposeChaincodeModal extends React.Component {
</>
)}
<Trans>{this.props.t('this_proposal')}
{/* , { */}
{/* , { */}
{/* org: this.props.propose_org ? <span className="ibp-highlight-msp">{this.props.propose_org.msp_id}</span> : null, */}
{/* })} */}
{this.props.propose_org ? <span className="ibp-highlight-msp">{this.props.propose_org.msp_id}</span>: null}
{/* })} */}
{this.props.propose_org ? <span className="ibp-highlight-msp">{this.props.propose_org.msp_id}</span>: null}
</Trans>
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable react/prop-types */

// /* eslint-disable react/prop-types */

/**
* this file is used to return a mock implementation of the SidePanel component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import {Close} from '@carbon/icons-react';
import { Close } from '@carbon/icons-react';

const SidePanelInlineConfirmation = props => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class SignatureDetailModal extends React.Component {
name: orderer.msp_id,
type: 'dropdown',
options: orderer.identities || this.props.identities,
label: RenderParamHTML(translate, 'signature_for_msp',{
label: RenderParamHTML(translate, 'signature_for_msp', {
msp: (
<CodeSnippet
type="inline"
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo/src/components/Timeline/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { withTranslation } from 'react-i18next';
import TimelineCancelButton from '../TimelineCancelButton/TimelineCancelButton';
import {CheckmarkOutline} from '@carbon/icons-react';
import { CheckmarkOutline } from '@carbon/icons-react';

const Timeline = ({ steps, onClose, selectedTimelineStep, header, estTime, progressWithChecks, t: translate }) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo/src/hoc/withRouter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const withRouter = (Component) => {
const navigate = useNavigate();
const history = {
push: (to, options) => {
if(!to.includes("undefined")) {
if (!to.includes("undefined")) {
navigate(to, options)
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo/src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
// This link also includes instructions on opting out of this behavior.
/* eslint-disable no-console, no-param-reassign */
/* eslint-disable no-undef */
// /* eslint-disable no-console, no-param-reassign */
// /* eslint-disable no-undef */

const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo/src/rest/PeerRestApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class PeerRestApi {
if (!_.get(exportedPeer, 'msp.tlsca.root_certs')) {
_.set(exportedPeer, 'msp.tlsca.root_certs', [some_peer_record.tls_ca_root_cert || some_peer_record.pem]);
}
if(some_peer_record.node_ou) {
if (some_peer_record.node_ou) {
exportedPeer.node_ou = some_peer_record.node_ou;
}
return NodeRestApi.importComponent(exportedPeer);
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo/src/utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const Helper = {
tls_ca_root_cert: _.get(node, 'msp.tlsca.root_certs[0]'),
};

if(node.node_ou) {
if (node.node_ou) {
exportNode.node_ou = node.node_ou;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/athena/public/releaseNotes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"version": "1.0.9-20",
"version": "1.0.9-21",
"date": "04 July 2024",
"description": [
{
Expand Down

0 comments on commit 3afbbfb

Please sign in to comment.