dappros/ethora

View on GitHub
client-reactnative/src/Screens/Account/CoinPurchaseScreen.tsx

Summary

Maintainability
A
2 hrs
Test Coverage

Function CoinPurchaseScreen has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const CoinPurchaseScreen: React.FC<ICoinPurchaseScreen> = ({}) => {
  const {loginStore, walletStore} = useStores();
  const {
    connected,

Severity: Major
Found in client-reactnative/src/Screens/Account/CoinPurchaseScreen.tsx - About 2 hrs to fix

Expected property shorthand in object literal ('{transaction}').
Open

          transaction: transaction,

Rule: object-literal-shorthand

Enforces/disallows use of ES6 object literal shorthand.

Notes
  • Has Fix

Config

"always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

Examples
"object-literal-shorthand": true
"object-literal-shorthand": true,never
"object-literal-shorthand": true,[object Object]
Schema
{
  "oneOf": [
    {
      "type": "string",
      "enum": [
        "never"
      ]
    },
    {
      "type": "object",
      "properties": {
        "property": {
          "type": "string",
          "enum": [
            "never"
          ]
        },
        "method": {
          "type": "string",
          "enum": [
            "never"
          ]
        }
      },
      "minProperties": 1,
      "maxProperties": 2
    }
  ]
}

For more information see this page.

An empty interface is equivalent to {}.
Open

export interface ICoinPurchaseScreen {}

Rule: no-empty-interface

Forbids empty interfaces.

Rationale

An empty interface is equivalent to its supertype (or {}).

Notes
  • TypeScript Only

Config

Not configurable.

For more information see this page.

There are no issues that match your filters.

Category
Status