首页 > 解决方案 > 在导入下移动类型声明的 Lint 规则

问题描述

是否有一个 lint 规则(eslint,prettier)用于在反应组件文件(和/或其他文件)中构建/排序内容,如下所示:

Import React from "react";
Other imports ...

Interface SomeInterface = someinterfaceconfig

function Component = () => {

}

export default Component;

所以:

  1. 进口
  2. 接口、类型、枚举...
  3. 常量/函数
  4. 出口

标签: reactjstypescripteslintprettier

解决方案


推荐阅读