From 83fe4e148e96a29eea133cc110c9de77624691f4 Mon Sep 17 00:00:00 2001 From: Nicolas HENRY Date: Tue, 12 May 2020 16:45:00 +0200 Subject: [PATCH] Fix meta for deprecated rules (#726) --- rules/prefer-exponentiation-operator.js | 12 ++++++------ rules/regex-shorthand.js | 12 ++++++------ test/prefer-exponentiation-operator.js | 4 ++-- test/regex-shorthand.js | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/rules/prefer-exponentiation-operator.js b/rules/prefer-exponentiation-operator.js index 7567daa04a..e410b14a30 100644 --- a/rules/prefer-exponentiation-operator.js +++ b/rules/prefer-exponentiation-operator.js @@ -10,10 +10,10 @@ module.exports = { docs: { url: getDocumentationUrl(__filename) }, - fixable: 'code' - }, - deprecated: true, - replacedBy: [ - 'prefer-exponentiation-operator' - ] + fixable: 'code', + deprecated: true, + replacedBy: [ + 'prefer-exponentiation-operator' + ] + } }; diff --git a/rules/regex-shorthand.js b/rules/regex-shorthand.js index 9ccb9232a0..7a305acde2 100644 --- a/rules/regex-shorthand.js +++ b/rules/regex-shorthand.js @@ -10,10 +10,10 @@ module.exports = { docs: { url: getDocumentationUrl(__filename) }, - fixable: 'code' - }, - deprecated: true, - replacedBy: [ - 'unicorn/better-regex' - ] + fixable: 'code', + deprecated: true, + replacedBy: [ + 'unicorn/better-regex' + ] + } }; diff --git a/test/prefer-exponentiation-operator.js b/test/prefer-exponentiation-operator.js index 12f088140a..6639f3cbfd 100644 --- a/test/prefer-exponentiation-operator.js +++ b/test/prefer-exponentiation-operator.js @@ -2,6 +2,6 @@ import test from 'ava'; import rule from '../rules/prefer-exponentiation-operator'; test('deprecated', t => { - t.true(rule.deprecated); - t.deepEqual(rule.replacedBy, ['prefer-exponentiation-operator']); + t.true(rule.meta.deprecated); + t.deepEqual(rule.meta.replacedBy, ['prefer-exponentiation-operator']); }); diff --git a/test/regex-shorthand.js b/test/regex-shorthand.js index ba399ed118..6b522f0fcd 100644 --- a/test/regex-shorthand.js +++ b/test/regex-shorthand.js @@ -2,6 +2,6 @@ import test from 'ava'; import rule from '../rules/regex-shorthand'; test('deprecated', t => { - t.true(rule.deprecated); - t.deepEqual(rule.replacedBy, ['unicorn/better-regex']); + t.true(rule.meta.deprecated); + t.deepEqual(rule.meta.replacedBy, ['unicorn/better-regex']); });