From a5f3ab2ce631851e9ac6b50728ba03d4585c3e81 Mon Sep 17 00:00:00 2001 From: Toru Nagashima Date: Thu, 26 Dec 2019 20:27:10 +0900 Subject: [PATCH] revert ESM support versions --- .../no-unsupported-features/es-syntax.js | 8 ++-- .../no-unsupported-features/es-syntax.js | 38 ++++--------------- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/lib/rules/no-unsupported-features/es-syntax.js b/lib/rules/no-unsupported-features/es-syntax.js index 2b376cac..ef334adc 100644 --- a/lib/rules/no-unsupported-features/es-syntax.js +++ b/lib/rules/no-unsupported-features/es-syntax.js @@ -125,7 +125,7 @@ const features = { ruleId: "no-modules", cases: [ { - supported: "13.2.0", + supported: null, messageId: "no-modules", }, ], @@ -378,7 +378,7 @@ const features = { ruleId: "no-dynamic-import", cases: [ { - supported: "13.2.0", + supported: null, messageId: "no-dynamic-import", }, ], @@ -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": @@ -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) { diff --git a/tests/lib/rules/no-unsupported-features/es-syntax.js b/tests/lib/rules/no-unsupported-features/es-syntax.js index 92899a01..2b2a0c72 100644 --- a/tests/lib/rules/no-unsupported-features/es-syntax.js +++ b/tests/lib/rules/no-unsupported-features/es-syntax.js @@ -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: [ { @@ -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" }, }, ], }, @@ -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" }, }, ], }, @@ -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" }, }, ], }, @@ -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" }, }, ], }, @@ -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", }, }, ],