Skip to content

Commit 2a1861d

Browse files
committed
fix: fix some types error
1 parent 7d3214f commit 2a1861d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1286
-1255
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ node_modules
1111
pnpm-lock.yaml
1212
package-lock.json
1313
yarn.lock
14+
**/dist
15+
rollup.config.js

.eslintrc.cjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ module.exports = {
3232
'@typescript-eslint/ban-ts-comment': 'off',
3333
'svelte/nk-at-html-tags': 'off',
3434
'svelte/valid-compile': 'off',
35-
'@typescript-eslint/nk-non-null-assertion': 'off'
35+
'@typescript-eslint/nk-non-null-assertion': 'off',
36+
'@typescript-eslint/no-explicit-any': 'off',
37+
'svelte/no-at-html-tags': 'off'
3638
}
3739
};

build.config.ts

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
import { defineBuildConfig } from 'unbuild'
1+
import { defineBuildConfig } from 'unbuild';
22

33
export default defineBuildConfig({
4-
entries: [
5-
'components/index',
6-
],
7-
clean: false,
8-
declaration: true,
9-
externals: [
10-
'svelte',
11-
],
12-
rollup: {
13-
emitCJS: true,
14-
inlineDependencies: true,
15-
},
16-
})
4+
entries: ['components/index'],
5+
clean: false,
6+
declaration: true,
7+
externals: ['svelte'],
8+
rollup: {
9+
emitCJS: true,
10+
inlineDependencies: true
11+
}
12+
});

components/Button/package.json

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"name": "@ikun-ui/button",
3-
"version": "0.0.2",
4-
"type": "module",
5-
"main": "dist/index.js",
6-
"module": "dist/index.js",
7-
"svelte": "dist/index.js",
8-
"types": "src/index.ts",
9-
"keywords": [
10-
"svelte",
11-
"svelte3",
12-
"material-ui",
13-
"material-design",
14-
"material",
15-
"svelte-components",
16-
"sveltejs"
17-
],
18-
"scripts": {
19-
"build": "npm run build:js && npm run build:svelte",
20-
"build:js": "tsc -p . --outDir dist/ --rootDir src/",
21-
"build:svelte": "svelte-strip strip src/ dist",
22-
"publish:npm": "pnpm publish --no-git-checks --access public"
23-
},
24-
"publishConfig": {
25-
"access": "public"
26-
},
27-
"dependencies": {
28-
"@ikun-ui/icon": "workspace:*"
29-
},
30-
"devDependencies": {
31-
"@tsconfig/svelte": "^4.0.1",
32-
"svelte-strip": "^2.0.0",
33-
"tslib": "^2.5.3",
34-
"typescript": "^5.1.3"
35-
}
2+
"name": "@ikun-ui/button",
3+
"version": "0.0.2",
4+
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
7+
"svelte": "dist/index.js",
8+
"types": "src/index.ts",
9+
"keywords": [
10+
"svelte",
11+
"svelte3",
12+
"material-ui",
13+
"material-design",
14+
"material",
15+
"svelte-components",
16+
"sveltejs"
17+
],
18+
"scripts": {
19+
"build": "npm run build:js && npm run build:svelte",
20+
"build:js": "tsc -p . --outDir dist/ --rootDir src/",
21+
"build:svelte": "svelte-strip strip src/ dist",
22+
"publish:npm": "pnpm publish --no-git-checks --access public"
23+
},
24+
"publishConfig": {
25+
"access": "public"
26+
},
27+
"dependencies": {
28+
"@ikun-ui/icon": "workspace:*"
29+
},
30+
"devDependencies": {
31+
"@tsconfig/svelte": "^4.0.1",
32+
"svelte-strip": "^2.0.0",
33+
"tslib": "^2.5.3",
34+
"typescript": "^5.1.3"
35+
}
3636
}

components/Button/tsconfig.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"extends": "@tsconfig/svelte/tsconfig.json",
2+
"extends": "@tsconfig/svelte/tsconfig.json",
33

4-
"compilerOptions": {
5-
"noImplicitAny": true,
6-
"strict": true,
7-
"declaration": true
8-
},
9-
"include": ["src/**/*.ts", "src/**/*.svelte"],
10-
"exclude": ["node_modules/*", "**/*.spec.ts"]
4+
"compilerOptions": {
5+
"noImplicitAny": true,
6+
"strict": true,
7+
"declaration": true
8+
},
9+
"include": ["src/**/*.ts", "src/**/*.svelte"],
10+
"exclude": ["node_modules/*", "**/*.spec.ts"]
1111
}

components/Callapse/package.json

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"name": "@ikun-ui/callapase",
3-
"version": "0.0.2",
4-
"type": "module",
5-
"main": "dist/index.js",
6-
"module": "dist/index.js",
7-
"svelte": "dist/index.js",
8-
"types": "src/index.ts",
9-
"keywords": [
10-
"svelte",
11-
"svelte3",
12-
"material-ui",
13-
"material-design",
14-
"material",
15-
"svelte-components",
16-
"sveltejs"
17-
],
18-
"scripts": {
19-
"build": "npm run build:js && npm run build:svelte",
20-
"build:js": "tsc -p . --outDir dist/ --rootDir src/",
21-
"build:svelte": "svelte-strip strip src/ dist",
22-
"publish:npm": "pnpm publish --no-git-checks --access public"
23-
},
24-
"publishConfig": {
25-
"access": "public"
26-
},
27-
"dependencies": {
28-
"@ikun-ui/icon": "workspace:*"
29-
},
30-
"devDependencies": {
31-
"@tsconfig/svelte": "^4.0.1",
32-
"svelte-strip": "^2.0.0",
33-
"tslib": "^2.5.3",
34-
"typescript": "^5.1.3"
35-
}
2+
"name": "@ikun-ui/callapase",
3+
"version": "0.0.2",
4+
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
7+
"svelte": "dist/index.js",
8+
"types": "src/index.ts",
9+
"keywords": [
10+
"svelte",
11+
"svelte3",
12+
"material-ui",
13+
"material-design",
14+
"material",
15+
"svelte-components",
16+
"sveltejs"
17+
],
18+
"scripts": {
19+
"build": "npm run build:js && npm run build:svelte",
20+
"build:js": "tsc -p . --outDir dist/ --rootDir src/",
21+
"build:svelte": "svelte-strip strip src/ dist",
22+
"publish:npm": "pnpm publish --no-git-checks --access public"
23+
},
24+
"publishConfig": {
25+
"access": "public"
26+
},
27+
"dependencies": {
28+
"@ikun-ui/icon": "workspace:*"
29+
},
30+
"devDependencies": {
31+
"@tsconfig/svelte": "^4.0.1",
32+
"svelte-strip": "^2.0.0",
33+
"tslib": "^2.5.3",
34+
"typescript": "^5.1.3"
35+
}
3636
}

