Skip to content

Commit

Permalink
fix unicorn/prevent-abbreviations
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Sep 23, 2019
1 parent aa0461f commit 1ef1769
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rules/prefer-query-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const forbiddenIdentifierNames = new Map([
]);

const getReplacementForId = value => `#${value}`;
const getReplacementForClass = value => value.match(/\S+/g).map(e => `.${e}`).join('');
const getReplacementForClass = value => value.match(/\S+/g).map(className => `.${className}`).join('');

const getQuotedReplacement = (node, value) => {
const leftQuote = node.raw.charAt(0);
Expand Down
11 changes: 11 additions & 0 deletions test/integration/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ const {CLIEngine} = require('eslint');

const cli = new CLIEngine({
...unicorn.configs.recommended,
rules: {
...unicorn.configs.recommended.rules,

// TODO: remove this override, when default options changed
'unicorn/prevent-abbreviations': [
'error',
{
checkProperties: false
}
]
},
cwd: ROOT,
useEslintrc: false
});
Expand Down

0 comments on commit 1ef1769

Please sign in to comment.