Skip to content

Commit 0712e72

Browse files
committed
chore: re-format and ignore scripts
1 parent 30c1008 commit 0712e72

File tree

104 files changed

+579
-304
lines changed

Some content is hidden

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

104 files changed

+579
-304
lines changed

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ dist
66
esm/*
77
public/*
88
tests/*
9+
scripts/*
910
*.config.js
1011
.DS_Store
1112
node_modules
1213
coverage
1314
.next
1415
build
15-
!scripts
1616
!.storybook
1717
!.commitlintrc.cjs
1818
!.lintstagedrc.cjs

.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plop
55
coverage
66
.next
77
build
8+
scripts
89
pnpm-lock.yaml
9-
!scripts
1010
!.storybook
1111
!.commitlintrc.cjs
1212
!.lintstagedrc.cjs

apps/docs/next-redirect.js

+40-37
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,81 @@
1-
const shell = require('shelljs');
2-
const path = require('path');
1+
const path = require("path");
32

4-
const rootDir = path.join(__dirname, '.');
5-
const contentDir = path.join(rootDir, 'content');
6-
const docsDir = path.join(contentDir, 'docs');
7-
const componentsDocsDir = path.join(docsDir, 'components');
3+
const shell = require("shelljs");
4+
5+
const rootDir = path.join(__dirname, ".");
6+
const contentDir = path.join(rootDir, "content");
7+
const docsDir = path.join(contentDir, "docs");
8+
const componentsDocsDir = path.join(docsDir, "components");
89

910
const getComponentsName = () => {
1011
const names = shell
11-
.ls('-R', componentsDocsDir)
12+
.ls("-R", componentsDocsDir)
1213
.map((file) => path.join(process.cwd(), componentsDocsDir, file))
13-
.filter((file) => file.endsWith('.mdx'))
14-
.map((file) => path.basename(file, '.mdx'));
14+
.filter((file) => file.endsWith(".mdx"))
15+
.map((file) => path.basename(file, ".mdx"));
16+
1517
return names;
1618
};
1719
const getComponentsRoute = (names = []) => {
1820
return names.map((name) => {
1921
return {
2022
source: `/${name}`,
2123
destination: `/docs/components/${name}`,
22-
permanent: true
24+
permanent: true,
2325
};
2426
});
2527
};
2628

2729
async function redirect() {
2830
const componentsName = getComponentsName();
31+
2932
return [
3033
...getComponentsRoute(componentsName),
3134
{
32-
source: '/docs',
33-
destination: '/docs/guide/getting-started',
34-
permanent: true
35+
source: "/docs",
36+
destination: "/docs/guide/getting-started",
37+
permanent: true,
3538
},
3639
{
37-
source: '/docs/getting-started',
38-
destination: '/docs/guide/getting-started',
39-
permanent: true
40+
source: "/docs/getting-started",
41+
destination: "/docs/guide/getting-started",
42+
permanent: true,
4043
},
4144
{
42-
source: '/guide',
43-
destination: '/docs/guide/getting-started',
44-
permanent: true
45+
source: "/guide",
46+
destination: "/docs/guide/getting-started",
47+
permanent: true,
4548
},
4649
{
47-
source: '/learn',
48-
destination: '/docs/guide/getting-started',
49-
permanent: true
50+
source: "/learn",
51+
destination: "/docs/guide/getting-started",
52+
permanent: true,
5053
},
5154
{
52-
source: '/theme',
53-
destination: '/docs/theme/default-theme',
54-
permanent: true
55+
source: "/theme",
56+
destination: "/docs/theme/default-theme",
57+
permanent: true,
5558
},
5659
{
57-
source: '/docs/theme',
58-
destination: '/docs/theme/default-theme',
59-
permanent: true
60+
source: "/docs/theme",
61+
destination: "/docs/theme/default-theme",
62+
permanent: true,
6063
},
6164
{
62-
source: '/components/:path*',
65+
source: "/components/:path*",
6366
permanent: true,
64-
destination: '/docs/components/:path*'
67+
destination: "/docs/components/:path*",
6568
},
6669
{
67-
source: '/docs/components',
68-
destination: '/docs/components/button',
69-
permanent: true
70+
source: "/docs/components",
71+
destination: "/docs/components/button",
72+
permanent: true,
7073
},
7174
{
72-
source: '/components',
73-
destination: '/docs/components/button',
74-
permanent: true
75-
}
75+
source: "/components",
76+
destination: "/docs/components/button",
77+
permanent: true,
78+
},
7679
];
7780
}
7881

apps/docs/next.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module.exports = {
2-
pageExtensions: ['jsx', 'js', 'mdx', 'md', 'ts', 'tsx'],
3-
redirects: require('./next-redirect'),
2+
pageExtensions: ["jsx", "js", "mdx", "md", "ts", "tsx"],
3+
redirects: require("./next-redirect"),
44
reactStrictMode: false,
55
eslint: {
6-
ignoreDuringBuilds: true
6+
ignoreDuringBuilds: true,
77
},
88
typescript: {
9-
ignoreBuildErrors: process.env.IS_VERCEL_ENV === 'true'
10-
}
9+
ignoreBuildErrors: process.env.IS_VERCEL_ENV === "true",
10+
},
1111
};

apps/docs/tsconfig.json

+14-49
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,23 @@
22
"compilerOptions": {
33
"baseUrl": ".",
44
"paths": {
5-
"@components": [
6-
"./src/components/index.ts"
7-
],
8-
"@primitives": [
9-
"./src/components/primitives/index.ts"
10-
],
11-
"@components/": [
12-
"./src/components/*"
13-
],
14-
"@content/*": [
15-
"./content/*"
16-
],
17-
"@layouts/*": [
18-
"./src/layouts/*"
19-
],
20-
"@hooks/*": [
21-
"./src/hooks/*"
22-
],
23-
"@utils/*": [
24-
"./src/utils/*"
25-
],
26-
"@theme/*": [
27-
"./src/theme/*"
28-
],
29-
"@lib/*": [
30-
"./src/lib/*"
31-
]
5+
"@components": ["./src/components/index.ts"],
6+
"@primitives": ["./src/components/primitives/index.ts"],
7+
"@components/": ["./src/components/*"],
8+
"@content/*": ["./content/*"],
9+
"@layouts/*": ["./src/layouts/*"],
10+
"@hooks/*": ["./src/hooks/*"],
11+
"@utils/*": ["./src/utils/*"],
12+
"@theme/*": ["./src/theme/*"],
13+
"@lib/*": ["./src/lib/*"]
3214
},
33-
"lib": [
34-
"dom",
35-
"es2015",
36-
"ESNext.String"
37-
],
15+
"lib": ["dom", "es2015", "ESNext.String"],
3816
"target": "esnext",
3917
"jsx": "preserve",
4018
"allowJs": true,
4119
"esModuleInterop": true,
4220
"allowSyntheticDefaultImports": true,
43-
"types": [
44-
"node"
45-
],
21+
"types": ["node"],
4622
"strict": false,
4723
"forceConsistentCasingInFileNames": true,
4824
"noEmit": true,
@@ -56,20 +32,9 @@
5632
"noImplicitAny": true,
5733
"skipLibCheck": true,
5834
"module": "esnext",
59-
"typeRoots": [
60-
"../../node_modules/@types",
61-
"./typings"
62-
],
35+
"typeRoots": ["../../node_modules/@types", "./typings"],
6336
"incremental": true
6437
},
65-
"include": [
66-
"**/*.ts",
67-
"**/*.tsx",
68-
"**/*.js",
69-
"**/*.jsx",
70-
"next-env.d.ts"
71-
],
72-
"exclude": [
73-
"node_modules"
74-
]
38+
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "next-env.d.ts"],
39+
"exclude": ["node_modules"]
7540
}

