diff --git a/.env b/.env new file mode 100644 index 0000000..8f362dc --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +HOST=localhost +PORT=8000 diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 22a7d8f..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import eslint from '@eslint/js' -import tseslint from 'typescript-eslint' - -export default tseslint.config( - eslint.configs.recommended, - tseslint.configs.recommended -) diff --git a/eslint.config.ts b/eslint.config.ts index fca75f6..b04959c 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -1,9 +1,13 @@ +import pluginJs from "@eslint/js"; +import globals from "globals"; -import eslint from '@eslint/js'; -import tseslint from 'typescript-eslint'; - -export default tseslint.config( - eslint.configs.recommended, - tseslint.configs.recommended, - { languageOptions: { globals: { ...global.node } } }, -); \ No newline at end of file +export default [ + { languageOptions: { globals: { ...globals.node } } }, + pluginJs.configs.recommended, + { + files: ["**/*.js", "**/*.ts"], + rules: { + "no-unused-vars": "error", + }, + }, +]; diff --git a/package.json b/package.json index 4cab4cc..5f39b82 100644 --- a/package.json +++ b/package.json @@ -1,45 +1,35 @@ { - "name": "jsdoc-magnifier", - "version": "0.0.0", - "description": "A project to learn node", - "main": "index.ts", - "type": "module", - "bin": { - "jsdoc-magnifier": "./cli.ts" - }, - "scripts": { - "test": "node --test", - "prepare": "husky", - "lint": "npx eslint \"**/*.ts\"", - "prettier": "prettier ./ --write", - "start:api": "tsx --env-file=.env packages/api/server.ts", - "dev:api": "tsx watch --env-file=.env packages/api/server.ts", - "test:api": "node --env-file=.env api/index.test.ts" - }, - "author": "ECV M2 Dev", - "license": "ISC", - "devDependencies": { - "@eslint/js": "^9.15.0", - "@types/node": "^22.10.1", - "eslint": "^9.15.0", - "globals": "^15.11.0", - "husky": "^9.1.6", - "lint-staged": "^15.2.10", - "prettier": "^3.3.3", - "tsx": "^4.19.2", - "typescript": "^5.7.2", - "typescript-eslint": "^8.16.0" - }, - "lint-staged": { - "*.{js,jsx,ts,tsx}": [ - "eslint --fix" - ] - }, - "dependencies": { - "@hono/node-server": "^1.13.7", - "commander": "^12.1.0", - "hono": "^4.6.10", - "remark": "^15.0.1", - "remark-html": "^16.0.1" - } + "name": "jsdoc-magnifier", + "version": "0.0.0", + "author": "ECV M2 Dev", + "license": "ISC", + "description": "A project to learn node", + "type": "module", + "scripts": { + "build": "pnpm -r build", + "test": "pnpm -r test", + "prepare": "husky install", + "lint": "eslint .", + "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix", + "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"" + }, + "devDependencies": { + "@types/node": "^22.10.1", + "@typescript-eslint/eslint-plugin": "^8.16.0", + "@typescript-eslint/parser": "^8.16.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", + "eslint": "^9.15.0", + "prettier": "^3.4.1", + "typescript": "^5.7.2", + "lint-staged": "^15.2.10" + }, + "dependencies": { + "globals": "^15.12.0", + "husky": "^9.1.7" + }, + "lint-staged": { + "**/*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"], + "**/*.{json,md,yml}": ["prettier --write"] + } } diff --git a/packages/cli/package.json b/packages/cli/package.json new file mode 100644 index 0000000..03f1d19 --- /dev/null +++ b/packages/cli/package.json @@ -0,0 +1,20 @@ +{ + "name": "@jsdoc-magnifier/cli", + "version": "0.0.0", + "description": "A project to learn node", + "main": "index.js", + "type": "module", + "bin": { + "jsdoc-magnifier": "./cli.js" + }, + "scripts": { + "test": "node --test", + "dev": "node index.ts" + }, + "author": "ECV M2 Dev", + "license": "ISC", + "dependencies": { + "@jsdoc-magnifier/core": "workspace:*", + "commander": "^12.1.0" + } +} diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 0000000..8019426 --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,13 @@ +{ + "name": "@jsdoc-magnifier/core", + "version": "0.0.0", + "description": "A project to learn node", + "main": "index.js", + "type": "module", + "scripts": { + "test": "node --test", + "dev": "node index.ts" + }, + "author": "ECV M2 Dev", + "license": "ISC" +} diff --git a/tsconfig.json b/tsconfig.json index 2343106..9ae2d7f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,14 @@ { "compilerOptions": { + "target": "es2020", "module": "commonjs", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "lib": [ - "es2021" - ] + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "./dist", + "rootDir": "./packages" }, - "include": [ - "packages/**/*.ts" - ] -} \ No newline at end of file + "include": ["packages/**/*", "playground/**/*"], + "exclude": ["node_modules", "**/*.spec.ts"] +}