From faec2a056a1df9dd90058c3ba77c897c74d71a5a Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Tue, 7 May 2024 18:14:51 -0700 Subject: [PATCH] chore: simplify template-oss config Turn off typescript option since most of what it sets is not helpful for types only libraries --- .eslintrc.cjs | 7 ------- .eslintrc.local.cjs | 6 ++++++ .gitignore | 3 ++- package.json | 19 ++++++++++++++----- scripts/template-oss/index.js | 23 ----------------------- scripts/template-oss/package-json.hbs | 10 ---------- 6 files changed, 22 insertions(+), 46 deletions(-) delete mode 100644 scripts/template-oss/index.js delete mode 100644 scripts/template-oss/package-json.hbs diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e8fbb41..f21d26e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -12,14 +12,7 @@ module.exports = { root: true, ignorePatterns: [ 'tap-testdir*/', - 'dist/', ], - parser: '@typescript-eslint/parser', - settings: { - 'import/resolver': { - typescript: {}, - }, - }, extends: [ '@npmcli', ...localConfigs, diff --git a/.eslintrc.local.cjs b/.eslintrc.local.cjs index aed63cb..cff40b4 100644 --- a/.eslintrc.local.cjs +++ b/.eslintrc.local.cjs @@ -1,4 +1,10 @@ module.exports = { + parser: '@typescript-eslint/parser', + settings: { + 'import/resolver': { + typescript: {}, + }, + }, overrides: [{ files: ['test/fixtures/*.ts'], rules: { diff --git a/.gitignore b/.gitignore index ffb3f21..e244d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,10 +14,12 @@ tap-testdir*/ !/.gitignore !/.npmrc !/.release-please-manifest.json +!/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md !/CONTRIBUTING.md !/docs/ +!/lib/ !/LICENSE* !/map.js !/package.json @@ -25,7 +27,6 @@ tap-testdir*/ !/release-please-config.json !/scripts/ !/SECURITY.md -!/src/ !/tap-snapshots/ !/test/ !/tsconfig.json diff --git a/package.json b/package.json index d3badee..7e072c0 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,12 @@ }, "scripts": { "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "lintfix": "npm run lint -- --fix", "postlint": "template-oss-check", - "posttest": "npm run lint", "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", "test": "tap", - "snap": "tap" + "posttest": "npm run lint" }, "keywords": [ "npm registry", @@ -34,10 +34,11 @@ "@typescript-eslint/parser": "^7.8.0", "eslint-import-resolver-typescript": "^3.6.1", "tap": "^18.7.3", - "tshy": "^1.14.0", "typescript": "^5.4.5" }, "files": [ + "bin/", + "lib/", "types/" ], "repository": { @@ -47,7 +48,15 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "4.22.0", - "content": "./scripts/template-oss", + "allowPaths": [ + "/types/" + ], + "distPaths": [ + "types/" + ], + "latestCiVersion": 18, + "windowsCI": false, + "macCI": false, "publish": true }, "type": "module", diff --git a/scripts/template-oss/index.js b/scripts/template-oss/index.js deleted file mode 100644 index 9f257d3..0000000 --- a/scripts/template-oss/index.js +++ /dev/null @@ -1,23 +0,0 @@ -export default { - rootRepo: { - add: { - 'tsconfig.json': false, - }, - }, - rootModule: { - add: { - 'package.json': { - file: 'package-json.hbs', - overwrite: false, - }, - - }, - }, - typescript: true, - allowPaths: [ - '/types/', - ], - latestCiVersion: 18, - windowsCI: false, - macCI: false, -} diff --git a/scripts/template-oss/package-json.hbs b/scripts/template-oss/package-json.hbs deleted file mode 100644 index 1059cb9..0000000 --- a/scripts/template-oss/package-json.hbs +++ /dev/null @@ -1,10 +0,0 @@ -{ - "scripts": { - "prepare": {{{ del }}}, - "build": {{{ del }}}, - "pretest": {{{ del }}} - }, - "files": [ - "types/" - ] -}