Skip to content

Commit

Permalink
revert ESM support versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Dec 26, 2019
1 parent fb9ce15 commit a5f3ab2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
8 changes: 4 additions & 4 deletions lib/rules/no-unsupported-features/es-syntax.js
Expand Up @@ -125,7 +125,7 @@ const features = {
ruleId: "no-modules",
cases: [
{
supported: "13.2.0",
supported: null,
messageId: "no-modules",
},
],
Expand Down Expand Up @@ -378,7 +378,7 @@ const features = {
ruleId: "no-dynamic-import",
cases: [
{
supported: "13.2.0",
supported: null,
messageId: "no-dynamic-import",
},
],
Expand Down Expand Up @@ -556,7 +556,7 @@ module.exports = {
"no-generators":
"Generator functions are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
"no-modules":
"Import and export declarations are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
"Import and export declarations are not supported yet.",
"no-new-target":
"'new.target' is not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
"no-object-super-properties":
Expand Down Expand Up @@ -628,7 +628,7 @@ module.exports = {
"no-bigint-property-names":
"Bigint literal property names are not supported yet.",
"no-dynamic-import":
"'import()' expressions are not supported until Node.js {{supported}}. The configured version range is '{{version}}'.",
"'import()' expressions are not supported yet.",
},
},
create(context) {
Expand Down
38 changes: 7 additions & 31 deletions tests/lib/rules/no-unsupported-features/es-syntax.js
Expand Up @@ -861,26 +861,6 @@ ruleTester.run(
parserOptions: { sourceType: "module" },
options: [{ version: "13.1.0", ignores: ["modules"] }],
},
{
code: "import a from 'a'",
parserOptions: { sourceType: "module" },
options: [{ version: "13.2.0" }],
},
{
code: "export default {}",
parserOptions: { sourceType: "module" },
options: [{ version: "13.2.0" }],
},
{
code: "export const a = {}",
parserOptions: { sourceType: "module" },
options: [{ version: "13.2.0" }],
},
{
code: "export {}",
parserOptions: { sourceType: "module" },
options: [{ version: "13.2.0" }],
},
],
invalid: [
{
Expand All @@ -890,7 +870,7 @@ ruleTester.run(
errors: [
{
messageId: "no-modules",
data: { supported: "13.2.0", version: "10.0.0" },
data: { supported: null, version: "10.0.0" },
},
],
},
Expand All @@ -901,7 +881,7 @@ ruleTester.run(
errors: [
{
messageId: "no-modules",
data: { supported: "13.2.0", version: "10.0.0" },
data: { supported: null, version: "10.0.0" },
},
],
},
Expand All @@ -912,7 +892,7 @@ ruleTester.run(
errors: [
{
messageId: "no-modules",
data: { supported: "13.2.0", version: "10.0.0" },
data: { supported: null, version: "10.0.0" },
},
],
},
Expand All @@ -923,7 +903,7 @@ ruleTester.run(
errors: [
{
messageId: "no-modules",
data: { supported: "13.2.0", version: "10.0.0" },
data: { supported: null, version: "10.0.0" },
},
],
},
Expand Down Expand Up @@ -2515,21 +2495,17 @@ ruleTester.run(
{ version: "13.1.0", ignores: ["dynamicImport"] },
],
},
{
code: "import(source)",
options: [{ version: "13.2.0" }],
},
],
invalid: [
{
code: "import(source)",
options: [{ version: "12.0.0" }],
options: [{ version: "13.3.0" }],
errors: [
{
messageId: "no-dynamic-import",
data: {
supported: "13.2.0",
version: "12.0.0",
supported: null,
version: "13.3.0",
},
},
],
Expand Down

0 comments on commit a5f3ab2

Please sign in to comment.