Skip to content

Instantly share code, notes, and snippets.

@faisalmahmud
Last active April 1, 2021 14:02
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 faisalmahmud/3d5946a7923434671c1ca17a5740aa4e to your computer and use it in GitHub Desktop.
Save faisalmahmud/3d5946a7923434671c1ca17a5740aa4e to your computer and use it in GitHub Desktop.
Template for .eslintrc.js, .prettierrc.js, settings.json in VS Code
module.exports = {
parser: "babel-eslint",
plugins: ["react", "prettier"],
rules: {
"prettier/prettier": "error"
},
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true
}
},
extends: ["eslint:recommended", "plugin:react/recommended", "airbnb-base"]
};
// npm install --save-dev babel-eslint eslint-config-airbnb-base eslint-plugin-react
// yarn add --dev babel-eslint eslint-config-airbnb-base eslint-plugin-react
module.exports = {
printWidth: 80,
parser: "flow"
};
// npm install --save-dev prettier eslint-plugin-prettier eslint-config-prettier
// yarn add --dev prettier eslint-plugin-prettier eslint-config-prettier
{
"javascript.format.enable": false,
"prettier.eslintIntegration": true,
"[javascript]": {
"editor.formatOnSave": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment