Skip to content

Commit

Permalink
Add linting rules for formatting JSX.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Jul 26, 2017
1 parent fbec367 commit 12405b9
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,25 @@ module.exports = {
'babel/object-curly-spacing': [ 'error', 'always' ],

'react/jsx-uses-react': 'error',
'react/react-in-jsx-scope': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
'react/jsx-closing-tag-location': 'error',
'react/jsx-indent-props': ['error', 2],
'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }],
'react/jsx-no-duplicate-props': ['error', { ignoreCase: true }],
'react/self-closing-comp': 'error',
'react/jsx-wrap-multilines': ['error', {
declaration: true,
assignment: true,
return: true,
arrow: true,
}],
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
'react/jsx-equals-spacing': ['error', 'never'],
'react/jsx-indent': ['error', 2],

'mocha/handle-done-callback': 'error',
'mocha/no-exclusive-tests': 'error',
Expand All @@ -106,4 +122,4 @@ module.exports = {
'import/no-named-as-default-member': 'error',
'import/no-duplicates': 'error',
}
}
}

0 comments on commit 12405b9

Please sign in to comment.