peopledoc / eslint-config-peopledoc

ESLint config for PeopleDoc frontend projects
MIT License
1 stars 1 forks source link

feat: allow decorators #45

Closed MrChocolatine closed 4 years ago

MrChocolatine commented 4 years ago

This small change allows to parse correctly the symbol @ for decorators.

I thought it would be useful to enable it as more and more of ours apps/add-ons run with Ember 3.12.

I took inspiration from the ESLint configuration used when creating a new app with Ember 3.14 : https://github.com/ember-cli/ember-new-output/blob/v3.14.0/.eslintrc.js


Edit: So far decorators are at Stage 2. And ESLint "only officially supports the latest final ECMAScript standard" :

ESLint's parser only officially supports the latest final ECMAScript standard. We will make changes to core rules in order to avoid crashes on stage 3 ECMAScript syntax proposals (as long as they are implemented using the correct experimental ESTree syntax). We may make changes to core rules to better work with language extensions (such as JSX, Flow, and TypeScript) on a case-by-case basis.

To make this work on your project, you will have to install babel-eslint as a devDependency, like in Ember 3.14.

romgere commented 4 years ago

FYI :

In ember-peopledoc-text-editor I used eslint-config-peopledoc with master version in my package.json & this PR break the CI (babel-eslint was missing)...

My bad, of course, I fix the eslint-config-peopledoc version to 1.7.2...

But, don't forget to add a "breaking change" information for the next release (must be a major release I think).

And, from my POV, this PR should have included a modification on the README file with "To make this work on your project, you will have to install babel-eslint as a devDependency, like in Ember 3.14"

MrChocolatine commented 4 years ago

FYI :

In ember-peopledoc-text-editor I used eslint-config-peopledoc with master version in my package.json & this PR break the CI (babel-eslint was missing)...

My bad, of course, I fix the eslint-config-peopledoc version to 1.7.2...

But, don't forget to add a "breaking change" information for the next release (must be a major release I think).

And, from my POV, this PR should have included a modification on the README file with "To make this work on your project, you will have to install babel-eslint as a devDependency, like in Ember 3.14"

@romgere : https://github.com/peopledoc/eslint-config-peopledoc/pull/47