Skip to content

Instantly share code, notes, and snippets.

@pmcelhaney
Created July 31, 2022 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmcelhaney/3f18f2e9f0f96f02015c914c83a6095a to your computer and use it in GitHub Desktop.
Save pmcelhaney/3f18f2e9f0f96f02015c914c83a6095a to your computer and use it in GitHub Desktop.
// Put this file in a directory where all of the ESLint repos are checked out
import fs from "fs/promises";
const packages = await fs.readdir("./");
const scripts = await Promise.all(
packages.map((directory) =>
fs
.readFile(`./${directory}/package.json`, "utf-8")
.then(JSON.parse, () => ({ scripts: {} }))
.then((p) => [directory, p.scripts])
)
);
const scriptNames = {};
scripts.forEach(([directory, scriptObject]) => {
Object.entries(scriptObject).forEach(([scriptName, script]) => {
scriptNames[scriptName] ??= [];
scriptNames[scriptName].push(directory);
});
});
const output = Object.entries(scriptNames).sort(([a], [b]) => a.localeCompare(b)).map(([scriptName, directories]) => `${scriptName.padEnd(35, " ")};${directories.join(", ")}`).join("\n");
process.stdout.write(output + '\n')
build ;eslint.org, eslintrc, espree, playground
build:eleventy ;eslint.org, playground
build:sass ;eslint.org, playground
build:webpack ;eslint.org, playground
coveralls ;doctrine
docs:update-links ;eslint
eslint:github-action ;github-action
fetch ;eslint.org
fetch:sponsors ;eslint.org
fetch:stats ;eslint.org
fetch:team ;eslint.org
fix ;eslint, eslint.org, eslintrc, playground
fix:docsjs ;eslint
fixlint ;espree
fuzz ;eslint
generate-alpharelease ;create-config, doctrine, eslint, eslint-plugin-markdown, eslint-transforms, eslintrc, espree, github-action, typescript-eslint-parser
generate-betarelease ;create-config, doctrine, eslint, eslint-plugin-markdown, eslint-transforms, eslintrc, espree, github-action, typescript-eslint-parser
generate-rcrelease ;create-config, doctrine, eslint, eslint-plugin-markdown, eslint-transforms, eslintrc, espree, github-action, typescript-eslint-parser
generate-release ;create-config, doctrine, eslint, eslint-plugin-markdown, eslint-transforms, eslintrc, espree, github-action, typescript-eslint-parser
generate-transcript ;tsc-meetings
gensite ;eslint
images ;eslint.org, playground
install:playground ;eslint.org, playground
integration-tests ;typescript-eslint-parser
jest ;typescript-eslint-parser
kill-integration-test-containers ;typescript-eslint-parser
lint ;create-config, doctrine, eslint, eslint-canary, eslint-cli, eslint-plugin-markdown, eslint-tester, eslint-transforms, eslint.org, eslintrc, espree, github-action, playground, tsc-meetings, typescript-eslint-parser
lint:docsjs ;eslint
lint:fix ;tsc-meetings
major ;eslint-tester
minor ;eslint-tester
new-rule-format ;eslint-transforms
patch ;eslint-tester
perf ;eslint
postinstall ;playground
postversion ;eslint-cli
prepare ;eslint-plugin-markdown, eslintrc
prepublishOnly ;espree
pretest ;doctrine, espree
publish-release ;create-config, doctrine, eslint, eslint-plugin-markdown, eslint-transforms, eslintrc, espree, github-action, typescript-eslint-parser
start ;eslint.org, playground
sync-docs ;espree
test ;create-config, doctrine, eslint, eslint-canary, eslint-plugin-markdown, eslint-tester, eslint-transforms, eslintrc, espree, github-action, package-json-analyzer, typescript-eslint-parser
test-cov ;eslint-plugin-markdown
test:cli ;eslint
test:cov ;create-config
unit ;espree
unit:cjs ;espree
unit:esm ;espree
update-tag ;github-action
update-version ;espree
validate-projects ;eslint-canary
watch:eleventy ;eslint.org, playground
watch:sass ;eslint.org, playground
watch:webpack ;eslint.org, playground
webpack ;eslint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment