mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* Add linting rules for formatting JSX. * Bump eslint config version to 0.8.0.
This commit is contained in:
parent
739360aac9
commit
223d9d951e
2 changed files with 18 additions and 2 deletions
|
@ -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',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue