Skip to content

Commit

Permalink
chore: packlint
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Sep 11, 2023
1 parent a140e58 commit 6ef135a
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @tooooo1
* @tooooo1 @manudeli
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": ["packlint", "codecov"]
}
2 changes: 1 addition & 1 deletion configs/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@fepack/eslint-config",
"version": "0.0.0",
"main": "index.js",
"license": "MIT",
"main": "index.js",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
Expand Down
10 changes: 5 additions & 5 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@fepack/demo-image",
"private": true,
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"dev": "vite",
"preview": "vite preview"
},
"dependencies": {
"@fepack/image": "workspace:^"
},
"devDependencies": {
"@fepack/eslint-config": "workspace:*",
"@fepack/tsconfig": "workspace:*",
"vite": "^4.4.5"
},
"dependencies": {
"@fepack/image": "workspace:^"
}
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"url": "https://github.com/tooooo1/fepack.git"
},
"license": "MIT",
"packageManager": "[email protected]",
"type": "module",
"workspaces": [
"configs/*",
Expand All @@ -20,17 +21,18 @@
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"lint": "turbo run lint",
"lint:pack": "packlint sort -R",
"prepack": "turbo run prepack",
"test": "turbo run test",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"type:check": "turbo run type:check --parallel"
},
"devDependencies": {
"eslint": "^7.32.0",
"packlint": "^0.2.4",
"prettier": "^2.5.1",
"turbo": "latest",
"typescript": "^5.1.6"
},
"packageManager": "[email protected]"
}
}
16 changes: 8 additions & 8 deletions packages/image/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"name": "@fepack/image",
"version": "0.0.0",
"type": "module",
"description": "Image preloader for fepack",
"license": "MIT",
"author": "tooooo1",
"keywords": [
"fepack",
"image",
Expand All @@ -15,9 +12,10 @@
"url": "https://github.com/fepack/image.git",
"directory": "packages/image"
},
"license": "MIT",
"author": "tooooo1",
"sideEffects": false,
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"exports": {
".": {
"import": {
Expand All @@ -31,16 +29,18 @@
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"src"
],
"scripts": {
"build": "pnpm clean && pnpm build:tsc && pnpm build:js && pnpm copy:cts",
"build:tsc": "tsc --emitDeclarationOnly",
"build:js": "node ./esbuild.config.js",
"copy:cts": "cp dist/index.d.ts dist/index.d.cts",
"build:tsc": "tsc --emitDeclarationOnly",
"clean": "rm -rf dist",
"copy:cts": "cp dist/index.d.ts dist/index.d.cts",
"prepack": "pnpm build",
"test": "vitest run --coverage",
"test:watch": "vitest"
Expand All @@ -49,9 +49,9 @@
"@fepack/tsconfig": "workspace:*",
"@vitest/browser": "^0.34.4",
"@vitest/coverage-istanbul": "^0.34.4",
"playwright": "^1.37.1",
"esbuild": "^0.18.11",
"jsdom": "^22.1.0",
"playwright": "^1.37.1",
"vitest": "^0.34.3"
},
"publishConfig": {
Expand Down
9 changes: 9 additions & 0 deletions packlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
files: [
"./package.json",
"./packages/*/package.json",
"./websites/*/package.json",
"./configs/*/package.json",
"./demo/package.json",
],
};
Loading

0 comments on commit 6ef135a

Please sign in to comment.