From 3fca74f484b683ec204350d491a4eb201e882b85 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Sat, 4 Nov 2023 21:19:48 -0700 Subject: [PATCH] fix: always lint all js-ish extensions --- lib/content/package-json.hbs | 2 +- package.json | 2 +- .../test/apply/source-snapshots.js.test.cjs | 12 ++++++------ tap-snapshots/test/check/snapshots.js.test.cjs | 8 ++++---- workspace/test-workspace/package.json | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/content/package-json.hbs b/lib/content/package-json.hbs index 59d33551..28630c51 100644 --- a/lib/content/package-json.hbs +++ b/lib/content/package-json.hbs @@ -2,7 +2,7 @@ "author": "GitHub Inc.", "files": {{{ json distPaths }}}, "scripts": { - "lint": "{{#if eslint}}eslint \"**/*.js\"{{else}}echo linting disabled{{/if}}", + "lint": "{{#if eslint}}eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"{{else}}echo linting disabled{{/if}}", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "{{ localNpmPath }} run lint -- --fix", diff --git a/package.json b/package.json index 68f72d83..12ea08a6 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "template-oss-release-manager": "bin/release-manager.js" }, "scripts": { - "lint": "eslint \"**/*.js\"", + "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", "lintfix": "npm run lint -- --fix", "posttest": "npm run lint", "snap": "tap", diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index 08baad90..49199804 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -1632,7 +1632,7 @@ package.json "name": "testpkg", "version": "1.0.0", "scripts": { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -3716,7 +3716,7 @@ package.json "workspaces/b" ], "scripts": { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -3863,7 +3863,7 @@ workspaces/a/package.json "name": "a", "version": "1.0.0", "scripts": { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -3943,7 +3943,7 @@ workspaces/b/package.json "name": "b", "version": "1.0.0", "scripts": { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -5555,7 +5555,7 @@ workspaces/a/package.json "name": "a", "version": "1.0.0", "scripts": { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -5635,7 +5635,7 @@ workspaces/b/package.json "name": "b", "version": "1.0.0", "scripts": { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", diff --git a/tap-snapshots/test/check/snapshots.js.test.cjs b/tap-snapshots/test/check/snapshots.js.test.cjs index bd280ee0..d52c6cb2 100644 --- a/tap-snapshots/test/check/snapshots.js.test.cjs +++ b/tap-snapshots/test/check/snapshots.js.test.cjs @@ -73,7 +73,7 @@ The module file package.json needs to be updated: "lib/" ] "scripts" is missing, expected { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -325,7 +325,7 @@ The module file package.json needs to be updated: "lib/" ] "scripts" is missing, expected { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -401,7 +401,7 @@ The module file package.json needs to be updated: "lib/" ] "scripts" is missing, expected { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", @@ -470,7 +470,7 @@ The module file package.json needs to be updated: "lib/" ] "scripts" is missing, expected { - "lint": "eslint /"**/*.js/"", + "lint": "eslint /"**/*.{js,cjs,ts,mjs,jsx,tsx}/"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", diff --git a/workspace/test-workspace/package.json b/workspace/test-workspace/package.json index 40083ec6..4f304a50 100644 --- a/workspace/test-workspace/package.json +++ b/workspace/test-workspace/package.json @@ -6,7 +6,7 @@ "private": true, "scripts": { "test": "tap", - "lint": "eslint \"**/*.js\"", + "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix",