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

Enable eslint rule equivalent to ts-lint completed-docs rule #395

Closed
eonarheim opened this issue Jan 22, 2015 · 10 comments · Fixed by #1641
Closed

Enable eslint rule equivalent to ts-lint completed-docs rule #395

eonarheim opened this issue Jan 22, 2015 · 10 comments · Fixed by #1641
Labels
community in-progress This issue is marked in-progress. This label will be removed if there is no activity for 30 days. docs Relating to documentation in any way good first issue good for people new to open source and Excalibur tools

Comments

@eonarheim
Copy link
Member

eonarheim commented Jan 22, 2015

Context

We require JSDoc comments on all public members of Excalibur in order to properly generate our API documentation. While we always intend to manually review any new comments, this would prevent anything from slipping through without a comment.

Proposal

Enable completed-docs TSLint rule.

"completed-docs": [
  {
    "classes": {"visibilities": ["exported"]},
    "enums": {"visibilities": ["exported"]},
    "enum-members": {"visibilities": ["exported"]},
    "interfaces": {"visibilities": ["exported"]},
    "functions": {"visibilities": ["exported"]},
    "methods": {"privacies": ["public", "protected"]},
    "properties": {"privacies": ["public", "protected"]}
  }
]

This should be implemented in this PR as a warning not an error until we address all outstanding issues it finds (we will open a separate core team PR).

@eonarheim eonarheim added this to the 0.3 Release milestone Jan 22, 2015
@kamranayub kamranayub added the docs Relating to documentation in any way label Apr 1, 2015
@jedeen jedeen modified the milestones: 0.5 Release, 0.6 Release May 28, 2015
@jedeen jedeen added the tools label Jun 1, 2015
@jedeen jedeen modified the milestones: 0.6 Release, vNext Jun 14, 2015
@jedeen jedeen modified the milestones: vNext, 0.18.0 Release Mar 31, 2018
@jedeen jedeen modified the milestones: 0.18.0 Release, 0.19.0 Release Jul 20, 2018
@jedeen jedeen modified the milestones: 0.19.0 Release, 0.20.0 Release Oct 13, 2018
@jedeen jedeen modified the milestones: 0.20.0 Release, 0.21.0 Release Dec 11, 2018
@jedeen jedeen modified the milestones: 0.21.0 Release, 0.22.0 Release Dec 21, 2018
@kamranayub
Copy link
Member

Check this out, we can enable this right now!

https://palantir.github.io/tslint/rules/completed-docs/

@eonarheim eonarheim added the core team This issue should be done by an Excalibur core member label Jan 28, 2019
@kamranayub
Copy link
Member

I think we want:

"completed-docs": [
  {
    "classes": {"visibilities": ["exported"]},
    "enums": {"visibilities": ["exported"]},
    "enum-members": {"visibilities": ["exported"]},
    "interfaces": {"visibilities": ["exported"]},
    "functions": {"visibilities": ["exported"]},
    "methods": {"privacies": ["public", "protected"]},
    "properties": {"privacies": ["public", "protected"]}
  }
]

And we should start out with this rule as a warning, not error, while we work to address the documentation.

@eonarheim eonarheim added good first issue good for people new to open source and Excalibur and removed core team This issue should be done by an Excalibur core member labels Jan 28, 2019
@kamranayub kamranayub changed the title Write custom tslint rule to check for jsdoc on public members Enable ts-lint completed-docs rule Jan 28, 2019
@jedeen jedeen modified the milestones: 0.22.0 Release, 0.23.0 Release Apr 6, 2019
@eonarheim eonarheim removed this from the 0.23.0 Release milestone Apr 27, 2019
@chris-bingham
Copy link

@eonarheim okay to handle this one?

@eonarheim
Copy link
Member Author

@chris-bingham Actually we are recently switching to eslint given the eventual deprecation of tslint #1217 (apologies this issue lagged behind), however we would still like a similar feature in eslint if possible. If you base a branch on #1217, we'll merge your PR after #1217.

If you'd like to figure out an equivalent eslint rule to completed-docs that would be awesome! We'll update the issue to reflect that

@eonarheim eonarheim changed the title Enable ts-lint completed-docs rule Enable eslint rule equivalent to ts-lint completed-docs rule Oct 3, 2019
@chris-bingham
Copy link

Oh no I just opened a PR for tslint. But sure I'll have a look for the eslint equivalent

@eonarheim
Copy link
Member Author

This branch has our basic eslint changes feature/1212-tslint-to-eslint, if you base off of this branch we'll merge your PR next 👍

@eonarheim
Copy link
Member Author

Hi @chris-bingham, I've made some updates to the branch feature/1212-tslint-to-eslint, there was some more work to be done on this PRhttps://github.com//pull/1217 apologies if this adds some more challenge.

I did a little more digging, I think this plugin may be what you need to complete this story, it looks like it has all the things that we want 👍
https://www.npmjs.com/package/eslint-plugin-jsdoc
https://github.com/gajus/eslint-plugin-jsdoc

@chris-bingham
Copy link

Thanks for this @eonarheim, my research led me to the same plugin :)

@jedeen jedeen added the community in-progress This issue is marked in-progress. This label will be removed if there is no activity for 30 days. label Nov 24, 2019
@eonarheim
Copy link
Member Author

@chris-bingham Are you still working on this? If you need any help let us know.

@chris-bingham
Copy link

@eonarheim I do still intend to do this, but have been absolulely stacked since i took it on. If anyone else wants the ticket they're welcome to it but if its not been done when I get some time I'll do it :)

eonarheim added a commit that referenced this issue Sep 30, 2020
Closes #395

## Changes:

- Removes all tslint
- Updates jsdoc eslint plugin
- Fixes any existing lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community in-progress This issue is marked in-progress. This label will be removed if there is no activity for 30 days. docs Relating to documentation in any way good first issue good for people new to open source and Excalibur tools
Projects
None yet
4 participants