components/Callapse/src/index.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<script>
1+
<script lang="ts">
22
import { fly } from 'svelte/transition';
33
import { KIcon } from '@ikun-ui/icon';
44
import { createEventDispatcher } from 'svelte';
5-
export let title = 'title';
6-
export let content = 'content';
5+
export let title = '';
6+
export let content = '';
77
export let customClass = '';
88
export let show = false;
99
@@ -18,7 +18,7 @@
1818
</script>
1919

2020
<div class="rounded border-c border border-solid {customClass}">
21-
<div class="p4 flex justify-between cursor-pointer" on:click={showContent}>
21+
<div class="p4 flex justify-between cursor-pointer" on:click={showContent} aria-hidden="true">
2222
<slot name="title">
2323
{title}
2424
</slot>

components/Callapse/tsconfig.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"extends": "@tsconfig/svelte/tsconfig.json",
2+
"extends": "@tsconfig/svelte/tsconfig.json",
33

4-
"compilerOptions": {
5-
"noImplicitAny": true,
6-
"strict": true,
7-
"declaration": true
8-
},
9-
"include": ["src/**/*.ts", "src/**/*.svelte"],
10-
"exclude": ["node_modules/*", "**/*.spec.ts"]
4+
"compilerOptions": {
5+
"noImplicitAny": true,
6+
"strict": true,
7+
"declaration": true
8+
},
9+
"include": ["src/**/*.ts", "src/**/*.svelte"],
10+
"exclude": ["node_modules/*", "**/*.spec.ts"]
1111
}

components/Checkbox/package.json

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"name": "@ikun-ui/checkbox",
3-
"version": "0.0.2",
4-
"type": "module",
5-
"main": "dist/index.js",
6-
"module": "dist/index.js",
7-
"svelte": "dist/index.js",
8-
"types": "src/index.ts",
9-
"keywords": [
10-
"svelte",
11-
"svelte3",
12-
"material-ui",
13-
"material-design",
14-
"material",
15-
"svelte-components",
16-
"sveltejs"
17-
],
18-
"scripts": {
19-
"build": "npm run build:js && npm run build:svelte",
20-
"build:js": "tsc -p . --outDir dist/ --rootDir src/",
21-
"build:svelte": "svelte-strip strip src/ dist",
22-
"publish:npm": "pnpm publish --no-git-checks --access public"
23-
},
24-
"publishConfig": {
25-
"access": "public"
26-
},
27-
"dependencies": {
28-
"@ikun-ui/icon": "workspace:*"
29-
},
30-
"devDependencies": {
31-
"@tsconfig/svelte": "^4.0.1",
32-
"svelte-strip": "^2.0.0",
33-
"tslib": "^2.5.3",
34-
"typescript": "^5.1.3"
35-
}
2+
"name": "@ikun-ui/checkbox",
3+
"version": "0.0.2",
4+
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
7+
"svelte": "dist/index.js",
8+
"types": "src/index.ts",
9+
"keywords": [
10+
"svelte",
11+
"svelte3",
12+
"material-ui",
13+
"material-design",
14+
"material",
15+
"svelte-components",
16+
"sveltejs"
17+
],
18+
"scripts": {
19+
"build": "npm run build:js && npm run build:svelte",
20+
"build:js": "tsc -p . --outDir dist/ --rootDir src/",
21+
"build:svelte": "svelte-strip strip src/ dist",
22+
"publish:npm": "pnpm publish --no-git-checks --access public"
23+
},
24+
"publishConfig": {
25+
"access": "public"
26+
},
27+
"dependencies": {
28+
"@ikun-ui/icon": "workspace:*"
29+
},
30+
"devDependencies": {
31+
"@tsconfig/svelte": "^4.0.1",
32+
"svelte-strip": "^2.0.0",
33+
"tslib": "^2.5.3",
34+
"typescript": "^5.1.3"
35+
}
3636
}

components/Checkbox/tsconfig.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"extends": "@tsconfig/svelte/tsconfig.json",
2+
"extends": "@tsconfig/svelte/tsconfig.json",
33

4-
"compilerOptions": {
5-
"noImplicitAny": true,
6-
"strict": true,
7-
"declaration": true
8-
},
9-
"include": ["src/**/*.ts", "src/**/*.svelte"],
10-
"exclude": ["node_modules/*", "**/*.spec.ts"]
4+
"compilerOptions": {
5+
"noImplicitAny": true,
6+
"strict": true,
7+
"declaration": true
8+
},
9+
"include": ["src/**/*.ts", "src/**/*.svelte"],
10+
"exclude": ["node_modules/*", "**/*.spec.ts"]
1111
}

0 commit comments

Comments
 (0)