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: make our jsdoc eslint rules a bit less obnoxious #577

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

erunion
Copy link
Member

@erunion erunion commented Jan 7, 2022

🧰 Changes

The ESLint rules that we put in place for JSDoc blocks has been a bit obnoxious with TypeScript so I'm slightly tweaking it to:

  • No longer require docblocks be present on functions in TS code. But if docblocks are present they'll be validated.
  • Removing the requirement for a @returns tag. All of our existing @returns tags have essentially summarized what's already been said in the docblock summary so they've been a bit unnecessary and just add clutter.
  • Removing the requirement for TS docblocks to have parameters typed as this duplicates the types that we've got with the actual code and just worsens the documentation.

@erunion erunion added the documentation Improvements or additions to documentation label Jan 7, 2022
@erunion erunion requested review from kanadgupta, a team, Dashron and julshotal and removed request for a team January 7, 2022 00:58
@@ -31,12 +30,20 @@
},
"overrides": [
{
"files": ["__tests__/__fixtures__/*.js", "src/cli/*.js", "src/cli/commands/*.js", "src/cli/lib/*.js"],
"files": ["*.js"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this lead to node_modules being linted? Is there a way to do a verbose run and output all the files we're checking to make sure nothing obvious wrong is now included?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint ignores node_modules/ by default, but running it with --debug it doesn't look in there still.

//
// const variable = variables?.[value]
const variable = (variables[value] || {}) as RMOAS.ServerVariableObject;
const variable = variables?.[value];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 one less as!

@erunion erunion merged commit a6bac91 into main Jan 7, 2022
@erunion erunion deleted the chore/less-obnoxious-eslint branch January 7, 2022 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants