UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

1 lines 2.4 kB
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'AutoComplete',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Drawer',\n 'Modal',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Slider',\n 'SliderWithInput',\n 'Tabs',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAqBA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa;GACb,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;GA5CjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EA6BiB;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}