Repository: ember-cli/ember-cli
Pull request #10188 (2023-02-17 23:38:57)

[ENHANCEMENT] Update ESLint parser `ecmaVersion` to `latest` in `app` blueprint
There's no particular reason we should still be using the 2018 version of the parser. This should be forward-compatible, and we certainly would want new application to run against the latest parser.


Patch:
diff --git a/blueprints/app/files/.eslintrc.js b/blueprints/app/files/.eslintrc.js
index f72dd6a33..42c9dfc20 100644
--- a/blueprints/app/files/.eslintrc.js
+++ b/blueprints/app/files/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '<%= typescript ? '@typescript-eslint/parser' : '@babel/eslint-parser' %>',
   parserOptions: {
-    ecmaVersion: 2018,<% if (!typescript) { %>
+    ecmaVersion: 'latest',<% if (!typescript) { %>
     sourceType: 'module',
     requireConfigFile: false,
     babelOptions: {


Test patch:
diff --git a/tests/fixtures/addon/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js
index 8d8d977fa..ade61fb01 100644
--- a/tests/fixtures/addon/.eslintrc.js
+++ b/tests/fixtures/addon/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '@babel/eslint-parser',
   parserOptions: {
-    ecmaVersion: 2018,
+    ecmaVersion: 'latest',
     sourceType: 'module',
     requireConfigFile: false,
     babelOptions: {
diff --git a/tests/fixtures/addon/typescript/.eslintrc.js b/tests/fixtures/addon/typescript/.eslintrc.js
index fded93617..71f4e8aa9 100644
--- a/tests/fixtures/addon/typescript/.eslintrc.js
+++ b/tests/fixtures/addon/typescript/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '@typescript-eslint/parser',
   parserOptions: {
-    ecmaVersion: 2018,
+    ecmaVersion: 'latest',
   },
   plugins: ['ember', '@typescript-eslint'],
   extends: [
diff --git a/tests/fixtures/app/.eslintrc.js b/tests/fixtures/app/.eslintrc.js
index 5b33eadbe..25ceaab40 100644
--- a/tests/fixtures/app/.eslintrc.js
+++ b/tests/fixtures/app/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '@babel/eslint-parser',
   parserOptions: {
-    ecmaVersion: 2018,
+    ecmaVersion: 'latest',
     sourceType: 'module',
     requireConfigFile: false,
     babelOptions: {
diff --git a/tests/fixtures/app/typescript-embroider/.eslintrc.js b/tests/fixtures/app/typescript-embroider/.eslintrc.js
index 4622c23c6..121ac75c9 100644
--- a/tests/fixtures/app/typescript-embroider/.eslintrc.js
+++ b/tests/fixtures/app/typescript-embroider/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '@typescript-eslint/parser',
   parserOptions: {
-    ecmaVersion: 2018,
+    ecmaVersion: 'latest',
   },
   plugins: ['ember', '@typescript-eslint'],
   extends: [
diff --git a/tests/fixtures/app/typescript/.eslintrc.js b/tests/fixtures/app/typescript/.eslintrc.js
index 4622c23c6..121ac75c9 100644
--- a/tests/fixtures/app/typescript/.eslintrc.js
+++ b/tests/fixtures/app/typescript/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '@typescript-eslint/parser',
   parserOptions: {
-    ecmaVersion: 2018,
+    ecmaVersion: 'latest',
   },
   plugins: ['ember', '@typescript-eslint'],
   extends: [
diff --git a/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js b/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js
index fc4eae4d6..8738a8cb4 100644
--- a/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js
+++ b/tests/fixtures/app/with-blueprint-override-lint-fail/.eslintrc.js
@@ -4,7 +4,7 @@ module.exports = {
   root: true,
   parser: '@babel/eslint-parser',
   parserOptions: {
-    ecmaVersion: 2018,
+    ecmaVersion: 'latest',
     sourceType: 'module',
     requireConfigFile: false,
     babelOptions: {