Skip to content

Commit a5f3ab2

Browse files
committed
revert ESM support versions
1 parent fb9ce15 commit a5f3ab2

File tree

2 files changed

+11
-35
lines changed

2 files changed

+11
-35
lines changed

lib/rules/no-unsupported-features/es-syntax.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const features = {
125125
ruleId: "no-modules",
126126
cases: [
127127
{
128-
supported: "13.2.0",
128+
supported: null,
129129
messageId: "no-modules",
130130
},
131131
],
@@ -378,7 +378,7 @@ const features = {
378378
ruleId: "no-dynamic-import",
379379
cases: [
380380
{
381-
supported: "13.2.0",
381+
supported: null,
382382
messageId: "no-dynamic-import",
383383
},
384384
],
@@ -556,7 +556,7 @@ module.exports = {
556556
"no-generators":
557557
"Generator functions are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
558558
"no-modules":
559-
"Import and export declarations are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
559+
"Import and export declarations are not supported yet.",
560560
"no-new-target":
561561
"'new.target' is not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
562562
"no-object-super-properties":
@@ -628,7 +628,7 @@ module.exports = {
628628
"no-bigint-property-names":
629629
"Bigint literal property names are not supported yet.",
630630
"no-dynamic-import":
631-
"'import()' expressions are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
631+
"'import()' expressions are not supported yet.",
632632
},
633633
},
634634
create(context) {

tests/lib/rules/no-unsupported-features/es-syntax.js

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -861,26 +861,6 @@ ruleTester.run(
861861
parserOptions: { sourceType: "module" },
862862
options: [{ version: "13.1.0", ignores: ["modules"] }],
863863
},
864-
{
865-
code: "import a from 'a'",
866-
parserOptions: { sourceType: "module" },
867-
options: [{ version: "13.2.0" }],
868-
},
869-
{
870-
code: "export default {}",
871-
parserOptions: { sourceType: "module" },
872-
options: [{ version: "13.2.0" }],
873-
},
874-
{
875-
code: "export const a = {}",
876-
parserOptions: { sourceType: "module" },
877-
options: [{ version: "13.2.0" }],
878-
},
879-
{
880-
code: "export {}",
881-
parserOptions: { sourceType: "module" },
882-
options: [{ version: "13.2.0" }],
883-
},
884864
],
885865
invalid: [
886866
{
@@ -890,7 +870,7 @@ ruleTester.run(
890870
errors: [
891871
{
892872
messageId: "no-modules",
893-
data: { supported: "13.2.0", version: "10.0.0" },
873+
data: { supported: null, version: "10.0.0" },
894874
},
895875
],
896876
},
@@ -901,7 +881,7 @@ ruleTester.run(
901881
errors: [
902882
{
903883
messageId: "no-modules",
904-
data: { supported: "13.2.0", version: "10.0.0" },
884+
data: { supported: null, version: "10.0.0" },
905885
},
906886
],
907887
},
@@ -912,7 +892,7 @@ ruleTester.run(
912892
errors: [
913893
{
914894
messageId: "no-modules",
915-
data: { supported: "13.2.0", version: "10.0.0" },
895+
data: { supported: null, version: "10.0.0" },
916896
},
917897
],
918898
},
@@ -923,7 +903,7 @@ ruleTester.run(
923903
errors: [
924904
{
925905
messageId: "no-modules",
926-
data: { supported: "13.2.0", version: "10.0.0" },
906+
data: { supported: null, version: "10.0.0" },
927907
},
928908
],
929909
},
@@ -2515,21 +2495,17 @@ ruleTester.run(
25152495
{ version: "13.1.0", ignores: ["dynamicImport"] },
25162496
],
25172497
},
2518-
{
2519-
code: "import(source)",
2520-
options: [{ version: "13.2.0" }],
2521-
},
25222498
],
25232499
invalid: [
25242500
{
25252501
code: "import(source)",
2526-
options: [{ version: "12.0.0" }],
2502+
options: [{ version: "13.3.0" }],
25272503
errors: [
25282504
{
25292505
messageId: "no-dynamic-import",
25302506
data: {
2531-
supported: "13.2.0",
2532-
version: "12.0.0",
2507+
supported: null,
2508+
version: "13.3.0",
25332509
},
25342510
},
25352511
],

0 commit comments

Comments
 (0)