aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples/basic/packages
diff options
context:
space:
mode:
author简律纯 <hsiangnianian@outlook.com>2023-04-28 01:47:57 +0800
committer简律纯 <hsiangnianian@outlook.com>2023-04-28 01:47:57 +0800
commit8b2c4a38a461ff5ecc95972291bc711e2c5dec9a (patch)
tree29f552e3df949073e21bf5c76d7abc3044830ec6 /examples/basic/packages
parentfc8c5fdce62fb229202659408798a7b6c98f6e8b (diff)
downloadHydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.tar.gz
HydroRoll-8b2c4a38a461ff5ecc95972291bc711e2c5dec9a.zip
Diffstat (limited to 'examples/basic/packages')
-rw-r--r--examples/basic/packages/eslint-config-custom/index.js11
-rw-r--r--examples/basic/packages/eslint-config-custom/package.json15
-rw-r--r--examples/basic/packages/tsconfig/base.json20
-rw-r--r--examples/basic/packages/tsconfig/nextjs.json20
-rw-r--r--examples/basic/packages/tsconfig/package.json9
-rw-r--r--examples/basic/packages/tsconfig/react-library.json11
-rw-r--r--examples/basic/packages/ui/Button.tsx5
-rw-r--r--examples/basic/packages/ui/index.tsx2
-rw-r--r--examples/basic/packages/ui/package.json19
-rw-r--r--examples/basic/packages/ui/tsconfig.json5
10 files changed, 117 insertions, 0 deletions
diff --git a/examples/basic/packages/eslint-config-custom/index.js b/examples/basic/packages/eslint-config-custom/index.js
new file mode 100644
index 0000000..c9523f1
--- /dev/null
+++ b/examples/basic/packages/eslint-config-custom/index.js
@@ -0,0 +1,11 @@
+module.exports = {
+ extends: ["next", "turbo", "prettier"],
+ rules: {
+ "@next/next/no-html-link-for-pages": "off",
+ },
+ parserOptions: {
+ babelOptions: {
+ presets: [require.resolve("next/babel")],
+ },
+ },
+};
diff --git a/examples/basic/packages/eslint-config-custom/package.json b/examples/basic/packages/eslint-config-custom/package.json
new file mode 100644
index 0000000..a423424
--- /dev/null
+++ b/examples/basic/packages/eslint-config-custom/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "eslint-config-custom",
+ "version": "0.0.0",
+ "main": "index.js",
+ "license": "MIT",
+ "dependencies": {
+ "eslint-config-next": "latest",
+ "eslint-config-prettier": "^8.3.0",
+ "eslint-plugin-react": "7.28.0",
+ "eslint-config-turbo": "latest"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/examples/basic/packages/tsconfig/base.json b/examples/basic/packages/tsconfig/base.json
new file mode 100644
index 0000000..d72a9f3
--- /dev/null
+++ b/examples/basic/packages/tsconfig/base.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "display": "Default",
+ "compilerOptions": {
+ "composite": false,
+ "declaration": true,
+ "declarationMap": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "inlineSources": false,
+ "isolatedModules": true,
+ "moduleResolution": "node",
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "preserveWatchOutput": true,
+ "skipLibCheck": true,
+ "strict": true
+ },
+ "exclude": ["node_modules"]
+}
diff --git a/examples/basic/packages/tsconfig/nextjs.json b/examples/basic/packages/tsconfig/nextjs.json
new file mode 100644
index 0000000..e45500d
--- /dev/null
+++ b/examples/basic/packages/tsconfig/nextjs.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "display": "Next.js",
+ "extends": "./base.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "declaration": false,
+ "declarationMap": false,
+ "incremental": true,
+ "jsx": "preserve",
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "module": "esnext",
+ "noEmit": true,
+ "resolveJsonModule": true,
+ "strict": false,
+ "target": "es5"
+ },
+ "include": ["src", "next-env.d.ts"],
+ "exclude": ["node_modules"]
+}
diff --git a/examples/basic/packages/tsconfig/package.json b/examples/basic/packages/tsconfig/package.json
new file mode 100644
index 0000000..6efb83e
--- /dev/null
+++ b/examples/basic/packages/tsconfig/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "tsconfig",
+ "version": "0.0.0",
+ "private": true,
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/examples/basic/packages/tsconfig/react-library.json b/examples/basic/packages/tsconfig/react-library.json
new file mode 100644
index 0000000..af8711c
--- /dev/null
+++ b/examples/basic/packages/tsconfig/react-library.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "display": "React Library",
+ "extends": "./base.json",
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "lib": ["ES2015"],
+ "module": "ESNext",
+ "target": "es6"
+ }
+}
diff --git a/examples/basic/packages/ui/Button.tsx b/examples/basic/packages/ui/Button.tsx
new file mode 100644
index 0000000..3e5afc7
--- /dev/null
+++ b/examples/basic/packages/ui/Button.tsx
@@ -0,0 +1,5 @@
+import * as React from "react";
+
+export const Button = () => {
+ return <button>Boop</button>;
+};
diff --git a/examples/basic/packages/ui/index.tsx b/examples/basic/packages/ui/index.tsx
new file mode 100644
index 0000000..916730e
--- /dev/null
+++ b/examples/basic/packages/ui/index.tsx
@@ -0,0 +1,2 @@
+import * as React from "react";
+export * from "./Button";
diff --git a/examples/basic/packages/ui/package.json b/examples/basic/packages/ui/package.json
new file mode 100644
index 0000000..f969743
--- /dev/null
+++ b/examples/basic/packages/ui/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "ui",
+ "version": "0.0.0",
+ "main": "./index.tsx",
+ "types": "./index.tsx",
+ "license": "MIT",
+ "scripts": {
+ "lint": "eslint \"**/*.ts*\""
+ },
+ "devDependencies": {
+ "@types/react": "^17.0.37",
+ "@types/react-dom": "^17.0.11",
+ "eslint": "^7.32.0",
+ "eslint-config-custom": "workspace:*",
+ "react": "^17.0.2",
+ "tsconfig": "workspace:*",
+ "typescript": "^4.5.2"
+ }
+}
diff --git a/examples/basic/packages/ui/tsconfig.json b/examples/basic/packages/ui/tsconfig.json
new file mode 100644
index 0000000..cd6c94d
--- /dev/null
+++ b/examples/basic/packages/ui/tsconfig.json
@@ -0,0 +1,5 @@
+{
+ "extends": "tsconfig/react-library.json",
+ "include": ["."],
+ "exclude": ["dist", "build", "node_modules"]
+}