-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Closed
Copy link
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionblockedThis change can't be completed until another issue is resolvedThis change can't be completed until another issue is resolvedbugESLint is working incorrectlyESLint is working incorrectlycoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and features
Description
Espree has released a minor version 4.1.0 which bumps acorn-jsx to a new major version (5), which in turn breaks JSX linting (see eslint/js#393)
Acorn-jsx
needs to be used in a different way as of version 5,
acornjs/acorn-jsx@ddcc01d
We are running command eslint **/*.jsx
in the terminal, errors thrown:
error Parsing error: Unexpected token =
ESLint: 5.7.0
Node: any
npm: any
Configuration
module.exports = {
env: {
node: true,
browser: true,
es6: true
},
plugins: [
'jsx-a11y'
],
extends: [
'eslint:recommended',
// https://github.com/jest-community/eslint-plugin-jest
'plugin:jest/recommended',
// https://github.com/yannickcr/eslint-plugin-react
'plugin:react/recommended',
// https://github.com/evcohen/eslint-plugin-jsx-a11y
'plugin:jsx-a11y/recommended'
],
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
// Support for ESM is not tied to an ES version
sourceType: 'module'
},
settings: {
react: {
version: '16.3'
}
},
rules: {
// We don't expect consumers of x-dash to use prop types
'react/prop-types': 'off',
// We don't use display names for SFCs
'react/display-name': 'off',
// This rule is intended to catch < or > but it's too eager
'react/no-unescaped-entities': 'off'
},
overrides: [
{
// Components in x-dash interact with x-engine rather than React
files: [ 'components/**/*.jsx' ],
settings: {
react: {
pragma: 'h',
createClass: 'Component'
}
},
rules: {
'react/prefer-stateless-function': 'error'
}
}
]
};
apaleslimghost, sholladay, Pustur, felladrin, slikts and 2 more
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionblockedThis change can't be completed until another issue is resolvedThis change can't be completed until another issue is resolvedbugESLint is working incorrectlyESLint is working incorrectlycoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and features