jest.config.js

+4-13
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,16 @@ module.exports = {
22
testEnvironment: "jsdom",
33
collectCoverageFrom: ["packages/**/*.{ts,tsx}"],
44
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
5-
modulePathIgnorePatterns: [
6-
"<rootDir>/examples",
7-
"<rootDir>/tooling/cra-template*",
8-
],
5+
modulePathIgnorePatterns: ["<rootDir>/examples", "<rootDir>/tooling/cra-template*"],
96
transform: {
107
"^.+\\.(ts|tsx|js|jsx)?$": "@swc-node/jest",
118
},
129
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"],
13-
setupFilesAfterEnv: [
14-
"@testing-library/jest-dom/extend-expect",
15-
"./scripts/setup-test.ts",
16-
],
10+
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect", "./scripts/setup-test.ts"],
1711
globals: {
1812
"ts-jest": {
1913
tsconfig: "tsconfig.json",
2014
},
2115
},
22-
watchPlugins: [
23-
"jest-watch-typeahead/filename",
24-
"jest-watch-typeahead/testname",
25-
],
26-
}
16+
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
17+
};

packages/components/avatar/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ for details.
2121
## Licence
2222

2323
This project is licensed under the terms of the
24-
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
24+
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
{ "replace": { "main": "dist/index.cjs.js", "module": "dist/index.esm.js",
2-
"types": "dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js",
3-
"require": "./dist/index.cjs.js" }, "./package.json": "./package.json" } } }
1+
{
2+
"replace": {
3+
"main": "dist/index.cjs.js",
4+
"module": "dist/index.esm.js",
5+
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {"import": "./dist/index.esm.js", "require": "./dist/index.cjs.js"},
8+
"./package.json": "./package.json"
9+
}
10+
}
11+
}

