Skip to content

Instantly share code, notes, and snippets.

@xavierartot
Created April 28, 2018 18:10
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 xavierartot/25fd6355ca313e381359649211caec60 to your computer and use it in GitHub Desktop.
Save xavierartot/25fd6355ca313e381359649211caec60 to your computer and use it in GitHub Desktop.
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"react/jsx-uses-vars": 1,
"no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.object.name='console'][callee.property.name=/^(log|warn|error|info|trace)$/]",
"message": "Unexpected property on console object was called"
}
],
"linebreak-style": [
"error",
"unix"
],
"semi": [
"error",
"always"
],
'import/no-named-as-default': 0,
'react/jsx-indent': [1, 2], // warning & 2 spaces
'react/prefer-stateless-function': 0,
'react/jsx-filename-extension': 0,
'no-unused-vars': 1,
'jsx-a11y/anchor-is-valid': 1,
quotes: [2, 'single'],
'class-methods-use-this': 0,
'no-console': 0,
'no-return-assign': 1,
'react/no-unused-state': 1,
}
};
module.exports = {
parser: 'babel-eslint',
parserOptions: {
allowImportExportEverywhere: false,
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'react',
],
extends: [
'airbnb',
// "eslint:recommended"
'plugin:react/recommended',
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment