Add linting rules for formatting JSX. (#12810) (#13125)

* Add linting rules for formatting JSX.
* Bump eslint config version to 0.8.0.
This commit is contained in:
CJ Cenizal 2017-07-26 08:57:49 -07:00 committed by GitHub
parent 739360aac9
commit 223d9d951e
2 changed files with 18 additions and 2 deletions

View file

@ -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',
@ -106,4 +122,4 @@ module.exports = {
'import/no-named-as-default-member': 'error',
'import/no-duplicates': 'error',
}
}
}

View file

@ -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": {