Skip to content

Instantly share code, notes, and snippets.

@tannerlinsley
Created May 15, 2017 19:34
Show Gist options
  • Save tannerlinsley/f4f5c9b5c81a5a574df47d0fde6c670a to your computer and use it in GitHub Desktop.
Save tannerlinsley/f4f5c9b5c81a5a574df47d0fde6c670a to your computer and use it in GitHub Desktop.
prettier-eslint weirdness
module.exports = {
parserOptions: {
ecmaVersion: 8,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
node: false
},
sourceType: 'module'
},
extends: ['standard'],
plugins: ['react'],
rules: {
// Nozzle
'jsx-quotes': [2, 'prefer-single'],
// React
'react/jsx-boolean-value': 'error',
'react/jsx-curly-spacing': ['error', 'never'],
'react/jsx-equals-spacing': ['error', 'never'],
'react/jsx-indent': ['error', 2],
'react/jsx-indent-props': ['error', 2],
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-tag-spacing': [
'error',
{
closingSlash: 'never',
beforeSelfClosing: 'always',
afterOpening: 'never'
}
],
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/self-closing-comp': 'error',
'react/jsx-no-bind': [
'error',
{
allowArrowFunctions: true,
allowBind: false,
ignoreRefs: true
}
],
'react/no-did-update-set-state': 'error',
'react/no-unknown-property': 'error',
'react/react-in-jsx-scope': 'error',
'react/jsx-closing-bracket-location': [2, 'tag-aligned'],
'react/jsx-tag-spacing': ['error', { beforeSelfClosing: 'always' }],
'react/jsx-wrap-multilines': 2,
'react/self-closing-comp': 2,
'react/display-name': 2,
'react/jsx-key': 2,
'react/jsx-no-comment-textnodes': 2,
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-target-blank': 2,
'react/jsx-no-undef': 2,
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/no-danger-with-children': 2,
'react/no-deprecated': 2,
'react/no-direct-mutation-state': 2,
'react/no-find-dom-node': 2,
'react/no-is-mounted': 2,
'react/no-render-return-value': 2,
'react/no-string-refs': 2,
'react/no-unknown-property': 2,
'react/react-in-jsx-scope': 2,
'react/require-render-return': 2,
'react/jsx-max-props-per-line': [0, { maximum: 1 }]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment