Last active
June 22, 2020 12:50
-
-
Save hboylan/3e707e1bb12b09388540779a25d217ae to your computer and use it in GitHub Desktop.
ESLint + Prettier configuration for VS Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": ["prettier"], | |
"plugins": ["prettier"], | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module" | |
}, | |
"rules": { | |
"prettier/prettier": "error" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"semi": false, | |
"singleQuote": true, | |
"tabWidth": 2, | |
"trailingComma": "all" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code --install-extension esbenp.prettier-vscode | |
code --install-extension dbaeumer.vscode-eslint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i -D \ | |
@typescript-eslint/eslint-plugin \ | |
@typescript-eslint/parser \ | |
eslint \ | |
eslint-config-prettier \ | |
eslint-plugin-prettier \ | |
prettier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"lint": "eslint src/**/*.ts" | |
}, | |
"devDependencies": { | |
"@typescript-eslint/eslint-plugin": "^2.12.0", | |
"@typescript-eslint/parser": "^2.12.0", | |
"eslint": "^6.7.2", | |
"eslint-config-prettier": "^6.7.0", | |
"eslint-plugin-prettier": "^3.1.2", | |
"prettier": "^1.19.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment