@mangoweb/eslint-config-ts
v0.0.1
Published
ESLint configuration using Prettier designed for TS.
Downloads
5
Keywords
Readme
@mangoweb/eslint-config-ts
ESLint configuration using Prettier designed for TS.
Installation
- Install the config:
$ npm install @mangoweb/eslint-config-ts --save-dev
- And its peer dependencies:
$ npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --save-dev
- If you want to use the manGoweb prettier config, also run
$ npm install @mangoweb/prettier-config --save-dev
⚠️ You might want to also fix the package version so that any potential future backwards incompatibilities don't break your build. This package is generally intended for live development with the occasional BC break. Should that affect your application because you failed to fix the version, that's on you.
Usage
- Create a
.prettierrc.js
file in your project root:module.exports = { ...require("@mangoweb/prettier-config"), // Or something else // Add any project-specific overrides // E.g. semi: false }
- Create a
.eslintrc.js
in your project root:module.exports = { extends: [ '@mangoweb/eslint-config-ts', ] }
- Configure your ide to use these files. It will likely find them automatically though.
Optionally, also add these to your package.json
:
{
"scripts": {
"eslint:lint": "eslint \"src/**/*.{ts,tsx}\" ",
"eslint:fix": "eslint --fix \"src/**/*.{ts,tsx}\" "
}
}
That's it!