Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codeOperator.filter cannot read property filter of undefined #123

Open
FieryCod opened this issue Dec 1, 2016 · 0 comments
Open

codeOperator.filter cannot read property filter of undefined #123

FieryCod opened this issue Dec 1, 2016 · 0 comments

Comments

@FieryCod
Copy link

FieryCod commented Dec 1, 2016

Hello my problem is:

When I try to lint my pug files by using:
pug-lint -c .pug-lintrc.json views/index.pug

I receive following error:

/usr/lib/node_modules/pug-lint/lib/pug-file.js:217
filter: codeOperator.filter,
^

TypeError: Cannot read property 'filter' of undefined
at /usr/lib/node_modules/pug-lint/lib/pug-file.js:217:29
at Array.forEach (native)
at PugFile.addErrorForCodeOperator (/usr/lib/node_modules/pug-lint/lib/pug-file.js:213:11)
at module.exports.lint (/usr/lib/node_modules/pug-lint/lib/rules/disallow-space-after-code-op
erator.js:41:10)
at /usr/lib/node_modules/pug-lint/lib/linter.js:145:12
at Array.forEach (native)
at Linter._checkFile (/usr/lib/node_modules/pug-lint/lib/linter.js:142:31)
at Linter.checkString (/usr/lib/node_modules/pug-lint/lib/linter.js:72:17)
at Linter.checkFile (/usr/lib/node_modules/pug-lint/lib/linter.js:48:17)
at Linter.checkPath (/usr/lib/node_modules/pug-lint/lib/linter.js:64:17)

This is how my .pug-lintrc.json looks like:

{
    "disallowBlockExpansion": true,
    "disallowClassAttributeWithStaticValue": true,
    "disallowClassLiteralsBeforeAttributes": true,
    "disallowClassLiteralsBeforeIdLiterals": true,
    "disallowDuplicateAttributes": true,
    "disallowHtmlText": true,
    "disallowIdAttributeWithStaticValue": true,
    "disallowLegacyMixinCall": true,
    "disallowMultipleLineBreaks": true,
    "disallowSpaceAfterCodeOperator": [true, "-"],
    "disallowSpacesInsideAttributeBrackets": true,
    "disallowStringConcatenation": "aggressive",
    "requireClassLiteralsBeforeAttributes": true,
    "validateAttributeSeparator": ", ",
    "requireIdLiteralsBeforeAttributes": true,
    "requireLowerCaseAttributes": true,
    "requireLowerCaseTags": true,
    "validateDivTags": true,
    "validateExtensions": true,
    "validateIndentation": 2,
    "validateTemplateString": [true, false, true]

}

How can i get rid of this error?
"pug-lint": "^2.3.0",
"pug": "~2.0.0-beta6"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant