-
Notifications
You must be signed in to change notification settings - Fork 912
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
[bug] commitlint.config.js:1 SyntaxError: Invalid or unexpected token #614
Comments
I don't have a windows machine to test this, but looking at older isses others seem to have solved this: |
I got the same error. Any one else solve this problem? |
@indraraj26 @YupongUU can you upload the exact |
Hey @xCykrix , Here is mine commitlint.config.js Thank you. |
@indraraj26 for yours, make sure it is encoded with UTF-8. The file you sent me appears to be encoded with UTF-16 LE, which is known to cause issues. You can modify this in VSCode in the bottom right. Other editors may vary. Properly encoded reference, if you need it to copy text from. |
Hey @xCykrix , I can see clearly in vs code, I have encoding utf-8 , i dont know why it is taking UTF-16LE as per you. If i copy text from above link and paste in commitlink.config.js will that work? Thank you |
commitlint uses cosmiconfig to load configuration and does nothing regarding parsing/reading those files. Please consider opening this issue with cosmiconfig if the problem persists. |
in window, you can try delete this file, and create new file,do not use command line echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js in editor (vscode), wirte code |
By Default in VS code i have UTF-8 still it gives me error
commitlint.config.js
Expected Behavior
it shouldn't be throw any error
Current Behavior
I am not sure which one will i have to select.
Affected packages
Possible Solution
Steps to Reproduce (for bugs)
commitlint.config.js
```js ```Context
Your Environment
Package.json
i get this in console VS code powershell
git --version
node --version
The text was updated successfully, but these errors were encountered: