question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

extending shareable config by scope fails to find package

See original GitHub issue

Expected Behavior

As documented here and implemented here, I should be able to extend my config by scope alone.

Current Behavior

In the case of this shareable config, extending @form8ion fails, but extending @form8ion/commitlint-config works properly.

Error Details
Error: Cannot find module "@form8ion" from "/Users/travi/development/form8ion/cli"
    at resolveId (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:120:14)
    at resolveConfig (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:95:20)
    at reduce (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:49:20)
    at Array.reduce (<anonymous>)
    at loadExtends (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:47:32)
    at resolveExtends (/Users/travi/development/form8ion/cli/node_modules/@commitlint/resolve-extends/lib/index.js:30:19)
    at Object.$If_1 (/Users/travi/development/form8ion/cli/node_modules/@commitlint/load/lib/index.js:69:45)
    at Object.<anonymous> (/Users/travi/development/form8ion/cli/node_modules/@commitlint/load/lib/index.js:142:17)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

  1. Clone https://github.com/form8ion/remark-lint-preset
  2. Remove /commitlint-config from .commitlintrc.js
  3. Attempt to make a commit
  4. See Error

Context

I’m attempting to use a new config for a new org. Configs I’ve used for other orgs have not been scoped, but would like to start using scoped configs instead. This is stopping me from using the short form and instead forcing me to use the full package name.

Your Environment

Executable Version
commitlint --version 7.5.2
git --version 2.21.0
node --version v10.15.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
marioneblcommented, May 31, 2019

8.0 now is our latest release so this works by default 🚀

2reactions
travicommented, Apr 26, 2019

no worries. in a way im actually glad that the docs update made it out first, which i normally wouldnt think. otherwise i would have assumed it wasnt planned and just continued using the old convention. at least enabled me to learn that it was planned and i could watch for it.

either way, im a big fan. keep up the good work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot extend from scoped npm packages #9868 - GitHub
When I try to use my scoped package in my eslintrc file, eslint "helps" me out by editing the /config portion of the...
Read more >
How to Create Your Own ESLint Config Package
ESLint is designed to be completely configurable, giving you the option of enabling/disabling each rule, or mixing the rules to match your needs ......
Read more >
Shareable Configs - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Data Extension read-access via Installed Packages Scope
The Data Extension read permission just grants access to the container, relationships, filters and shared DE folders.
Read more >
ESLint - Error: Must use import to load ES Module
2", line in my package.json file of the root folder. Go to node_modules/@react-native-community/eslint-config; Edit package.json, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found