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

Consider using eslint-plugin-jsdoc #142

Open
jthegedus opened this issue Sep 16, 2021 · 1 comment
Open

Consider using eslint-plugin-jsdoc #142

jthegedus opened this issue Sep 16, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@jthegedus
Copy link
Owner

I am sure the quality of the JSDoc could be improved. We should investigate using this eslint plugin to help:

@jthegedus
Copy link
Owner Author

jthegedus commented Sep 16, 2021

Got this error 🤷

svelte-adapter-firebase on  main [$!] is 📦 v0.12.0 via ⬢ v14.17.5 took 3s 
➜ pnpm add -D eslint-plugin-jsdoc
 WARN  [email protected] requires a peer of eslint@^6.0.0 || ^7.0.0 but none was installed.
 WARN  @sveltejs/kit > @sveltejs/vite-plugin-svelte: [email protected] requires a peer of svelte@>=3.19.0 but none was installed.
 WARN  @sveltejs/kit: @sveltejs/[email protected] requires a peer of svelte@^3.34.0 but none was installed.
 WARN  @sveltejs/[email protected] requires a peer of svelte@^3.39.0 but none was installed.
 WARN  [email protected] requires a peer of firebase-admin@^8.0.0 || ^9.0.0 but none was installed.
 WARN  1 other warnings
Packages: +5
+++++
Progress: resolved 198, reused 193, downloaded 5, added 5, done

devDependencies:
+ eslint-plugin-jsdoc 36.1.0
svelte-adapter-firebase on  main [$!] is 📦 v0.12.0 via ⬢ v14.17.5 took 4s 
➜ pnpm run test

> [email protected] test /home/jthegedus/projects/svelte-adapter-firebase
> xo && uvu tests/unit

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/jthegedus/projects/svelte-adapter-firebase/node_modules/.pnpm/[email protected]/node_modules/array-union/index.js
require() of ES modules is not supported.
require() of /home/jthegedus/projects/svelte-adapter-firebase/node_modules/.pnpm/[email protected]/node_modules/array-union/index.js from /home/jthegedus/projects/svelte-adapter-firebase/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /home/jthegedus/projects/svelte-adapter-firebase/node_modules/.pnpm/[email protected]/node_modules/array-union/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/jthegedus/projects/svelte-adapter-firebase/node_modules/.pnpm/[email protected]/node_modules/array-union/package.json.

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1089:13)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/jthegedus/projects/svelte-adapter-firebase/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.js:3:20)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
 ERROR  Test failed. See above for more details.

@jthegedus jthegedus added the help wanted Extra attention is needed label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant