Skip to content
Snippets Groups Projects
  • Kamil Mielnik's avatar
    2aa3cec6
    RFC 70 - Automate sorting imports (#33883) · 2aa3cec6
    Kamil Mielnik authored
    * Upgrade eslint-plugin-import
    
    * Configure import/order rule for consistent, predictable imports
    
    * Change "eslint-disable-next-line no-restricted-imports" into "eslint-disable-line"
    
    * Ensure imports are in a single block
    
    * Move or remove informative comments between import statements
    
    * Remove imports-grouping comments
    
    * Configure groups
    - the difference between the default setting is the presence of "internal" group
    
    * Manually fix imports order and disable "import/order" rule in files with possible circular dependencies
    
    * Move comment to the same line as import
    
    * Run "yarn eslint-fix" 5 times
    - Remaining: 16 problems (16 errors, 0 warnings)
    
    * Manually fix imports order in remaining files
    
    * Run "yarn prettier"
    
    * Fix import
    
    * Fix circular dependency
    
    * Fix circular dependency
    
    * Remove unused action creator (it was inlined in 702988ec3f8bd4c6bf6bbbdf169dca25a0ca5a13 due to circular dependency)
    
    * Re-add accidentally removed code
    
    * Fix typing
    
    * ESLint
    RFC 70 - Automate sorting imports (#33883)
    Kamil Mielnik authored
    * Upgrade eslint-plugin-import
    
    * Configure import/order rule for consistent, predictable imports
    
    * Change "eslint-disable-next-line no-restricted-imports" into "eslint-disable-line"
    
    * Ensure imports are in a single block
    
    * Move or remove informative comments between import statements
    
    * Remove imports-grouping comments
    
    * Configure groups
    - the difference between the default setting is the presence of "internal" group
    
    * Manually fix imports order and disable "import/order" rule in files with possible circular dependencies
    
    * Move comment to the same line as import
    
    * Run "yarn eslint-fix" 5 times
    - Remaining: 16 problems (16 errors, 0 warnings)
    
    * Manually fix imports order in remaining files
    
    * Run "yarn prettier"
    
    * Fix import
    
    * Fix circular dependency
    
    * Fix circular dependency
    
    * Remove unused action creator (it was inlined in 702988ec3f8bd4c6bf6bbbdf169dca25a0ca5a13 due to circular dependency)
    
    * Re-add accidentally removed code
    
    * Fix typing
    
    * ESLint
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
mode.js 483 B
import { push } from "react-router-redux";
import { t } from "ttag";

const CARD_ID_ROW_IDX = 0;

const ErrorDrill = ({ clicked }) => {
  if (!clicked) {
    return [];
  }

  const cardId = clicked.origin.row[CARD_ID_ROW_IDX];

  return [
    {
      name: "detail",
      title: t`View this`,
      default: true,
      action() {
        return push(`/admin/tools/errors/${cardId}`);
      },
    },
  ];
};

export const ErrorMode = {
  name: "error",
  drills: [ErrorDrill],
};