From dbf4b7996a1aba6deef51916a5435092c130b34e Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Wed, 16 Oct 2019 13:41:53 +0800 Subject: [PATCH] Add `docs` -> `documentation` replacement to `prevent-abbreviations` (#420) --- rules/prevent-abbreviations.js | 3 ++- test/prevent-abbreviations.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rules/prevent-abbreviations.js b/rules/prevent-abbreviations.js index 09854e8e66..4df4591d97 100644 --- a/rules/prevent-abbreviations.js +++ b/rules/prevent-abbreviations.js @@ -141,7 +141,8 @@ const defaultReplacements = { document: true }, docs: { - documents: true + documents: true, + documentation: true }, elem: { element: true diff --git a/test/prevent-abbreviations.js b/test/prevent-abbreviations.js index 218dce1718..88698db982 100644 --- a/test/prevent-abbreviations.js +++ b/test/prevent-abbreviations.js @@ -971,14 +971,14 @@ ruleTester.run('prevent-abbreviations', rule, { { code: outdent` function unicorn(unicorn) { - const {docs = {}} = unicorn; - return docs; + const {prop = {}} = unicorn; + return property; } `, output: outdent` function unicorn(unicorn) { - const {docs: documents = {}} = unicorn; - return documents; + const {prop: property = {}} = unicorn; + return property; } `, errors: createErrors()