From 598d70db5517e5a260ab29ed05326e0b9184b5a4 Mon Sep 17 00:00:00 2001 From: Heyward Fann Date: Wed, 10 Jan 2024 15:02:52 +0800 Subject: [PATCH] feat: minimal template --- src/scaffold.ts | 3 --- template/esbuild.mjs | 2 +- template/eslintrc.js | 16 ---------------- template/package.json | 22 ++++------------------ 4 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 template/eslintrc.js diff --git a/src/scaffold.ts b/src/scaffold.ts index 2a120cd..5158211 100644 --- a/src/scaffold.ts +++ b/src/scaffold.ts @@ -43,9 +43,6 @@ export async function scaffold(dest: string): Promise { if (file === 'npmignore') { file = '.npmignore'; } - if (file === 'eslintrc.js') { - file = '.eslintrc.js'; - } await write(join(dest, file), content); }); diff --git a/template/esbuild.mjs b/template/esbuild.mjs index e3927a5..bfd7e71 100644 --- a/template/esbuild.mjs +++ b/template/esbuild.mjs @@ -8,7 +8,7 @@ const options = { mainFields: ['module', 'main'], external: ['coc.nvim'], platform: 'node', - target: 'node16', + target: 'node18', outfile: 'lib/index.js', }; diff --git a/template/eslintrc.js b/template/eslintrc.js deleted file mode 100644 index 47b695a..0000000 --- a/template/eslintrc.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - env: { - node: true, - }, - parser: '@typescript-eslint/parser', - extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], - rules: { - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - }, -}; diff --git a/template/package.json b/template/package.json index 7ea9bb0..7e61f6b 100644 --- a/template/package.json +++ b/template/package.json @@ -9,31 +9,17 @@ "coc.nvim" ], "engines": { - "coc": "^0.0.80" + "coc": "^0.0.82" }, "scripts": { - "lint": "eslint src --ext ts", - "clean": "rimraf lib", "watch": "node esbuild.mjs --watch", "build": "node esbuild.mjs", "prepare": "node esbuild.mjs" }, - "prettier": { - "singleQuote": true, - "printWidth": 120, - "semi": true - }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.59.1", - "@typescript-eslint/parser": "^5.59.1", - "coc.nvim": "^0.0.80", - "esbuild": "^0.17.18", - "eslint": "^8.39.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.2.1", - "prettier": "^2.8.8", - "rimraf": "^5.0.0", - "typescript": "^5.0.4" + "coc.nvim": "^0.0.83-next.18", + "esbuild": "^0.19.8", + "typescript": "^5.3.3" }, "activationEvents": [ "*"