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.

Slashs and commas are not allowd in scope?

See original GitHub issue

Expected Behavior

without slash:

➜  cra-rewired-starter git:(master) ✗ gc -m "feat(store-modules): add runtime"
husky > npm run -s precommit (node v8.11.1)

 ✔ Running tasks for {src,config}/**/*.{js,jsx,json}
 ↓ Running tasks for src/**/*.{css,less} [skipped]
   → No staged files match src/**/*.{css,less}
husky > npm run -s commitmsg (node v8.11.1)

⧗   input: feat(store-modules): add runtime
✔   found 0 problems, 0 warnings

Cli-test:

➜  cra-rewired-starter git:(master) ✗ echo "feat(components, component): subject" | ./node_modules/.bin/commitlint
⧗   input: feat(components, component): subject
✔   found 0 problems, 0 warnings

➜  cra-rewired-starter git:(master) ✗ echo "feat(components/component): subject" | ./node_modules/.bin/commitlint
⧗   input: feat(components/component): subject
✔   found 0 problems, 0 warnings

Current Behavior

Looks like there’s an extra new-line before my commit message:

➜  cra-rewired-starter git:(master) ✗ gc -m "feat(store/modules): add runtime"
husky > npm run -s precommit (node v8.11.1)

 ✔ Running tasks for {src,config}/**/*.{js,jsx,json}
 ↓ Running tasks for src/**/*.{css,less} [skipped]
   → No staged files match src/**/*.{css,less}
husky > npm run -s commitmsg (node v8.11.1)

⧗   input:
feat(store/modules): add runtime

✖   message may not be empty [subject-empty]
✖   type may not be empty [type-empty]
✖   scope may not be empty [scope-empty]
✖   found 3 problems, 0 warnings

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

https://github.com/Stupidism/cra-rewired-starter/tree/3a1c47cdcda5f585c529f78b246bc470ce64c526

commitlint.config.js ```js ```

Context

Your Environment

➜  cra-rewired-starter git:(master) ✗ node -v
v8.11.1
➜  cra-rewired-starter git:(master) npm -v
6.0.0
➜ cra-rewired-starter git:(master) ✗ grep 'version' node_modules/@commitlint/cli/package.json
    "type": "version",
  "version": "6.2.0",
Executable Version
commitlint --version VERSION
git --version VERSION
node --version VERSION

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
robin-drexlercommented, Jun 15, 2018

Ran into the same issue and tried to dig into it a bit.

If I understood correctly, commitlint falls back to conventional-changelog-angular’s presetOpts when none are provided.

The headerPatterns specified there would allow special chars to be used in scopes: /^(\w*)(?:\((.*)\))?: (.*)$/

However, presetOpts does not appear to be empty, because it already contains { commentChar: '#' }, hence the angular fallback is not used. Instead it seems that conventional-commits-parser default headerPattern is used, which does not allow special chars in scopes. /^(\w*)(?:\(([\w$.\-* ]*)\))?: (.*)$/

0reactions
meebixcommented, Oct 16, 2018

All of this “stuff” should make its way into the documentation as well. It is very confusing to figure out what options are available. Even if the docs just have links pointing to other repo options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to replace comma and forward slash in input text field
So when I type "1,23/456" in the input field and hit "enter" it should be changed to "123456". <input id="Id" ...
Read more >
Slasher Fiction? The Federal Circuit Breathes New Life Into ...
Most are about commas, and this is one of the first cases I know of to address slashes (the Federal Circuit cited no...
Read more >
Scope options for sensitive data discovery jobs - Amazon Macie
Learn about options and settings that you can use to refine the scope of sensitive data discovery jobs in Amazon Macie.
Read more >
Restrictions and conventions for naming objects - Azure DevOps
Common restrictions include not exceeding the character length for a name, ... (ASCII 1-31) and surrogate combinations are also not allowed.
Read more >
core - Apache HTTP Server Version 2.4
With the value On , such URLs are accepted, and encoded slashes are decoded ... The variable is always globally defined and not...
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