File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const base = require ( '@umijs/fabric/dist/eslint' ) ;
22
3+ const restrictedPackageDirectoryImports = [
4+ '@rc-component/*/es' ,
5+ '@rc-component/*/es/**' ,
6+ '@rc-component/*/lib' ,
7+ '@rc-component/*/lib/**' ,
8+ 'rc-*/es' ,
9+ 'rc-*/es/**' ,
10+ 'rc-*/lib' ,
11+ 'rc-*/lib/**' ,
12+ ] ;
13+
314module . exports = {
415 ...base ,
516 rules : {
617 ...base . rules ,
18+ 'no-restricted-imports' : [
19+ 'error' ,
20+ {
21+ patterns : [
22+ {
23+ group : restrictedPackageDirectoryImports ,
24+ message : 'Do not import package internals from es/lib. Import from the package root.' ,
25+ } ,
26+ ] ,
27+ } ,
28+ ] ,
729 'react/no-find-dom-node' : 0 ,
830 'jsx-a11y/label-has-associated-control' : 0 ,
931 'jsx-a11y/label-has-for' : 0 ,
Original file line number Diff line number Diff line change 3535 "tsc" : " tsc --noEmit"
3636 },
3737 "dependencies" : {
38- "@rc-component/util" : " ^1.3 .0"
38+ "@rc-component/util" : " ^1.11 .0"
3939 },
4040 "devDependencies" : {
4141 "@rc-component/father-plugin" : " ^2.0.2" ,
4545 "@types/react" : " ^18.0.0" ,
4646 "@types/react-dom" : " ^18.0.0" ,
4747 "@types/warning" : " ^3.0.0" ,
48+ "@typescript-eslint/eslint-plugin" : " ^5.62.0" ,
49+ "@typescript-eslint/parser" : " ^5.62.0" ,
4850 "@umijs/fabric" : " ^4.0.0" ,
4951 "dumi" : " ^2.0.15" ,
5052 "eslint" : " ^8.54.0" ,
51- "eslint-plugin-jest" : " ^28.2 .0" ,
53+ "eslint-plugin-jest" : " ^27.9 .0" ,
5254 "eslint-plugin-unicorn" : " ^52.0.0" ,
5355 "father" : " ^4.0.0" ,
5456 "rc-test" : " ^7.0.14" ,
5759 "typescript" : " ^5.0.2"
5860 },
5961 "peerDependencies" : {
60- "react" : " >=16.9 .0" ,
61- "react-dom" : " >=16.9 .0"
62+ "react" : " >=18.0 .0" ,
63+ "react-dom" : " >=18.0 .0"
6264 }
6365}
Original file line number Diff line number Diff line change 1- import { supportRef } from '@rc-component/util/lib/ref ' ;
1+ import { supportRef } from '@rc-component/util' ;
22import * as React from 'react' ;
33
44export type CompareProps < T extends React . ComponentType < any > > = (
Original file line number Diff line number Diff line change 1- import useEvent from '@rc-component/util/lib/hooks/useEvent' ;
2- import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect' ;
3- import isEqual from '@rc-component/util/lib/isEqual' ;
1+ import { isEqual , useEvent , useLayoutEffect } from '@rc-component/util' ;
42import * as React from 'react' ;
53import { unstable_batchedUpdates } from 'react-dom' ;
64
You can’t perform that action at this time.
0 commit comments