packages/components/badge/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ for details.
2121
## Licence
2222

2323
This project is licensed under the terms of the
24-
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
24+
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
{ "replace": { "main": "dist/index.cjs.js", "module": "dist/index.esm.js",
2-
"types": "dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js",
3-
"require": "./dist/index.cjs.js" }, "./package.json": "./package.json" } } }
1+
{
2+
"replace": {
3+
"main": "dist/index.cjs.js",
4+
"module": "dist/index.esm.js",
5+
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {"import": "./dist/index.esm.js", "require": "./dist/index.cjs.js"},
8+
"./package.json": "./package.json"
9+
}
10+
}
11+
}

packages/components/button/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ for details.
2121
## Licence
2222

2323
This project is licensed under the terms of the
24-
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
24+
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
{ "replace": { "main": "dist/index.cjs.js", "module": "dist/index.esm.js",
2-
"types": "dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js",
3-
"require": "./dist/index.cjs.js" }, "./package.json": "./package.json" } } }
1+
{
2+
"replace": {
3+
"main": "dist/index.cjs.js",
4+
"module": "dist/index.esm.js",
5+
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {"import": "./dist/index.esm.js", "require": "./dist/index.cjs.js"},
8+
"./package.json": "./package.json"
9+
}
10+
}
11+
}

packages/components/card/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ for details.
2121
## Licence
2222

2323
This project is licensed under the terms of the
24-
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
24+
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
{ "replace": { "main": "dist/index.cjs.js", "module": "dist/index.esm.js",
2-
"types": "dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js",
3-
"require": "./dist/index.cjs.js" }, "./package.json": "./package.json" } } }
1+
{
2+
"replace": {
3+
"main": "dist/index.cjs.js",
4+
"module": "dist/index.esm.js",
5+
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {"import": "./dist/index.esm.js", "require": "./dist/index.cjs.js"},
8+
"./package.json": "./package.json"
9+
}
10+
}
11+
}

packages/components/card/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"compilerOptions": {
44
"paths": {
55
"@stitches/react": ["../../../node_modules/@stitches/react"]
6-
},
6+
}
77
},
88
"include": ["src", "index.ts"]
99
}

packages/components/checkbox/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ for details.
2121
## Licence
2222

2323
This project is licensed under the terms of the
24-
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
24+
[MIT license](https://github.com/nextui-org/nextui/blob/master/LICENSE).
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
{ "replace": { "main": "dist/index.cjs.js", "module": "dist/index.esm.js",
2-
"types": "dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js",
3-
"require": "./dist/index.cjs.js" }, "./package.json": "./package.json" } } }
1+
{
2+
"replace": {
3+
"main": "dist/index.cjs.js",
4+
"module": "dist/index.esm.js",
5+
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {"import": "./dist/index.esm.js", "require": "./dist/index.cjs.js"},
8+
"./package.json": "./package.json"
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)