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

chore: Lint TsDoc. #6353

Merged
merged 21 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c08528c
chore: add linting for tsdoc
maribethb Aug 16, 2022
8556a22
chore: don't require types on return
maribethb Aug 16, 2022
169959b
chore: remove redundant fileoverview from ts
maribethb Aug 16, 2022
d6d8656
chore: change return to returns and add some newlines
maribethb Aug 16, 2022
1734555
chore: remove license tag
maribethb Aug 16, 2022
5ed2e9c
chore: don't require params/return docs
maribethb Aug 16, 2022
78d7f07
chore: remove spurious struct tags
maribethb Aug 16, 2022
894361f
Merge branch 'develop' of github.com:google/blockly into lint-tsdoc
maribethb Aug 16, 2022
e043d55
Revert "chore: change return to returns and add some newlines"
maribethb Aug 17, 2022
048be74
chore: don't auto-add param names
maribethb Aug 17, 2022
bf16641
chore: disable require-param bc it breaks on this
maribethb Aug 17, 2022
f704323
return to returns and add line breaks
maribethb Aug 17, 2022
a9e7e5d
chore: configure additional jsdoc rules
maribethb Aug 17, 2022
d688d72
chore: run format
maribethb Aug 17, 2022
9f64c4c
Revert "chore: remove license tag"
maribethb Aug 18, 2022
1358755
chore: allow license tag format
maribethb Aug 18, 2022
a00eb45
chore: only require jsdoc on exported items
maribethb Aug 18, 2022
3ce05d9
chore: add missing jsdoc or silence where needed
maribethb Aug 18, 2022
efcf7b6
chore: run format
maribethb Aug 18, 2022
85f487e
chore: lint fixes
maribethb Aug 23, 2022
1951782
Merge branch 'develop' of github.com:google/blockly into lint-tsdoc
maribethb Aug 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 39 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,27 @@
"overrides": [{
"files": ["**/*.ts", "**/*.tsx"],
"plugins": [
"@typescript-eslint/eslint-plugin"
"@typescript-eslint/eslint-plugin",
"jsdoc"
],
"settings": {
"jsdoc": {
"mode": "typescript"
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": ".",
"ecmaVersion": 2020,
"sourceType": "module"
},
"extends": ["plugin:@typescript-eslint/recommended"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended"
],
"rules": {
// TS rules
// Disable JsDoc validation, since we use TsDoc.
"valid-jsdoc": ["off"],
// Blockly uses namespaces to do declaration merging in some cases.
"@typescript-eslint/no-namespace": ["off"],
// Use the updated TypeScript-specific rule.
Expand All @@ -126,7 +133,34 @@
// Temporarily disable. 3 problems.
"@typescript-eslint/no-empty-interface": ["off"],
// Temporarily disable. 34 problems.
"func-call-spacing": ["off"]
"func-call-spacing": ["off"],

// TsDoc rules (using JsDoc plugin)
// Disable built-in jsdoc verifier.
"valid-jsdoc": ["off"],
// Don't require types in params and returns docs.
"jsdoc/require-param-type": ["off"],
"jsdoc/require-returns-type": ["off"],
// params and returns docs are optional.
"jsdoc/require-param-description": ["off"],
"jsdoc/require-returns": ["off"],
// Disable for now (breaks on `this` which is not really a param).
"jsdoc/require-param": ["off"],
// Don't auto-add missing jsdoc. Only required on exported items.
"jsdoc/require-jsdoc": ["warn", {"enableFixer": false, "publicOnly": true}],
// Disable because of false alarms with Closure-supported tags.
// Re-enable after Closure is removed.
"jsdoc/check-tag-names": ["off"],
// Re-enable after Closure is removed. There shouldn't even be types in the TsDoc.
// These are "types" because of Closure's @suppress {warningName}
"jsdoc/no-undefined-types": ["off"],
"jsdoc/valid-types": ["off"],
// Disabled due to not handling `this`. If re-enabled, checkDestructured option
// should be left as false.
"jsdoc/check-param-names": ["off", {"checkDestructured": false}],
// Allow any text in the license tag. Other checks are not relevant.
"jsdoc/check-values": ["off"]

}
}]
}
Loading