An ESLint Shareable Config
npm install eslint-config-tcd eslint
# OR
yarn add eslint-config-tcd eslint
Shareable configs are designed to work with the extends
feature of .eslintrc
files.
You can learn more about
Shareable Configs on the
official ESLint website.
To use this shareable config, first run this:
npm install --save-dev eslint eslint-config-tcd
# OR
yarn add --dev eslint eslint-config-tcd
Then, add this to your .eslintrc(.js|.json|.yml) file:
{
"extends": "tcd"
}
Note: We omitted the /eslint-config
sufix since it is automatically assumed by ESLint. Only works for esnext since its specified as default
You can override settings from the shareable config by adding them directly into your
.eslintrc
file.
-
tcd/configs/esnext
- ES6+ config -
tcd/configs/node
- ES6+ NodeJS config -
tcd/configs/react
- React config; Requires eslint-plugin-react, eslint-plugin-jsx-a11y, eslint-plugin-react-hooks -
tcd/configs/ts
- TypeScript config; Requires typescript, @typescript-eslint/eslint-plugin, @typescript-eslint/parser -
tcd/configs/next
- NextJS config; Requires @next/eslint-plugin-next, eslint-plugin-react, eslint-plugin-jsx-a11y, eslint-plugin-react-hooks