1.5.0 • Published 2 years ago

eslint-config-mdh-typescript-react v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

eslint-config-mdh-typescript-react

Eslint config for TypeScript React 🏄🏻

Usage

After installation, make sure to remove all the eslint and prettier related dependencies.

Add eslint-config-mdh-typescript-react as part of extends in .eslintrc.js after installing the module.

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: ['eslint-config-mdh-typescript-react'],
  parserOptions: {
    project: './tsconfig.json',
  },
  overrides: [{ files: ['**/*.ts'] }],
  rules: {},
}

To use prettier, add "prettier": "eslint-config-mdh-typescript-react/prettier" to package.json.

Troubleshooting

If we are getting the error below, we can add the file into .eslintignore.

✖ eslint --ext js,jsx,ts,tsx --fix:

/../../../.eslintrc.js
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: .eslintrc.js.
The file must be included in at least one of the projects provided

Other things

If you like this config, checkout eslint-config-mdh-typescript-backend for backend code🛸🛸🛸