eslint sharable config for tsdocstandard
This repository contains the rules. For the tsdocstandard
command go look at tsdocstandard
These rules were written to help convert vanilla JS to fully
typed .js
+ @jsdoc
with TypeScript
.
You will get a LOT of lint failures about missing type annotations. That's the whole point.
If the linter passes you probably have 100% type-coverage
which
is awesome.
I recommend using // @ts-check
& // @ts-nocheck
for partial
migration from JS => "typed JS + jsdoc".
There is another eslint config that includes typescript
However, that config is meant for linting *.ts
typescript files using standard
and eslint. This set of config is specifically for linting *.js
files
that use tsc --checkJs
and @jsdoc
comments.
The rules for typescript & javascript files are quite divergent and it's hard to have meaningful overlap.
If you have bikeshedding suggestions about the rules please open an issue or PR.
npm install -D eslint-config-tsdocstandard
# note that eslint-plugin-promise, eslint-plugin-standard, eslint-plugin-node, eslint-plugin-import & eslint-config-standard are required peer dependencies
Read up on how to use sharable configs at the eslint website.
For more details see eslint-config-standard
Contributions welcome! Please read the contributing guidelines first.