Slashs and commas are not allowd in scope?
See original GitHub issueExpected 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:
- Created 5 years ago
- Reactions:5
- Comments:7 (2 by maintainers)
Top 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 >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
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 defaultheaderPattern
is used, which does not allow special chars in scopes./^(\w*)(?:\(([\w$.\-* ]*)\))?: (.*)$/
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.