Skip to content

Commit

Permalink
Add linting rules for formatting JSX. (#12810)
Browse files Browse the repository at this point in the history
* Add linting rules for formatting JSX.
* Bump eslint config version to 0.8.0.
  • Loading branch information
cjcenizal authored Jul 26, 2017
1 parent fbec367 commit b3ffd99
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
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',
}
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/eslint-config-kibana",
"version": "0.7.0",
"version": "0.8.0",
"description": "The eslint config used by the kibana team",
"main": ".eslintrc.js",
"scripts": {
Expand Down

0 comments on commit b3ffd99

Please sign in to comment.