generated from ony3000/node-library-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ony3000/reorganize-repository-structure
Reorganize the repository structure into a monorepo
- Loading branch information
Showing
50 changed files
with
743 additions
and
711 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,3 +258,9 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# turbo | ||
.turbo | ||
|
||
# vercel | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
"editor.formatOnSave": true, | ||
"eslint.workingDirectories": [{ "mode": "auto" }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages/prettier-plugin-merge/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages/prettier-plugin-merge/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,26 @@ | ||
{ | ||
"name": "prettier-plugin-merge", | ||
"version": "0.2.1", | ||
"description": "A Prettier plugin that sequentially applies the formatting results of other Prettier plugins.", | ||
"repository": "https://github.com/ony3000/prettier-plugin-merge", | ||
"keywords": [ | ||
"prettier", | ||
"plugin", | ||
"merge" | ||
], | ||
"private": true, | ||
"name": "root", | ||
"version": "0.0.0", | ||
"author": "Hyeonjong <nianelo4@gmail.com>", | ||
"license": "MIT", | ||
"type": "module", | ||
"files": [ | ||
"dist" | ||
], | ||
"types": "./dist/index.d.ts", | ||
"main": "./dist/prettier-plugin-merge.umd.cjs", | ||
"module": "./dist/prettier-plugin-merge.js", | ||
"exports": { | ||
".": { | ||
"import": "./dist/prettier-plugin-merge.js", | ||
"require": "./dist/prettier-plugin-merge.umd.cjs" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "vite build --watch --minify=false", | ||
"build": "vite build", | ||
"lint": "eslint src", | ||
"test": "pnpm run build && jest --ci --passWithNoTests" | ||
}, | ||
"dependencies": { | ||
"diff": "5.1.0" | ||
"clean": "pnpm -r exec rm -rf dist && pnpm -r exec rm -rf node_modules", | ||
"dev": "turbo run dev --no-daemon --filter bundle-entry", | ||
"build": "turbo run build --no-daemon --filter bundle-entry", | ||
"lint": "turbo run lint --no-daemon", | ||
"test": "turbo run test --no-daemon --filter test-suite", | ||
"merge-deps": "merge-packages packages/bundle-entry packages/eslint-config-custom packages/test-suite packages/tsconfig packages/v2-plugin", | ||
"prepare-release": "pnpm -r exec rm -rf dist && turbo run prepare-release --no-daemon --filter prettier-plugin-merge" | ||
}, | ||
"devDependencies": { | ||
"@trivago/prettier-plugin-sort-imports": "4.1.1", | ||
"@types/diff": "5.0.3", | ||
"@types/jest": "29.5.2", | ||
"@types/node": "20.2.5", | ||
"@typescript-eslint/eslint-plugin": "5.54.0", | ||
"@typescript-eslint/parser": "5.54.0", | ||
"eslint": "8.35.0", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
"eslint-config-airbnb-typescript": "17.0.0", | ||
"eslint-config-prettier": "8.6.0", | ||
"eslint-import-resolver-node": "0.3.7", | ||
"eslint-import-resolver-typescript": "3.5.3", | ||
"eslint-plugin-import": "2.27.5", | ||
"jest": "29.5.0", | ||
"ppm-012": "npm:prettier-plugin-merge@0.1.2", | ||
"ppm-020": "npm:prettier-plugin-merge@0.2.0", | ||
"merge-packages": "0.1.6", | ||
"prettier": "~2.8.4", | ||
"prettier-plugin-brace-style": "0.2.1", | ||
"prettier-plugin-classnames": "0.1.1", | ||
"prettier-plugin-tailwindcss": "0.3.0", | ||
"ts-jest": "29.1.0", | ||
"typescript": "4.9.5", | ||
"vite": "4.3.9", | ||
"vite-plugin-dts": "3.0.0-beta.2" | ||
"tsconfig": "workspace:*", | ||
"turbo": "1.10.14", | ||
"typescript": "4.9.5" | ||
}, | ||
"peerDependencies": { | ||
"prettier": "~2.8.4" | ||
} | ||
"packageManager": "pnpm@7.33.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['custom/base'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// eslint-disable-next-line import/no-import-module-exports | ||
import prettier from 'prettier'; | ||
|
||
if (prettier.version.startsWith('2.')) { | ||
// eslint-disable-next-line global-require | ||
module.exports = require('v2-plugin'); | ||
} else { | ||
// TODO: implement v3 plugin | ||
// eslint-disable-next-line global-require | ||
module.exports = require('v2-plugin'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"private": true, | ||
"name": "bundle-entry", | ||
"version": "0.0.0", | ||
"author": "Hyeonjong <nianelo4@gmail.com>", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"dev": "esbuild index.ts standalone.ts --bundle --outdir=dist --platform=node \"--external:prettier\" --watch=forever", | ||
"build": "esbuild index.ts standalone.ts --bundle --outdir=dist --platform=node \"--external:prettier\" --minify", | ||
"lint": "eslint .", | ||
"prepare-release": "esbuild index.ts --bundle --outdir=dist --platform=node \"--external:prettier\" --minify" | ||
}, | ||
"dependencies": { | ||
"prettier": "2.8.4", | ||
"v2-plugin": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "20.2.5", | ||
"esbuild": "0.17.19", | ||
"eslint": "8.35.0", | ||
"eslint-config-custom": "workspace:*", | ||
"tsconfig": "workspace:*", | ||
"typescript": "4.9.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import v2Plugin from 'v2-plugin'; | ||
|
||
export { v2Plugin }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "tsconfig/base.json", | ||
"include": ["."] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const { resolve } = require('node:path'); | ||
|
||
const project = resolve(process.cwd(), 'tsconfig.json'); | ||
|
||
module.exports = { | ||
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'], | ||
parserOptions: { | ||
project, | ||
}, | ||
plugins: ['import'], | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.mts', '.cts', '.d.ts'], | ||
}, | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
typescript: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
ignorePatterns: ['**/*.*js', '**/*.jsx', '**/*.d.ts'], | ||
rules: { | ||
'@typescript-eslint/no-loop-func': 0, | ||
'import/prefer-default-export': 0, | ||
'no-restricted-syntax': 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"private": true, | ||
"name": "eslint-config-custom", | ||
"version": "0.0.0", | ||
"author": "Hyeonjong <nianelo4@gmail.com>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "5.54.0", | ||
"@typescript-eslint/parser": "5.54.0", | ||
"eslint": "8.35.0", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
"eslint-config-airbnb-typescript": "17.0.0", | ||
"eslint-config-prettier": "8.6.0", | ||
"eslint-import-resolver-node": "0.3.7", | ||
"eslint-import-resolver-typescript": "3.5.3", | ||
"eslint-plugin-import": "2.27.5", | ||
"typescript": "4.9.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Hyeonjong | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# prettier-plugin-merge | ||
|
||
A Prettier plugin that sequentially applies the formatting results of other Prettier plugins. | ||
|
||
**Note**: Prettier v3 is not yet supported. | ||
|
||
![The process of applying formats sequentially.](./.github/banner.png) | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install --save-dev prettier@~2.8 prettier-plugin-merge | ||
``` | ||
|
||
```sh | ||
yarn add --dev prettier@~2.8 prettier-plugin-merge | ||
``` | ||
|
||
```sh | ||
pnpm add --save-dev prettier@~2.8 prettier-plugin-merge | ||
``` | ||
|
||
## Configuration | ||
|
||
**Note**: This plugin MUST come last. Other plugins usually have no order constraints. | ||
|
||
JSON: | ||
|
||
```json | ||
{ | ||
"plugins": [ | ||
"other-prettier-plugin-1", | ||
"other-prettier-plugin-2", | ||
"other-prettier-plugin-3", | ||
"prettier-plugin-merge" | ||
] | ||
} | ||
``` | ||
|
||
JS: | ||
|
||
```javascript | ||
module.exports = { | ||
plugins: [ | ||
require('other-prettier-plugin-1'), | ||
require('other-prettier-plugin-2'), | ||
require('other-prettier-plugin-3'), | ||
require('prettier-plugin-merge'), | ||
], | ||
}; | ||
``` |
Oops, something went wrong.