Instantly share code, notes, and snippets.

Embed
What would you like to do?
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