Skip to content

Commit a41b720

Browse files
committed
attribute-hyphenation: Fix spelling mistakes
- hypen -> hyphen - cann't -> can't
1 parent 1786dde commit a41b720

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/rules/attribute-hyphenation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
context.report({
6464
node: node.key,
6565
loc: node.loc,
66-
message: useHyphenated ? "Attribute '{{text}}' must be hyphenated." : "Attribute '{{text}}' cann't be hyphenated.",
66+
message: useHyphenated ? "Attribute '{{text}}' must be hyphenated." : "Attribute '{{text}}' can't be hyphenated.",
6767
data: {
6868
text
6969
},

tests/lib/rules/attribute-hyphenation.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ ruleTester.run('attribute-hyphenation', rule, {
4545
},
4646
{
4747
filename: 'test.vue',
48-
code: '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hypen="foo"><a onClick="" my-prop="prop"></a></custom></template>',
49-
options: ['never', { 'ignore': ['custom-hypen', 'second-custom'] }]
48+
code: '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hyphen="foo"><a onClick="" my-prop="prop"></a></custom></template>',
49+
options: ['never', { 'ignore': ['custom-hyphen', 'second-custom'] }]
5050
}
5151
],
5252

@@ -57,7 +57,7 @@ ruleTester.run('attribute-hyphenation', rule, {
5757
output: '<template><div><custom myProp="foo"></custom></div></template>',
5858
options: ['never'],
5959
errors: [{
60-
message: "Attribute 'my-prop' cann't be hyphenated.",
60+
message: "Attribute 'my-prop' can't be hyphenated.",
6161
type: 'VIdentifier',
6262
line: 1
6363
}]
@@ -79,7 +79,7 @@ ruleTester.run('attribute-hyphenation', rule, {
7979
output: '<template><div><custom :myProp="prop"></custom></div></template>',
8080
options: ['never'],
8181
errors: [{
82-
message: "Attribute ':my-prop' cann't be hyphenated.",
82+
message: "Attribute ':my-prop' can't be hyphenated.",
8383
type: 'VDirectiveKey',
8484
line: 1
8585
}]
@@ -101,7 +101,7 @@ ruleTester.run('attribute-hyphenation', rule, {
101101
output: '<template><div><custom v-bind:myProp="prop"></custom></div></template>',
102102
options: ['never'],
103103
errors: [{
104-
message: "Attribute 'v-bind:my-prop' cann't be hyphenated.",
104+
message: "Attribute 'v-bind:my-prop' can't be hyphenated.",
105105
type: 'VDirectiveKey',
106106
line: 1
107107
}]
@@ -129,15 +129,15 @@ ruleTester.run('attribute-hyphenation', rule, {
129129
}]
130130
},
131131
{
132-
// This is the same code as the `'ignore': ['custom-hypen']`
132+
// This is the same code as the `'ignore': ['custom-hyphen']`
133133
// valid test; to verify that setting ignore actually makes the
134134
// difference.
135135
filename: 'test.vue',
136-
code: '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hypen="foo"><a onClick="" my-prop="prop"></a></custom></template>',
137-
output: '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" customHypen="foo"><a onClick="" my-prop="prop"></a></custom></template>',
136+
code: '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hyphen="foo"><a onClick="" my-prop="prop"></a></custom></template>',
137+
output: '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" customHyphen="foo"><a onClick="" my-prop="prop"></a></custom></template>',
138138
options: ['never'],
139139
errors: [{
140-
message: "Attribute 'custom-hypen' cann't be hyphenated.",
140+
message: "Attribute 'custom-hyphen' can't be hyphenated.",
141141
type: 'VIdentifier',
142142
line: 1
143143
}]

0 commit comments

Comments
 (0)