eslint-plugin-docstring-checker
v1.0.9
Published
ESLint plugin to require docstrings and detect Vietnamese docstrings in TypeScript/Nuxt3 projects.
Maintainers
Readme
eslint-plugin-docstring-checker
ESLint plugin to ensure all functions have docstrings and detect Vietnamese docstrings in Nuxt3 / TypeScript codebases.
Install
npm install --save-dev eslint-plugin-docstring-checkerUsage
- Add to your ESLint configuration
export default [
{
plugins: {
'docstring-checker': require('eslint-plugin-docstring-checker'),
},
rules: {
'docstring-checker/require-docstring': ['warn', { minLines: 10 }],
},
},
];
- Or simply use the preset:
export default [
{
extends: ['plugin:docstring-checker/recommended'],
},
];
Configuration
- minLines: Only check if number line of function over minLines
Output result
- After running ESLint:
npx eslint- Output format:
Docstring Summary Report:
- Total functions: 3
- With docstring: 2
- Without docstring: 1
- Vietnamese docstrings: 1
- English/Japanese docstrings: 1
- Google-style compliant: 0
- Coverage: 66.67%
- Google Style Coverage: 0.00%