-
-
Notifications
You must be signed in to change notification settings - Fork 163
check-examples
and whitespace-based rules (like indent
)
#211
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
Comments
Can confirm. Having the same issue. |
Be aware that in the meantime you can use overrides: [
{
files: ["**/*.md"],
rules: {
indent: 'off'
}
}
] You can then have your other rules continue to apply to your non-example (or non-Markdown) code without disabling non-indent rules for your examples. |
This is our entire eslintrc file: {
"env": {
"es6": true,
"node": true
},
"extends": ["airbnb-base", "plugin:jest/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"jest": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"jest",
"jsdoc"
],
"rules": {
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
"jsdoc/check-alignment": 1,
"jsdoc/check-examples": 1,
"jsdoc/check-indentation": 0,
"jsdoc/check-param-names": 1,
"jsdoc/check-syntax": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/check-types": 1,
"jsdoc/implements-on-classes": 1,
"jsdoc/match-description": 1,
"jsdoc/newline-after-description": 1,
"jsdoc/no-types": 0,
"jsdoc/no-undefined-types": 1,
"jsdoc/require-description": 1,
"jsdoc/require-description-complete-sentence": 1,
"jsdoc/require-example": 1,
"jsdoc/require-hyphen-before-param-description": 0,
"jsdoc/require-jsdoc": 1,
"jsdoc/require-param": 1,
"jsdoc/require-param-description": 1,
"jsdoc/require-param-name": 1,
"jsdoc/require-param-type": 1,
"jsdoc/require-returns": 1,
"jsdoc/require-returns-check": 1,
"jsdoc/require-returns-description": 1,
"jsdoc/require-returns-type": 1,
"jsdoc/valid-types": 1
},
"overrides": [{
"files": ["**/*.js"],
"rules": {
"indent": "off"
}
}]
} |
You also need in your case: But I'd suggest doing this instead:
This has three benefits:
|
This worked! Thank you very much! |
…whitespace-related rules such as `indent` (fixes gajus#211) feat(check-examples): add `paddedIndent` option refactor: use `String.prototype.repeat` over lodash
…whitespace-related rules such as `indent` (fixes gajus#211) feat(check-examples): add `paddedIndent` option
…whitespace-related rules such as `indent` (fixes gajus#211)
…whitespace-related rules such as `indent` (fixes gajus#211)
🎉 This issue has been resolved in version 15.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* master: (46 commits) feat(require-description-complete-sentence): limit checking to certain default tags likely to have descriptions or by `tags` array for additional choices; fixes gajus#337 docs(newline-after-description): indicate applies on doc block docs(match-description): add alias `desc` to separate column docs(match-description): indicate application by default to `description`/`desc` and allowance for `property`/`prop`; clarify fix(match-description): ensure `prop` and `property` matching excludes name testing(require-param): fix test source (part of gajus#332) testing(require-param): fix test expectation (part of gajus#332) docs: generate docs chore: update devDeps (eslint-config-canonical, gitdown) fix(no-undefined-types): ensure working in all contexts; fixes gajus#324 refactor(iterateJsdoc): reduce retrieval calls docs(check-examples): allow for whitespace at end feat(check-examples): add `paddedIndent` option fix(check-examples): preserve whitespace so as to report issues with whitespace-related rules such as `indent` (fixes gajus#211) chore(travis): fix Travis to use older unicorn version that supports Node 6 (and the canonical config that requires the earlier unicorn version) docs(require-returns, require-returns-check): indicate that these will report if multiple `returns` tags are present refactor: use `String.prototype.repeat` over lodash `repeat` refactor: apply (jsdoc-related) eslint rule fixes chore: add `lint-fix` script fix(newline-after-description): avoid matching duplicate or partial matches within tag descriptions after the block description; fixes gajus#328 ...
🎉 This issue has been resolved in version 15.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Reopening as the original issue was not actually resolved. |
This should have been fixed earlier in v18.1.6. Closing but feel free to refile with any reproducible examples. v15.4.0 also made it easier to work with indents via the As an aside re: the |
As currently implemented,
check-examples
has issues when the rule isindent
as initial spacing is stripped out during parsing. May need to tweak parsing or usejsdocNode
.The text was updated successfully, but these errors were encountered: