-
Notifications
You must be signed in to change notification settings - Fork 586
Open
Description
Currently the linting in this repo works like this:
npm run lint
at the top-level runsnpm run lint
in each of the packages in the workspace- these all run eslint using a shared "eslint.config.js" from the top-level (which includes the "prettier" plugin for style, including using the "prettier.config.js" at the top-level)
This issue is about:
- Including JS and TS files in
examples/...
, linted vianpm run lint
and using the same shared config files. (Currently there is anpm run lint:examples
, but it (a) is not run in CI and (b) uses a different eslint config ("examples/.eslintrc"). - Linting JS files (in addition to the TS files that are already linted) elsewhere in the repo. There aren't many: mostly these are
.../test/fixtures/*.mjs
files for testing ESM instrumentation.
The plan is to:
- Update the eslint.config.js to support linting .js and .mjs files. Currently it just works for TS files.
DONE in chore(eslint): lint examples/bunyan and prepare for linting .js and .mjs files #2567 - Work through each of the
examples/*
packages addingnpm run lint
andnpm run lint:fix
using the top-level shared eslint config file; and getting that lint passing.- examples/bunyan (chore(eslint): lint examples/bunyan and prepare for linting .js and .mjs files #2567)
- examples/connect (chore(examples): lint examples/connect using shared top-level eslint config #2897)
- examples/dns (chore(examples): lint examples/dns using shared top-level eslint config #2898)
- examples/express (chore(examples): lint examples/express using shared top-level eslint config #2894)
- examples/fastify (chore(examples): lint examples/fastify using shared top-level eslint config #2896)
- examples/graphql (chore(examples): lint examples/graphql using shared top-level eslint config #2899)
- examples/grpc-census-prop (chore(examples): lint examples/grpc-census-prop using shared top-level eslint config #2900)
- examples/hapi (chore(examples): lint examples/hapi using shared top-level eslint config #2892)
- examples/host-metrics (chore(examples): lint examples/host-metrics using shared top-level eslint config #2901)
- examples/ioredis (chore(examples): lint examples/ioredis using shared top-level eslint config #2902)
- examples/koa (chore(examples): lint examples/koa using shared top-level eslint config #2903)
- examples/memcached (chore(examples): lint examples/memcached using shared top-level eslint config #2904)
- examples/meta-node (chore(examples): lint examples/meta-node using shared top-level eslint config #2905)
- examples/mongodb (chore(examples): lint examples/mongodb using shared top-level eslint config #2906)
- examples/mysql (chore(examples): lint examples/mysql using shared top-level eslint config #2907)
- examples/network (chore(examples): lint examples/network using shared top-level eslint config #2908)
- examples/react-load/preact & examples/react-load/react (chore(examples): lint examples/react-load using shared top-level eslint config #2913)
- examples/redis (chore(examples): lint examples/redis using shared top-level eslint config #2909)
-
examples/restify(I'm proposing we drop this example: chore(examples): drop examples/restify #2910) - examples/router (chore(examples): lint examples/router using shared top-level eslint config #2911)
- examples/web (chore(examples): lint examples/web using shared top-level eslint config #2912)
- Add
npm run lint:examples
to thenpm run lint
that is run in CI. (chore(examples): lint examples/ using shared top-level eslint config; add lint:examples to 'npm run lint' #2919) - Change
npm run lint
in the workspace packages to also lint .mjs (and maybe .js) files -- at least in packages that have JS files and not just TS files. chore: lint .js and .mjs files (in addition to the existing .ts file linting) #2940
(The original work for this started in #2567.)
Metadata
Metadata
Assignees
Labels
No labels