diff --git a/lib/rules/attribute-hyphenation.js b/lib/rules/attribute-hyphenation.js index 24bacffc2..8f57531c0 100644 --- a/lib/rules/attribute-hyphenation.js +++ b/lib/rules/attribute-hyphenation.js @@ -99,6 +99,10 @@ module.exports = { return null } + if (/^[A-Z]/.test(name)) { + return null + } + return fixer.replaceText( node.key, text.replace(name, caseConverter(name)) diff --git a/tests/lib/rules/attribute-hyphenation.js b/tests/lib/rules/attribute-hyphenation.js index 146c25658..2692345a0 100644 --- a/tests/lib/rules/attribute-hyphenation.js +++ b/tests/lib/rules/attribute-hyphenation.js @@ -88,7 +88,7 @@ ruleTester.run('attribute-hyphenation', rule, { { filename: 'test.vue', code: '', - output: '', + output: null, options: ['always'], errors: [ { @@ -115,8 +115,7 @@ ruleTester.run('attribute-hyphenation', rule, { { filename: 'test.vue', code: '', - output: - '', + output: null, options: ['always'], errors: [ { @@ -143,8 +142,7 @@ ruleTester.run('attribute-hyphenation', rule, { { filename: 'test.vue', code: '', - output: - '', + output: null, options: ['always'], errors: [ { @@ -157,8 +155,7 @@ ruleTester.run('attribute-hyphenation', rule, { { filename: 'test.vue', code: '', - output: - '', + output: null, options: ['always', { ignore: [] }], errors: [ { @@ -281,7 +278,7 @@ ruleTester.run('attribute-hyphenation', rule, { { filename: 'test.vue', code: '', - output: '', + output: null, options: ['always'], errors: [ {