[eslint config] [fix] jsx should be enabled via parserOptions, not via a root ecmaFeatures.

From https://github.com/airbnb/javascript/issues/1410#issuecomment-303368921
This commit is contained in:
Jordan Harband
2017-05-23 12:53:26 -07:00
parent 0dd3dbd7b6
commit f86aacae44
2 changed files with 7 additions and 5 deletions

View File

@@ -3,9 +3,13 @@ module.exports = {
'jsx-a11y',
'react'
],
ecmaFeatures: {
jsx: true
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
rules: {
// Enforce that anchors have content
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md

View File

@@ -2,14 +2,12 @@ module.exports = {
plugins: [
'react',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
ecmaFeatures: {
jsx: true,
},
// View link below for react rules documentation
// https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules