Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.18 KB

CONTRIBUTING.md

File metadata and controls

43 lines (30 loc) · 1.18 KB

How to contribute to ESGrep

Contribute

Clone the repo

git clone [email protected]:ninofiliu/esgrep
cd esgrep

Install dependencies with pnpm

pnpm install

ESGrep uses typescript-estree for the parsing, which can convert .js/.ts/.jsx/.tsx files into an abstract syntax tree (AST) in the estree format. Contributors are encouraged to get familiar with these concepts and libs, but thre ESGrep code itself is fairly simple:

The CLI entry point is src/cli/node.ts. During dev, you can run it with tsx:

tsx src/cli/node.ts --format=count 'const isNode = ES_ANY' src/lib.ts

We use jest for testing and run them with

pnpm test

If all looks good, you are welcomed to submit your pull request.

Build and release

pnpm test
tsx src/cli/node.ts 'const isNode = ES_ANY' src/lib.ts
pnpm build
node dist/cli/node.js 'const isNode = ES_ANY' src/lib.ts
pnpm version (patch|minor|major)
pnpm publish