Skip to content

Commit 785b4a9

Browse files
authored
Add eslint-plugin-jsdoc
Fixes #41
1 parent 025d915 commit 785b4a9

File tree

4 files changed

+120
-1
lines changed

4 files changed

+120
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ I update dependencies regularly. These are the steps:
1313
1. **Add type checking with TypeScript?** Yes, using JavaScript with JSDoc comments.
1414
1. Add ESLint, Prettier and Vitest.
1515
1. Revert `README.md`.
16+
1. Run `pnpm i -D eslint-plugin-jsdoc`.
17+
1. Check changes in `eslint.config.js` and manually revert preserving `eslint-plugin-jsdoc`.
1618
1. Delete folder `node_modules` and file `pnpm-lock.yaml` and run `pnpm i`.

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import js from '@eslint/js';
2-
import svelte from 'eslint-plugin-svelte';
32
import prettier from 'eslint-config-prettier';
3+
import jsdoc from 'eslint-plugin-jsdoc';
4+
import svelte from 'eslint-plugin-svelte';
45
import globals from 'globals';
56

67
/** @type {import('eslint').Linter.FlatConfig[]} */
@@ -9,6 +10,7 @@ export default [
910
...svelte.configs['flat/recommended'],
1011
prettier,
1112
...svelte.configs['flat/prettier'],
13+
jsdoc.configs['flat/recommended'],
1214
{
1315
languageOptions: {
1416
globals: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@types/eslint": "^8.56.7",
3636
"eslint": "^9.0.0",
3737
"eslint-config-prettier": "^9.1.0",
38+
"eslint-plugin-jsdoc": "^48.5.0",
3839
"eslint-plugin-svelte": "^2.36.0",
3940
"globals": "^15.0.0",
4041
"prettier": "^3.1.1",

pnpm-lock.yaml

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)