Last active
October 7, 2022 15:44
-
-
Save Empyritz/426fa2435562549c38b346240c41934f to your computer and use it in GitHub Desktop.
Config Vs.Code/Eslint/Prettier
This file contains 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
settings.json = { | |
{ | |
"workbench.iconTheme": "vscode-icons", | |
"terminal.integrated.defaultProfile.windows": "Git Bash", | |
"editor.fontFamily": "Consolas ", | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
// "editor.codeActionsOnSave": { | |
// "source.fixAll.eslint": true | |
// }, | |
// "editor.defaultFormatter": "esbenp.prettier-vscode", | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[html]": { | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": false, | |
"editor.formatOnSave": true | |
} | |
}, | |
"[css]": { | |
"editor.formatOnSave": true | |
}, | |
"[javascriptreact]": { | |
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | |
"editor.codeActionsOnSave": { | |
"source.fixAll": false | |
} | |
}, | |
"[typescriptreact]": { | |
// "editor.defaultFormatter": "jonwolfe.prettier-eslint-formatter", | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": false | |
} | |
}, | |
"workbench.colorTheme": "Darcula Theme from IntelliJ", | |
"editor.tabSize": 2, | |
"window.zoomLevel": 1, | |
"prettier.printWidth": 90, | |
"prettier.singleQuote": true | |
} | |
} | |
.eslintrc = { | |
env: { | |
browser: true, | |
commonjs: true, | |
es2021: true, | |
}, | |
// extends: ['eslint:recommended', ['plugin:prettier/recommendeds']], | |
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'plugin:react', 'standard-jsx'], | |
plugins: ['prettier', 'react', 'react-hooks'], | |
overrides: [], | |
parserOptions: { | |
ecmaVersion: 'latest', | |
}, | |
rules: { | |
//this is auto configurate with extends: 'plugin:prettier/recommended' | |
// 'arrow-body-style': 'off', | |
// 'prefer-arrow-callback': 'off', | |
}, | |
} | |
prettier = { | |
"useTabs": false, | |
"tabWidth": 2, | |
"singleQuote": true, | |
"printWidth": 100, | |
"trailingComma": "es5" | |
} | |
//USED WITH HUSKY GIT PRECOMMIT | |
.lintstagedrc = { | |
"**/.{html, css}": "prettier --write --ignore-unknown", | |
"**/.{js}": "eslint --cache --fix" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment