Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn test fails with linting error #232

Closed
urbanlegion opened this issue Jun 23, 2017 · 3 comments
Closed

yarn test fails with linting error #232

urbanlegion opened this issue Jun 23, 2017 · 3 comments

Comments

@urbanlegion
Copy link

yarn test fails with linting error:
Unexpected top-level property "ecmaFeatures".

here is the the full error:

PS G:\xampp\htdocs\reactFromScratch> yarn test
yarn test v0.24.5
$ eslint src
G:\xampp\htdocs\reactFromScratch\node_modules\eslint-config-airbnb\rules\react.js:
        ESLint configuration is invalid:
        - Unexpected top-level property "ecmaFeatures".

Referenced from: airbnb
Referenced from: G:\xampp\htdocs\reactFromScratch\.eslintrc.json
Error: G:\xampp\htdocs\reactFromScratch\node_modules\eslint-config-airbnb\rules\react.js:
        ESLint configuration is invalid:
        - Unexpected top-level property "ecmaFeatures".

Referenced from: airbnb
Referenced from: G:\xampp\htdocs\reactFromScratch\.eslintrc.json
    at validateConfigSchema (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-validator.js:187:15)
    at Object.validate (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-validator.js:200:5)
    at load (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-file.js:550:19)
    at configExtends.reduceRight.e (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-file.js:421:36)
    at Array.reduceRight (native)
    at applyExtends (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-file.js:405:28)
    at load (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-file.js:557:22)
    at configExtends.reduceRight.e (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-file.js:421:36)
    at Array.reduceRight (native)
    at applyExtends (G:\xampp\htdocs\reactFromScratch\node_modules\eslint\lib\config\config-file.js:405:28)

env:
win10 / XAMPP using powershell

I think it would be an issue coming from my install process?
Since I can't use the linux one line: npm info eslint-config-airbnb@latest peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add --dev eslint-config-airbnb@latest
I had to install separately. As follows:

  • yarn add --dev glob@^7.1.1
  • yarn add --dev markdownlint@^0.4.0
  • yarn add --dev eslint
  • yarn add --dev eslint-plugin-jsx-a11y@^5.0.1
  • yarn add --dev eslint-plugin-import@^2.2.0
  • yarn add --dev eslint-plugin-react@^7.0.1
  • yarn add --dev eslint-config-airbnb@latest

Did I miss anything here?
thx

@djtorel
Copy link

djtorel commented Jun 23, 2017

This is because the latest version of eslint (4.0.0) is incompatible with the airbnb and jsx-a11y plugins. I was able to fix it by installing eslint@3.19.0.
So do
yarn remove eslint
then
yarn add --dev eslint@3.19.0

@verekia
Copy link
Owner

verekia commented Jun 23, 2017

Exactly, let's hope for a fix soon :) In the meantime, stick to 3.19.0!

@verekia
Copy link
Owner

verekia commented Sep 27, 2017

eslint-config-airbnb still doesn't support ESLint 4 but eslint-config-airbnb-base does. In the next version of the tutorial I'll use it.
See: airbnb/javascript#1447 (comment)

@verekia verekia closed this as completed Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants