|
1 year ago | |
---|---|---|
.. | ||
__tests__ | ef563a270f fix: fixed resizable table with form threw error in dev #1506 (#1509) | 2 years ago |
src | ef563a270f fix: fixed resizable table with form threw error in dev #1506 (#1509) | 2 years ago |
.eslintrc.json | bcc3f1953a chore: add eslint-plugin-semi-design (#886) | 3 years ago |
README-zh_CN.md | ad07bf6d54 fix: datePicker triggerRender disabled bug #676 (#967) | 3 years ago |
README.md | ad07bf6d54 fix: datePicker triggerRender disabled bug #676 (#967) | 3 years ago |
package.json | 8c97448e5e v2.66.0 | 1 year ago |
tsconfig.json | bcc3f1953a chore: add eslint-plugin-semi-design (#886) | 3 years ago |
Semi 仓库使用的 eslint 插件
semi-ui 不应该作为 semi-foundation 的依赖。
原因:根据 Semi 的 foundation 和 adapter 设计,foundation 不应依赖 adapter。点击查看 F/A 设计。
使用 lodash 而不是 lodash-es。
原因:为了兼容 next,而 lodash-es 只提供了 es module 的产物。
点击查看详情。
monorepo 下各个包之间的 import 请使用包名而不是相对路径。
原因:这两个包在用户项目的安装路径可能不在同一文件夹下,使用相对路径会找不到对应的包。
// ❌ 不推荐
// semi-ui/input/index.tsx
import inputFoundation from '../semi-foundation/input/foundation';
// ✅ 推荐
// semi-ui/input/index.tsx
import inputFoundation from '@douyinfe/semi-foundation/input/foundation';
同一个包 import 请使用相对路径而不是引用包名。
// ❌ 不推荐
// semi-ui/modal/Modal.tsx
import { Button } from '@douyinfe/semi-ui';
// ✅ 推荐
// semi-ui/modal/Modal.tsx
import Button from '../button';
// ❌
// packages/semi-foundation/input/foundation.ts
import React from 'react';
import ReactDOM from 'react-dom';