My go to eslint config for typescript & prettier
Some opinionated style & type rules built on top of eslint-config-standard-typescript-prettier
See ./.eslintrc.js
Pros:
Cons:
Install it.
pnpm add -D eslint-config-nfour
Wire it up.
echo "module.exports = require('eslint-config-nfour')" > .eslintrc.js
# OR with react rules...
echo "module.exports = require('eslint-config-nfour/.eslintrc.react')" > .eslintrc.js
Configure .prettierrc.js
with something like:
module.exports = {
...require('eslint-config-nfour/.prettierrc'),
semi: false,
}
Done.
Thanks to require('@rushstack/eslint-patch/modern-module-resolution');
, plugins can be included relative to the configs, not the consuming project, so you don't need to install any eslint plugins/config peer dependencies.