fbredius/storybook

View on GitHub
lib/core-common/src/utils/resolve-path-in-sb-cache.ts

Summary

Maintainability
A
0 mins
Test Coverage

Use a conditional expression instead of assigning to 'cacheDirectory' in multiple places.
Open

  if (!projectDir) {

Rule: prefer-conditional-expression

Recommends to use a conditional expression instead of assigning to the same thing in each branch of an if statement.

Rationale

This reduces duplication and can eliminate an unnecessary variable declaration.

Config

If check-else-if is specified, the rule also checks nested if-else-if statements.

Examples
"prefer-conditional-expression": true
"prefer-conditional-expression": true,check-else-if
Schema
{
  "type": "string",
  "enum": [
    "check-else-if"
  ]
}

For more information see this page.

There are no issues that match your filters.

Category
Status