Skip to content

Instantly share code, notes, and snippets.

@j0hnm4r5
Last active August 2, 2018 20:27
Show Gist options
  • Save j0hnm4r5/24e484303746ff019f22af2030a2ed7e to your computer and use it in GitHub Desktop.
Save j0hnm4r5/24e484303746ff019f22af2030a2ed7e to your computer and use it in GitHub Desktop.
Style & Linting
{
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:promise/recommended",
"plugin:unicorn/recommended",
"plugin:prettier/recommended",
"prettier/react"
],
"plugins": [
"import",
"no-use-extend-native",
"promise",
"unicorn"
],
"rules": {
"prettier/prettier": "error",
"quotes": ["error", "backtick"],
"no-console": "off",
"no-plusplus": "off",
"react/prop-types": "off",
"prefer-const": "error",
"prefer-template": "error",
"import/first": "off",
"unicorn/filename-case": "off",
"radix": "off",
"react/destructuring-assignment": "off",
"import/prefer-default-export": "off",
"no-use-before-define": "off"
}
}
{
"printWidth": 70,
"tabWidth": 4,
"useTabs": true,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
}

Quick Start

In VSCode, ensure the following extensions are installed:

When starting a new project, run this line:

yarn add --dev babel-eslint eslint eslint-config-airbnb eslint-plugin-jsx-a11y eslint-config-prettier eslint-formatter-pretty eslint-plugin-import eslint-plugin-no-use-extend-native eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-unicorn esm prettier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment