diff --git a/packages/config/eslint-preset.js b/packages/config/eslint-preset.js new file mode 100644 index 0000000..cedc38d --- /dev/null +++ b/packages/config/eslint-preset.js @@ -0,0 +1,12 @@ +module.exports = { + extends: ["next", "prettier"], + settings: { + next: { + rootDir: ["apps/*/", "packages/*/"], + }, + }, + rules: { + "@next/next/no-html-link-for-pages": "off", + "react/jsx-key": "off", + }, +}; diff --git a/packages/config/package.json b/packages/config/package.json new file mode 100644 index 0000000..cdcaeea --- /dev/null +++ b/packages/config/package.json @@ -0,0 +1,14 @@ +{ + "name": "config", + "version": "0.0.0", + "main": "index.js", + "license": "MIT", + "files": [ + "eslint-preset.js" + ], + "dependencies": { + "eslint-config-next": "^12.0.8", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-react": "7.28.0" + } +} diff --git a/packages/tsconfig/README.md b/packages/tsconfig/README.md new file mode 100644 index 0000000..0da79cf --- /dev/null +++ b/packages/tsconfig/README.md @@ -0,0 +1,3 @@ +# `tsconfig` + +These are base shared `tsconfig.json`s from which all other `tsconfig.json`'s inherit from. diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json new file mode 100644 index 0000000..d72a9f3 --- /dev/null +++ b/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/packages/tsconfig/nextjs.json b/packages/tsconfig/nextjs.json new file mode 100644 index 0000000..3b7dfa9 --- /dev/null +++ b/packages/tsconfig/nextjs.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "extends": "./base.json", + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "incremental": true, + "esModuleInterop": true, + "module": "esnext", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve" + }, + "include": ["src", "next-env.d.ts"], + "exclude": ["node_modules"] +} diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json new file mode 100644 index 0000000..d49a4c6 --- /dev/null +++ b/packages/tsconfig/package.json @@ -0,0 +1,11 @@ +{ + "name": "tsconfig", + "version": "0.0.0", + "private": true, + "main": "index.js", + "files": [ + "base.json", + "nextjs.json", + "react-library.json" + ] +} diff --git a/packages/tsconfig/react-library.json b/packages/tsconfig/react-library.json new file mode 100644 index 0000000..6d6a7fe --- /dev/null +++ b/packages/tsconfig/react-library.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "React Library", + "extends": "./base.json", + "compilerOptions": { + "lib": ["ES2015"], + "module": "ESNext", + "target": "ES6", + "jsx": "react-jsx" + } +} diff --git a/packages/ui/Button.tsx b/packages/ui/Button.tsx new file mode 100644 index 0000000..7d5c6a7 --- /dev/null +++ b/packages/ui/Button.tsx @@ -0,0 +1,4 @@ +import * as React from "react"; +export const Button = () => { + return ; +}; diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx new file mode 100644 index 0000000..916730e --- /dev/null +++ b/packages/ui/index.tsx @@ -0,0 +1,2 @@ +import * as React from "react"; +export * from "./Button"; diff --git a/packages/ui/package.json b/packages/ui/package.json new file mode 100644 index 0000000..ccafef5 --- /dev/null +++ b/packages/ui/package.json @@ -0,0 +1,14 @@ +{ + "name": "ui", + "version": "0.0.0", + "main": "./index.tsx", + "types": "./index.tsx", + "license": "MIT", + "devDependencies": { + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "tsconfig": "workspace:*", + "config": "workspace:*", + "typescript": "^4.5.3" + } +} diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json new file mode 100644 index 0000000..cd6c94d --- /dev/null +++ b/packages/ui/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "tsconfig/react-library.json", + "include": ["."], + "exclude": ["dist", "build", "node_modules"] +}