Skip to content

Commit

Permalink
thisyahlen/chore: add error to all the sort in ESLint (deriv-com#10695)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisyahlen-deriv authored Oct 16, 2023
1 parent 29ee48f commit 7069713
Show file tree
Hide file tree
Showing 17 changed files with 202 additions and 210 deletions.
26 changes: 13 additions & 13 deletions packages/wallets/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ module.exports = {
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/no-extraneous-dependencies': ['off', { devDependencies: ['**/*.spec.*', '**/*.test.*', '**/*.d.ts*'] }],
'lines-around-comment': ['error', { allowObjectStart: true }],
'local-rules/no-react-namespace': 'error',
'no-unneeded-ternary': 'error',
'no-useless-return': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-sort-props': 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': [
'error',
{
Expand Down Expand Up @@ -50,18 +59,9 @@ module.exports = {
],
},
],
'lines-around-comment': ['error', { allowObjectStart: true }],
'local-rules/no-react-namespace': 'error',
'no-unneeded-ternary': 'error',
'no-useless-return': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-sort-props': 'warn',
'simple-import-sort/exports': 'error',
'sort-destructure-keys/sort-destructure-keys': 'warn',
'sort-keys': 'warn',
'typescript-sort-keys/interface': 'warn',
'typescript-sort-keys/string-enum': 'warn',
'sort-destructure-keys/sort-destructure-keys': 'error',
'sort-keys': 'error',
'typescript-sort-keys/interface': 'error',
'typescript-sort-keys/string-enum': 'error',
},
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import './JurisdictionCardRow.scss';

type TJurisdictionCardRowProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import './JurisdictionCardTag.scss';

type TJurisdictionCardTagProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const JurisdictionModal = () => {
() =>
data?.filter(account => account.market_type === modalState?.marketType).map(account => account.shortcode) ||
[],
[isLoading]
[data, modalState?.marketType]
);

if (isLoading) return <h1>Loading...</h1>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
import { TJurisdictionCardItems } from './props.types';

export const getJurisdictionBviContents = (): TJurisdictionCardItems => ({
isOverHeaderAvailable: false,
header: 'British Virgin Islands',
contents: {
synthetic: [
financial: [
{
description: 'Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies',
key: 'assets',
title: 'Assets',
description: 'Synthetics, Baskets and Derived FX',
titleIndicators: {
displayText: '170+',
displayTextSkinColor: 'red-light',
type: 'displayText',
displayText: '40+',
displayTextSkinColor: 'red-darker',
},
},
{
clickableDescription: [
{
text: 'Dynamic Leverage', // onClick: toggleDynamicLeverage,
type: 'link',
},
],
key: 'leverage',
title: 'Leverage',
titleIndicators: {
type: 'displayText',
displayText: '1:1000',
displayTextSkinColor: 'yellow-light',
type: 'displayText',
},
},
{
key: 'verifications',
title: 'Verifications',
key: 'spreadsFrom',
title: 'Spreads from',
titleIndicators: {
type: 'displayIcons',
displayText: '0.5 pips',
displayTextSkinColor: 'violet-dark',
type: 'displayText',
},
},
{
clickableDescription: [
{
type: 'link',
text: 'Learn more',
type: 'link',
},
{
type: 'text',
text: 'about verifications needed.',
type: 'text',
},
],
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
},
},
{
description: 'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)',
key: 'regulator',
title: 'Regulator/EDR',
description: 'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)',
},
],
financial: [
synthetic: [
{
description: 'Synthetics, Baskets and Derived FX',
key: 'assets',
title: 'Assets',
description: 'Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies',
titleIndicators: {
displayText: '40+',
displayTextSkinColor: 'red-darker',
type: 'displayText',
displayText: '170+',
displayTextSkinColor: 'red-light',
},
},
{
key: 'leverage',
title: 'Leverage',
titleIndicators: {
type: 'displayText',
displayText: '1:1000',
displayTextSkinColor: 'yellow-light',
},
clickableDescription: [
{
type: 'link',
text: 'Dynamic Leverage', // onClick: toggleDynamicLeverage,
},
],
},
{
key: 'spreadsFrom',
title: 'Spreads from',
titleIndicators: {
type: 'displayText',
displayText: '0.5 pips',
displayTextSkinColor: 'violet-dark',
},
},
{
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
},
clickableDescription: [
{
type: 'link',
text: 'Learn more',
type: 'link',
},
{
type: 'text',
text: 'about verifications needed.',
type: 'text',
},
],
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
},
},
{
description: 'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)',
key: 'regulator',
title: 'Regulator/EDR',
description: 'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)',
},
],
},
header: 'British Virgin Islands',
isOverHeaderAvailable: false,
verificationDocs: {
synthetic: ['documentNumber', 'nameAndAddress'],
financial: ['documentNumber', 'nameAndAddress'],
synthetic: ['documentNumber', 'nameAndAddress'],
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export type TJurisdictionContent = {
};

export const getJurisdictionContents = (): Record<string, TJurisdictionCardItems> => ({
svg: getJurisdictionSvgContents(),
bvi: getJurisdictionBviContents(),
vanuatu: getJurisdictionVanuatuContents(),
labuan: getJurisdictionLabuanContents(),
maltainvest: getJurisdictionMaltainvestContents(),
svg: getJurisdictionSvgContents(),
vanuatu: getJurisdictionVanuatuContents(),
});
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
import { TJurisdictionCardItems } from './props.types';

export const getJurisdictionLabuanContents = (): TJurisdictionCardItems => ({
overHeader: 'Straight-through processing',
isOverHeaderAvailable: true,
header: 'Labuan',
contents: {
synthetic: [
financial: [
{
description: 'Forex and Cryptocurrencies',
key: 'assets',
title: 'Assets',
description: 'Forex and Cryptocurrencies',
titleIndicators: {
displayText: '80+',
displayTextSkinColor: 'red-dark',
type: 'displayText',
},
},
{
key: 'leverage',
title: 'Leverage',
titleIndicators: {
displayText: '1:100',
displayTextSkinColor: 'yellow-dark',
type: 'displayText',
},
},
{
key: 'spreadsFrom',
title: 'Spreads from',
},
{
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
displayText: '0.6 pips',
displayTextSkinColor: 'violet-dark',
type: 'displayText',
},
},
{
clickableDescription: [
{
type: 'link',
text: 'Learn more',
type: 'link',
},
{
type: 'text',
text: 'about verifications needed.',
type: 'text',
},
],
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
},
},
{
description: 'Labuan Financial Services Authority (licence no. MB/18/0024)',
key: 'regulator',
title: 'Regulator/EDR',
description: 'Labuan Financial Services Authority (licence no. MB/18/0024)',
},
],
financial: [
synthetic: [
{
description: 'Forex and Cryptocurrencies',
key: 'assets',
title: 'Assets',
description: 'Forex and Cryptocurrencies',
titleIndicators: {
type: 'displayText',
displayText: '80+',
displayTextSkinColor: 'red-dark',
},
},
{
key: 'leverage',
title: 'Leverage',
titleIndicators: {
type: 'displayText',
displayText: '1:100',
displayTextSkinColor: 'yellow-dark',
},
},
{
key: 'spreadsFrom',
title: 'Spreads from',
titleIndicators: {
type: 'displayText',
displayText: '0.6 pips',
displayTextSkinColor: 'violet-dark',
},
},
{
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
},
clickableDescription: [
{
type: 'link',
text: 'Learn more',
type: 'link',
},
{
type: 'text',
text: 'about verifications needed.',
type: 'text',
},
],
key: 'verifications',
title: 'Verifications',
titleIndicators: {
type: 'displayIcons',
},
},
{
description: 'Labuan Financial Services Authority (licence no. MB/18/0024)',
key: 'regulator',
title: 'Regulator/EDR',
description: 'Labuan Financial Services Authority (licence no. MB/18/0024)',
},
],
},
header: 'Labuan',
isOverHeaderAvailable: true,
overHeader: 'Straight-through processing',
verificationDocs: {
synthetic: ['documentNumber', 'nameAndAddress'],
financial: ['documentNumber', 'nameAndAddress'],
synthetic: ['documentNumber', 'nameAndAddress'],
},
});
Loading

0 comments on commit 7069713

Please sign in to comment.