From f8ac3612fcaf12794653745bf0ccdf95cd3ca296 Mon Sep 17 00:00:00 2001 From: gahyuun Date: Tue, 28 May 2024 20:26:43 +0900 Subject: [PATCH] project setting --- .eslintrc.cjs | 28 +++++++++++++++++++++ .github/CODEOWNERS | 1 + .github/PULL_REQUEST_TEMPLATE.md | 19 +++++++++++++++ .gitignore | 3 +++ .prettierrc | 10 ++++++++ package.json | 42 ++++++++++++++++++++++++++++++++ src/index.ts | 1 + tsconfig.base.json | 14 +++++++++++ tsconfig.cjs.json | 11 +++++++++ tsconfig.esm.json | 11 +++++++++ 10 files changed, 140 insertions(+) create mode 100644 .eslintrc.cjs create mode 100644 .github/CODEOWNERS create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 package.json create mode 100644 src/index.ts create mode 100644 tsconfig.base.json create mode 100644 tsconfig.cjs.json create mode 100644 tsconfig.esm.json diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..552ede5 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,28 @@ +module.exports = { + env: { + browser: true, + es2021: true, + node: true, + }, + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + overrides: [ + { + env: { + node: true, + }, + files: ['.eslintrc.{js,cjs}'], + parserOptions: { + sourceType: 'script', + }, + }, + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + plugins: ['@typescript-eslint'], + rules: { + '@typescript-eslint/no-unused-vars': 'warn', + }, +}; diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..c782a32 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @yougyung @gahyuun \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ae5f12e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## **πŸ“Œ** μž‘μ—… λ‚΄μš© + + + +> κ΅¬ν˜„ λ‚΄μš© 및 μž‘μ—… ν–ˆλ˜ λ‚΄μ—­ + +- [x] μž‘μ—… λ‚΄μš© + +## πŸ€” κ³ λ―Ό ν–ˆλ˜ λΆ€λΆ„ + +- κ³ λ―Όν–ˆλ˜ ν¬μΈνŠΈκ°€ μ—†λ‹€λ©΄ **μ‚­μ œ**해도 λ©λ‹ˆλ‹€. +- **μ–΄λ–€ κ³ λ―Ό**을 ν•΄μ„œ **μ–΄λ–€ κ²°κ³Ό**κ°€ λ‚˜μ™”λŠ”μ§€ μž‘μ„±ν•΄μ£Όμ„Έμš”. +- κ²½ν—˜ κ³΅μœ λ‚˜ λ‹€λ₯Έ νŒ€μ›λ“€μ˜ 생각을 듀을 수 μžˆμ„ 것 κ°™μ•„μš”. + +## πŸ”Š 도움이 ν•„μš”ν•œ λΆ€λΆ„ + +- 도움이 ν•„μš”ν•œ 뢀뢄이 μ—†λ‹€λ©΄ **μ‚­μ œ** 해도 λ©λ‹ˆλ‹€. +- **νŒ€μ›λ“€μ˜ 의견이 κΌ­ ν•„μš”ν•œ λΆ€λΆ„**을 μž‘μ„±ν•΄μ£Όμ„Έμš”. +- **νŒ€μ›λ“€μ€ λ†“μΉ˜μ§€ μ•Šκ³  κΌ­ 이 ν•­λͺ©μ„ 보고 μ˜κ²¬μ„ μ£Όμ„Έμš”.** diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7c82ca9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +package-lock.json +lib \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..677460a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "all", + "useTabs": false, + "arrowParens": "always", + "bracketSpacing": true, + "bracketSameLine": false +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c428b32 --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "next-fetch", + "version": "1.0.0", + "description": "", + "types": "./lib/cjs/types/index.d.ts", + "main": "./lib/cjs/index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "clean": "rm -rf ./lib", + "build": "npm run clean && npm run build:esm && npm run build:cjs", + "build:esm": "tsc -p ./tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs", + "build:cjs": "tsc -p ./tsconfig.cjs.json", + "prepack": "npm run build", + "prepare": "husky install" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "typescript": "^5.4.5" + }, + "exports": { + ".": { + "import": { + "types": "./lib/esm/types/index.d.ts", + "default": "./lib/esm/index.mjs" + }, + "require": { + "types": "./lib/cjs/types/index.d.ts", + "default": "./lib/cjs/index.js" + } + } + }, + "files": [ + "lib/**/*" + ], + "devDependencies": { + "husky": "^9.0.11", + "@commitlint/cli": "^17.7.1", + "@commitlint/config-conventional": "^17.7.0" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..37f7f2a --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export const nextFetch = {}; diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..16c6904 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "strict": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "checkJs": true, + "allowJs": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true + }, + "files": ["src/index.ts"] +} diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000..c0fa4f4 --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "lib": ["ES6", "DOM"], + "target": "ES6", + "module": "CommonJS", + "moduleResolution": "Node", + "outDir": "lib/cjs", + "declarationDir": "lib/cjs/types" + } +} diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000..3f1d7dc --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "lib": ["ES2022", "DOM"], + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "outDir": "lib/esm", + "declarationDir": "lib/esm/types" + } +}