Skip to content

Instantly share code, notes, and snippets.

@timofei7
Created June 8, 2016 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timofei7/21ac43d41e506429495c7368f0b40cc7 to your computer and use it in GitHub Desktop.
Save timofei7/21ac43d41e506429495c7368f0b40cc7 to your computer and use it in GitHub Desktop.
cs52: eslintrc for react with es6 and airbnb
{
extends: "airbnb",
parser: "babel-eslint",
env: {
browser: true,
node: true,
es6: true
},
rules: {
strict: 0,
quotes: [2, "single"],
no-else-return: 0,
new-cap: ["error", {"capIsNewExceptions": ["Router"]}],
no-console: 0,
import/no-unresolved: [2, { commonjs: true}],
no-unused-vars: ["error", { "vars": "all", "args": "none" }],
no-underscore-dangle: 0,
arrow-body-style: 0,
one-var: ["error", { uninitialized: "always", initialized: "never" }],
one-var-declaration-per-line: ["error", "initializations"],
max-len: ["error", 200],
no-extra-parens: 0,
react/jsx-uses-react: 2,
react/jsx-uses-vars: 2,
react/react-in-jsx-scope: 2,
react/prop-types: 0,
react/jsx-first-prop-new-line: 0
},
plugins: [
"react"
],
ecmaFeatures: {
jsx: true,
modules: true
}
}
//npm install --save-dev eslint eslint-plugin-react babel-eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment