Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix lint config #75

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"browser": true,
"es2020": true,
"jest": true,
"node": true
"node": true,
},
"settings": {
"react": {
"version": "detect"
}
"version": "detect",
},
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
"jsx": true,
},
"ecmaVersion": 11,
"sourceType": "module"
"sourceType": "module",
},
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"rules": {
Expand All @@ -34,6 +34,6 @@
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "off"
}
"@typescript-eslint/no-explicit-any": "off",
},
}
1 change: 0 additions & 1 deletion docs/home/components/Banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
// @ts-ignore
import { Link, useIntl } from 'dumi';

import styles from './index.module.less';
Expand Down
57 changes: 0 additions & 57 deletions docs/home/components/Features/index.module.less

This file was deleted.

44 changes: 0 additions & 44 deletions docs/home/components/Features/index.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions docs/home/components/ShowCase/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Space } from 'antd';

import styles from './index.module.less';

export default () => {
export default function Address() {
return (
<div className={styles.cardBg}>
<span className={styles.title}>Address</span>
Expand All @@ -22,4 +22,4 @@ export default () => {
</Space>
</div>
);
};
}
4 changes: 2 additions & 2 deletions docs/home/components/ShowCase/NFTCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';

import styles from './index.module.less';

export default () => {
export default function NFTCard() {
return (
<div className={styles.cardBg}>
<span className={styles.title}>NFT Card</span>
Expand All @@ -17,4 +17,4 @@ export default () => {
</div>
</div>
);
};
}
15 changes: 2 additions & 13 deletions docs/home/components/ShowCase/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,15 @@ import Address from './Address';
import styles from './index.module.less';
import NFTCard from './NFTCard';

export default () => {
export default function ShowCase() {
const intl = useIntl();

return (
<div className={styles.container}>
{/* <h3 className={styles.headTitle}>{intl.formatMessage({ id: 'app.docs.site.case.title' })}</h3>
<div className={styles.desc}>
{intl.formatMessage({ id: 'app.docs.site.case.description' })}
</div>
<div className={styles.componentList}>
<ConnectButton />
<Address />
<NFTCard />
<Connect />
</div> */}

<div className={styles.footer}>
<div className={styles.footerText}>Made with ❤ by</div>
<div className={styles.footerDesc}>AELF DESIGN</div>
</div>
</div>
);
};
}
6 changes: 2 additions & 4 deletions docs/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import React, { useEffect } from 'react';
import { usePrefersColor } from 'dumi';

import HomeBanner from './components/Banner';
import Features from './components/Features';
import ShowCase from './components/ShowCase';
// import Theme from './components/Theme';
import styles from './index.module.less';

export default () => {
export default function Home() {
const [, prefersColor] = usePrefersColor();

useEffect(() => {
Expand All @@ -25,12 +24,11 @@ export default () => {
<div className={styles.container}>
<HomeBanner />
<div className={styles.centerbg}>
<Features />
{/* <Theme /> */}
{/* <div className={styles.rightTopImage} />
<div className={styles.leftBottomImage} /> */}
</div>
<ShowCase />
</div>
);
};
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"devDependencies": {
"@aelf-design/common": "workspace:*",
"@aelf-design/internal-icons": "workspace:*",
"aelf-design": "workspace:*",
"@ant-design/icons": "^5.2.6",
"@babel/parser": "^7.24.0",
"@biomejs/biome": "^1.4.1",
Expand All @@ -62,14 +61,15 @@
"@svgr/plugin-svgo": "^8.1.0",
"@tanstack/react-query": "^5.17.0",
"@testing-library/react": "^14.1.2",
"@types/lodash": "^4.14.202",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.5",
"@types/react": "^18.2.45",
"@types/react-copy-to-clipboard": "^5.0.7",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@umijs/fabric": "^4.0.1",
"@vitest/coverage-v8": "^1.1.0",
"aelf-design": "workspace:*",
"antd": "^5.13.2",
"antd-style": "^3.6.1",
"babel-plugin-inline-react-svg-v2": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src"]
"include": ["src/**/*.ts", "src/**/*.tsx", ".fatherrc.ts"]
}
10 changes: 0 additions & 10 deletions packages/component/global.d.ts

This file was deleted.

3 changes: 2 additions & 1 deletion packages/component/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src", "global.d.ts"],
"include": ["src/**/*.ts", "src/**/*.tsx", ".fatherrc.ts"],
"exclude": ["src/**/*/demos/**/*"],
"compilerOptions": {
"outDir": "dist"
}
Expand Down
1 change: 1 addition & 0 deletions packages/internal-icons/src/__tests__/iconTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { type ComponentType } from 'react';
import { globSync } from 'glob';

export async function getComponents(dir: string): Promise<ComponentType[]> {
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve) => {
const files = globSync(path.resolve(__dirname, '..', dir, '*.tsx'));
const res: ComponentType[] = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-icons/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src", "global.d.ts"]
"include": ["src/**/*.ts", "src/**/*.tsx", "src/global.d.ts", ".fatherrc.ts"]
}
12 changes: 9 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"extends": "./tsconfig.base.json",
"include": ["/packages/**/*", ".dumirc.ts"]
"include": [
"./packages/common/src/",
"./packages/component/src/",
"./packages/internal-icons/src/"
],
"exclude": ["./packages/component/src/**/*/demos"]
}
Loading