Skip to content

Commit

Permalink
Add docs -> documentation replacement to prevent-abbreviations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored and sindresorhus committed Oct 16, 2019
1 parent d638e54 commit dbf4b79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion rules/prevent-abbreviations.js
Expand Up @@ -141,7 +141,8 @@ const defaultReplacements = {
document: true
},
docs: {
documents: true
documents: true,
documentation: true
},
elem: {
element: true
Expand Down
8 changes: 4 additions & 4 deletions test/prevent-abbreviations.js
Expand Up @@ -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()
Expand Down

0 comments on commit dbf4b79

Please sign in to comment.