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

Added @internal Js comments to internal API functions #2484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nveenjain
Copy link

@nveenjain nveenjain commented Mar 10, 2020

Fixes #2183
Created ESLint rule to check whether internal API functions are properly annotated or not
Added support to get list of public API functions (map.json created during linting) to get the json file, remove the postlint step.

Signed-off-by: Naveen Jain [email protected]

@nveenjain nveenjain force-pushed the enhancement/JSDocInternalRule branch 4 times, most recently from 3f851bb to a7f5bc7 Compare March 12, 2020 14:36
@IvanGoncharov
Copy link
Member

@nveenjain Please add ignoring of src/jsutils, src/polyfills and resources folders.
If you still find missing @internal after that, please open separate PR to add them.

@IvanGoncharov
Copy link
Member

@nveenjain Also please ignore all files under __tests__ folders.

@nveenjain nveenjain force-pushed the enhancement/JSDocInternalRule branch 2 times, most recently from e6ebbc6 to b3b56b4 Compare March 13, 2020 16:58
@@ -28,7 +28,9 @@
"test:ci": "yarn check --integrity && npm run prettier:check && npm run lint -- --no-cache && npm run check && npm run testonly:cover && npm run check:ts && npm run check:spelling && npm run build",
"testonly": "mocha --full-trace src/**/__tests__/**/*-test.js",
"testonly:cover": "nyc npm run testonly",
"lint": "eslint --rulesdir './resources/eslint-rules' --rule 'no-dir-import: error' --cache --ext .js,.ts src resources",
"prelint": "node resources/generate-exported",
"lint": "eslint --rulesdir './resources/eslint-rules' --rule 'no-dir-import: error' --cache --ext .js,.ts src resources && eslint --rulesdir ./resources/eslint-rules/ --rule 'internal-func: 1' src --ignore-pattern 'src/jsutils/*' --ignore-pattern 'src/polyfills/*' --ignore-pattern 'src/**/__tests__/**' --ignore-pattern 'src/__tests__/*'",
Copy link
Author

Choose a reason for hiding this comment

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

@IvanGoncharov, I've ignored all the files under __tests__ by ignoring them in the when we invoke eslint itself ( using --ignore-pattern ). But the command itself turned out to be larger in length... Should i break the lint commands in two parts or does this work?

Created ESLint rule to check whether internal API functions are properly annotated or not
Added support to get list of puvlic API functions (map.json created during linting)

Signed-off-by: Naveen Jain <[email protected]>
@nveenjain nveenjain force-pushed the enhancement/JSDocInternalRule branch from b3b56b4 to 42fb05d Compare March 13, 2020 17:07
@nveenjain
Copy link
Author

@IvanGoncharov , is there anything else that needs to be done apart from resolving conflicts?

Base automatically changed from master to main January 27, 2021 11:10
@IvanGoncharov IvanGoncharov added this to the post-16.0.0 milestone Aug 23, 2021
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

Successfully merging this pull request may close these issues.

Annotate all internal functions with '@internal'
2 participants