Skip to content

Instantly share code, notes, and snippets.

@nhunzaker
Created January 4, 2018 22:01
Show Gist options
  • Save nhunzaker/757c4e95009a9eb5d77ae5f2266c11de to your computer and use it in GitHub Desktop.
Save nhunzaker/757c4e95009a9eb5d77ae5f2266c11de to your computer and use it in GitHub Desktop.
var isIntegration = !!process.env.CI
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
jest: true,
jasmine: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
}
},
extends: ['eslint:recommended'],
plugins: ['jsx-a11y', 'react', 'jest'],
rules: {
semi: ['warn', 'never'],
'no-console': 'off',
'no-debugger': isIntegration ? 'error' : 'off',
'no-unused-vars': [
1,
{ args: 'none', ignoreRestSiblings: true, varsIgnorePattern: '^_' }
],
'react/jsx-equals-spacing': ['warn', 'never'],
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': [
'warn',
{
allowAllCaps: true,
ignore: []
}
],
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-danger-with-children': 'warn',
'react/no-deprecated': 'warn',
'react/no-direct-mutation-state': 'warn',
'react/no-is-mounted': 'warn',
'react/react-in-jsx-scope': 'error',
'react/require-render-return': 'warn',
'react/style-prop-object': 'warn',
'no-return-assign': 'error',
'jest/no-focused-tests': isIntegration ? 'error' : 'warn'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment