@synergycodes/eslint-config
v3.0.0
Published
It's recommended code style for Synergy Codes organization
Downloads
627
Keywords
Readme
@synergycodes/eslint-config
It's recommended code style for Synergy Codes organization. Installation section describes how to setup eslint in typescript environment.
Installation
Open your terminal window and type
npm install typescript eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import @synergycodes/eslint-config --save-dev
Create .eslintrc.json
file in main directory of your project with this minimal content:
{
"extends": "@synergycodes/eslint-config",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 7
}
}
Linting
To lint your project it's nice to intergate that with your existing workflow ex. using eslint-loader in webpack. It can be easily run in console using following cmd
npx eslint . --ext .ts,.tsx
It runs linter for typescript files.
Plugins
There are bunch of plugins that helps using eslint
- eslint-loader - usage of eslint by webpack
- ESLint Visual Studio Plugin - Visual Studio Code eslint rules validation