eslint-config-myconfig
An ESLint config that I use in all of my projects. Contains rules for JavaScript, TypeScript and
React.
Installation
npm install --save-dev @sachinahya/eslint-config-myconfig
Usage
Extend one or more of the presets below in your ESLint config file.
{
"extends": ["myconfig/typescript", "myconfig/react"]
}
Presets
myconfig
or myconfig/javascript
Enables JavaScript-related rules.
Peer dependencies: eslint-plugin-sonarjs,
eslint-plugin-jsdoc
myconfig/typescript
Enables TypeScript linting rules. Also enables the myconfig/javascript
preset.
Peer dependencies: @typescript-eslint/eslint-plugin,
@typescript-eslint/eslint-parser
myconfig/typescript-type-checking
Used in addition with myconfig/typescript
, adds rules requiring type checking. Does not require
any additional dependencies.
Assumes your
tsconfig.json
is located in the same directory as your ESLint config. You can
customise this
if you need to.
myconfig/react
Enables rules for linting React code.
Peer dependencies: eslint-plugin-react,
eslint-plugin-react-hooks,
eslint-plugin-jsx-a11y