Skip to content

Commit de7e193

Browse files
committed
CoExist -> Coexist
1 parent 31ef543 commit de7e193

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

docs/rules/no-duplicate-attributes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ This rule reports duplicate attributes.
2727

2828
## :wrench: Options
2929

30-
`allowCoExistClass` - Enables [`v-bind:class`] directive can co-exist with the plain `class` attribute.
31-
`allowCoExistStyle` - Enables [`v-bind:style`] directive can co-exist with the plain `style` attribute.
30+
`allowCoexistClass` - Enables [`v-bind:class`] directive can co-exist with the plain `class` attribute.
31+
`allowCoexistStyle` - Enables [`v-bind:style`] directive can co-exist with the plain `style` attribute.
3232

3333
```
3434
'vue/name-property-casing': [2, {
35-
allowCoExistClass: Boolean // default: true
36-
allowCoExistStyle: Boolean, // default: true
35+
allowCoexistClass: Boolean // default: true
36+
allowCoexistStyle: Boolean, // default: true
3737
}]
3838
```
3939

lib/rules/no-duplicate-attributes.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ function getName (attribute) {
3838
*/
3939
function create (context) {
4040
const options = context.options[0] || {}
41-
const allowCoExistStyle = Boolean(options.allowCoExistStyle !== false)
42-
const allowCoExistClass = Boolean(options.allowCoExistClass !== false)
41+
const allowCoexistStyle = Boolean(options.allowCoexistStyle !== false)
42+
const allowCoexistClass = Boolean(options.allowCoexistClass !== false)
4343

4444
const directiveNames = new Set()
4545
const attributeNames = new Set()
4646

4747
function isDuplicate (name) {
48-
if (allowCoExistStyle && name === 'style') {
48+
if (allowCoexistStyle && name === 'style') {
4949
return directiveNames.has(name)
5050
}
51-
if (allowCoExistClass && name === 'class') {
51+
if (allowCoexistClass && name === 'class') {
5252
return directiveNames.has(name)
5353
}
5454
return directiveNames.has(name) || attributeNames.has(name)
@@ -103,10 +103,10 @@ module.exports = {
103103
{
104104
type: 'object',
105105
properties: {
106-
allowCoExistClass: {
106+
allowCoexistClass: {
107107
type: 'boolean'
108108
},
109-
allowCoExistStyle: {
109+
allowCoexistStyle: {
110110
type: 'boolean'
111111
}
112112
}

tests/lib/rules/no-duplicate-attributes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ tester.run('no-duplicate-attributes', rule, {
6464
filename: 'test.vue',
6565
code: '<template><div><div style :style></div></div></template>',
6666
errors: ["Duplicate attribute 'style'."],
67-
options: [{ allowCoExistStyle: false }]
67+
options: [{ allowCoexistStyle: false }]
6868
},
6969
{
7070
filename: 'test.vue',
7171
code: '<template><div><div class :class></div></div></template>',
7272
errors: ["Duplicate attribute 'class'."],
73-
options: [{ allowCoExistClass: false }]
73+
options: [{ allowCoexistClass: false }]
7474
}
7575
]
7676
})

0 commit comments

Comments
 (0)