Skip to content

Instantly share code, notes, and snippets.

@Empyritz
Last active October 7, 2022 15:44
Show Gist options
  • Save Empyritz/426fa2435562549c38b346240c41934f to your computer and use it in GitHub Desktop.
Save Empyritz/426fa2435562549c38b346240c41934f to your computer and use it in GitHub Desktop.
Config Vs.Code/Eslint/Prettier
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