Skip to content

Commit cc43821

Browse files
mysticateamichalsnik
authored andcommitted
[Fix] Crash with babel-eslint (#273)
* Fix: crash with babel-eslint * Chore: fix lint errors * Fix: upgrade eslint-plugin-vue-libs to 2.0.0 * fix for tests
1 parent 1ac12f5 commit cc43821

18 files changed

+117
-86
lines changed

circle.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ test:
1212
- nvm use 4 && npm test
1313
- nvm use 6 && npm test
1414
- nvm use 8 && npm test
15-
- nvm use 8 && npm i [email protected] --no-save && npm run -s test:base
15+
# Test for the minimum version we are supporting.
16+
- nvm use 8 && npm i [email protected] --no-save && $(npm bin)/mocha tests/lib/rules/*.js --reporter dot

eslint-internal-rules/consistent-docs-description.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getPropertyFromObject (property, node) {
4343
*/
4444
function checkMetaDocsDescription (context, exportsNode) {
4545
if (exportsNode.type !== 'ObjectExpression') {
46-
// if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
46+
// if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
4747
return
4848
}
4949

@@ -52,7 +52,7 @@ function checkMetaDocsDescription (context, exportsNode) {
5252
const metaDocsDescription = metaDocs && getPropertyFromObject('description', metaDocs.value)
5353

5454
if (!metaDocsDescription) {
55-
// if there is no `meta.docs.description` property, "internal-no-invalid-meta" will already report this.
55+
// if there is no `meta.docs.description` property, "internal-no-invalid-meta" will already report this.
5656
return
5757
}
5858

lib/rules/name-property-casing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = {
5151
description: 'enforce specific casing for the name property in Vue components',
5252
category: 'strongly-recommended'
5353
},
54-
fixable: 'code', // or "code" or "whitespace"
54+
fixable: 'code', // or "code" or "whitespace"
5555
schema: [
5656
{
5757
enum: allowedCaseOptions

lib/rules/no-confusing-v-for-v-if.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ const utils = require('../utils')
2323
function isUsingIterationVar (vIf) {
2424
const element = vIf.parent.parent
2525
return vIf.value.references.some(reference =>
26-
element.variables.some(variable =>
27-
variable.id.name === reference.id.name &&
28-
variable.kind === 'v-for'
29-
)
26+
element.variables.some(variable =>
27+
variable.id.name === reference.id.name &&
28+
variable.kind === 'v-for'
3029
)
30+
)
3131
}
3232

3333
/**

lib/rules/no-dupe-keys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = {
4949
description: 'disallow duplication of field names',
5050
category: 'essential'
5151
},
52-
fixable: null, // or "code" or "whitespace"
52+
fixable: null, // or "code" or "whitespace"
5353
schema: [
5454
{
5555
type: 'object',

lib/rules/no-multi-spaces.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
description: 'disallow multiple spaces',
1515
category: 'strongly-recommended'
1616
},
17-
fixable: 'whitespace', // or "code" or "whitespace"
17+
fixable: 'whitespace', // or "code" or "whitespace"
1818
schema: []
1919
},
2020

lib/rules/require-default-prop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616
description: 'require default value for props',
1717
category: 'strongly-recommended'
1818
},
19-
fixable: null, // or "code" or "whitespace"
19+
fixable: null, // or "code" or "whitespace"
2020
schema: []
2121
},
2222

lib/rules/require-prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = {
8383
description: 'require type definitions in props',
8484
category: 'strongly-recommended'
8585
},
86-
fixable: null, // or "code" or "whitespace"
86+
fixable: null, // or "code" or "whitespace"
8787
schema: [
8888
// fill in your schema
8989
]

lib/rules/require-render-return.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = {
4646
description: 'enforce render function to always return value',
4747
category: 'essential'
4848
},
49-
fixable: null, // or "code" or "whitespace"
49+
fixable: null, // or "code" or "whitespace"
5050
schema: []
5151
},
5252

lib/rules/return-in-computed-property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
description: 'enforce that a return statement is present in computed property',
5151
category: 'essential'
5252
},
53-
fixable: null, // or "code" or "whitespace"
53+
fixable: null, // or "code" or "whitespace"
5454
schema: [
5555
{
5656
type: 'object',

0 commit comments

Comments
 (0)