webex / ciscospark-eslint-config

0 stars 1 forks source link

The es2015 file should not need babel-eslint #10

Open ianwremmel opened 7 years ago

mmaines-cisco commented 7 years ago

@ianwremmel at this point I do not remember what exact block of code, in the sdk project, broke due to not having the babel-eslint parser set in the configuration. I remember this being an issue, as a few files in the ciscospark JS SDK repository were failing eslint testing while using this repository. After looking at the initial commit of this repository, research i did at the time suggested using the babel-eslint parser was the required fix and did in fact solve the eslint errors I was receiving in the JS SDK repository.

At this point I would have to remove the parser fro the config and publish the repository again to know if this is still an issue in the JS SDK repository. What is your suggested course of action?

ianwremmel commented 7 years ago

You can debug locally using npm link.

Run npm link in the eslint config directory and rm -rf ./node_modules/@ciscospark/eslint-config && npm link @ciscospark/eslint-config in the sdk directory. From there, you can make local changes to the eslint config without needing to publish them first.

mmaines-cisco commented 7 years ago

@ianwremmel, these are the errors I am getting when I remove the babel-parser image

Upon further research this is due to ESLint not natively supporting experimental ECMAScript language features which the babel-parser solves. See eslint issue: https://github.com/eslint/eslint/issues/4096.

Re-adding the babel-parser into the config removes all errors i get when running the lint command; how should I proceed?

ianwremmel commented 7 years ago

babel-parser should be specified in the project's config file, not this base ruleset.