Skip to content

Instantly share code, notes, and snippets.

@marclove
Created March 22, 2019 18:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marclove/4a09189c9165180fcce6b006aae4248f to your computer and use it in GitHub Desktop.
Save marclove/4a09189c9165180fcce6b006aae4248f to your computer and use it in GitHub Desktop.
ESLint + Prettier + VSCode Configuration
{
"plugins": ["prettier"],
"extends": [
"plugin:prettier/recommended",
"plugin:jest/recommended"
],
"rules": {
// only rules that don't conflict with the rules declared in .prettierrc
}
// other eslint stuff
}
{
"printWidth": 120,
"trailingComma": "all",
"singleQuote": true,
"bracketSpacing": true
}
ESLint (dbaeumer.vscode-eslint)
Prettier (esbenp.prettier-vscode)
TSLint (ms-vscode.vscode-typescript-tslint-plugin)
"devDependencies": {
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.0",
"prettier": "^1.16.4",
}
{
"files.autoSave": "onFocusChange",
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"eslint.enable": true,
"eslint.autoFixOnSave": true,
"prettier.eslintIntegration": true,
"prettier.requireConfig": true,
"tslint.jsEnable": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment