From bca3703ce601d39a222590e7b4bb7787568f27c5 Mon Sep 17 00:00:00 2001 From: Nathanael Dekeister Date: Fri, 20 May 2022 11:02:42 +0200 Subject: [PATCH] chore: add decorators-legacy plugin --- README.md | 4 ++-- ember-core.js | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 03f8a19..55a8a87 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@ If you add this configuration to a project using Ember 3.24+ and ESLint 8, you n ```sh # with npm -npm install eslint @babel/core @babel/eslint-parser --save-dev +npm install eslint @babel/core @babel/eslint-parser @babel/plugin-proposal-decorators --save-dev # or with yarn -yarn add eslint @babel/core @babel/eslint-parser -D +yarn add eslint @babel/core @babel/eslint-parser @babel/plugin-proposal-decorators -D ``` ## Usage diff --git a/ember-core.js b/ember-core.js index 8adce4b..865da3b 100644 --- a/ember-core.js +++ b/ember-core.js @@ -1,12 +1,16 @@ module.exports = { - parser: "@babel/eslint-parser", + parser: '@babel/eslint-parser', parserOptions: { - ecmaVersion: 2018, - sourceType: "module", + ecmaVersion: 2021, + sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, - requireConfigFile: false + + requireConfigFile: false, + babelOptions: { + plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]] + } }, plugins: ["ember", "ember-suave"], extends: [