Error when linting with config-lerna-scopes
See original GitHub issueWhen trying to lint a message with config-lerna-scopes, the following error is issued:
$ echo "chore(api): fix something in api's build" | npx commitlint
/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/cli/cli.js:130
throw err;
^
TypeError: Cannot read property 'map' of undefined
at getPackages (/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/config-lerna-scopes/index.js:13:3)
at scope-enum (/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/config-lerna-scopes/index.js:6:37)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/library/execute-rule.js:23:28
at Promise (<anonymous>)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/library/execute-rule.js:21:26
at Promise (<anonymous>)
at exports.default (/Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/library/execute-rule.js:14:9)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/load.js:109:44
at Array.map (<anonymous>)
at /Users/quentinroy/Workspace/reacolo/node_modules/@commitlint/core/lib/load.js:108:79
After investigation, it seems the plugin relies on lerna/lib/Repository#packages
which does not exist anymore (at least with lerna 2.4.0)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
@commitlint/config-lerna-scopes | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >eslint throws `no-undef` errors when linting Jest test files
spec.js tests, eslint keeps throwing the following errors. It seems to think that jest , beforeEach , afterEach , etc.
Read more >How to Automate Code Linting in Next.js with ESLint & Husky ...
Linting is the practice of checking code through automated static analysis for syntax errors and optionally code style issues.
Read more >Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >What is linting and how can it save you time? - freeCodeCamp
lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You may want to have a look at #88 which seems to solve the issue for me. Not sure how to thoroughly test it though.
Thanks for raising this, will investigate right away.