Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

ESlint JSdoc #2148

Merged
merged 16 commits into from
May 20, 2022
Merged

ESlint JSdoc #2148

merged 16 commits into from
May 20, 2022

Conversation

toasted-nutbread
Copy link
Collaborator

@toasted-nutbread toasted-nutbread commented May 20, 2022

This change updates some JSDoc comments and adds linter rules to ensure they are configured correctly.

Currently, JSDoc comments aren't required for everything, since mandating them for all private functions is overkill. However, this can be changed in the future by adding this to .eslintrc.json:

        {
            "files": [
                "ext/js/**/*.js"
            ],
            "excludedFiles": [
                "ext/lib/**/*.js"
            ],
            "rules": {
                "jsdoc/require-jsdoc": [
                    "error",
                    {
                        "contexts": [
                            {"context": "ClassDeclaration"},
                            {"context": "FunctionDeclaration"},
                            {"context": "MethodDefinition[key.name=/^[^_][\\w\\W]*/]"}
                        ]
                    }
                ]
            }
        }

@toasted-nutbread toasted-nutbread merged commit 31e20c8 into FooSoft:master May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant