mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 22:08:08 -05:00
[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:
@@ -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
|
||||
|
||||
4
packages/eslint-config-airbnb/rules/react.js
vendored
4
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user