Skip to content

Commit 9feb181

Browse files
authored
Use 'latest' as ecmaVersion (#1465)
1 parent 5f4c440 commit 9feb181

File tree

12 files changed

+23
-18
lines changed

12 files changed

+23
-18
lines changed

configs/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
es6: true,
55
},
66
parserOptions: {
7-
ecmaVersion: 2021,
7+
ecmaVersion: 'latest',
88
sourceType: 'module',
99
},
1010
plugins: [

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
"devDependencies": {
5858
"@babel/code-frame": "^7.14.5",
5959
"@babel/core": "^7.15.5",
60-
"@babel/eslint-parser": "^7.15.4",
60+
"@babel/eslint-parser": "^7.15.7",
6161
"@lubien/fixture-beta-package": "^1.0.0-beta.1",
62-
"@typescript-eslint/parser": "^4.31.0",
62+
"@typescript-eslint/parser": "^4.32.0",
6363
"ava": "^3.15.0",
6464
"chalk": "^4.1.2",
6565
"enquirer": "2.3.6",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Configure it in `package.json`.
2828
"es6": true
2929
},
3030
"parserOptions": {
31-
"ecmaVersion": 2021,
31+
"ecmaVersion": "latest",
3232
"sourceType": "module"
3333
},
3434
"plugins": [

test/consistent-function-scoping.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ const createError = (functionNameWithKind, loc) => ({
1616
test({
1717
testerOptions: {
1818
parserOptions: {
19-
sourceType: 'module',
20-
ecmaVersion: 2021,
2119
ecmaFeatures: {
2220
jsx: true,
2321
},

test/integration/config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ module.exports = {
44
root: true,
55
parser: '@babel/eslint-parser',
66
parserOptions: {
7-
ecmaVersion: 2021,
8-
ecmaFeatures: {
9-
jsx: true,
10-
},
117
requireConfigFile: false,
128
babelOptions: {
139
babelrc: false,

test/integration/projects.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export default [
8888
// 'build/**'
8989
// ]
9090
// },
91-
'https://github.com/ElemeFE/element',
92-
'https://github.com/iview/iview',
91+
// 'https://github.com/ElemeFE/element',
92+
// 'https://github.com/iview/iview',
9393
'https://github.com/sindresorhus/create-dmg',
9494
'https://github.com/sindresorhus/cp-file',
9595
'https://github.com/sindresorhus/capture-website',

test/no-for-loop.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ test({
731731
test(avoidTestTitleConflict({
732732
testerOptions: {
733733
parserOptions: {
734+
sourceType: 'script',
734735
ecmaVersion: 5,
735736
},
736737
},

test/no-keyword-prefix.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,10 @@ test({
228228
},
229229
{
230230
code: 'function foo({ newBar = \'default value\' }) {};',
231-
parserOptions: {ecmaVersion: 6},
232231
errors: [errorNew],
233232
},
234233
{
235234
code: 'const newFoo = 0; function foo({ newBar = newFoo}) {}',
236-
parserOptions: {ecmaVersion: 6},
237235
errors: [errorNew, errorNew],
238236
},
239237
{

test/prevent-abbreviations.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,7 @@ test.typescript(avoidTestTitleConflict(tests, 'typescript'));
12711271
test({
12721272
testerOptions: {
12731273
parserOptions: {
1274+
sourceType: 'script',
12741275
ecmaVersion: 5,
12751276
},
12761277
env: {

test/smoke/eslint-remote-tester.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
},
3030
parser: '@typescript-eslint/parser',
3131
parserOptions: {
32-
ecmaVersion: 2020,
32+
ecmaVersion: 'latest',
3333
sourceType: 'module',
3434
ecmaFeatures: {
3535
jsx: true,

0 commit comments

Comments
 (0)