unexpected new line has been added within example
See original GitHub issuereproduce:
- npm i prettier-plugin-jsdoc@latest
- VScode reload window
- write some code
/**
* ABCCCC
*
* @example <caption>DDDD</caption>
*
* const MyHook = () => {
* const config useConfig(state => state.config)
* return <span></span>
* }
*
* const useMyHook = () => {
* const config useConfig(state => state.config)
* return config
* }
*
* @example <caption>AAAA</caption>
* const config = useConfig.getState().config
*/
- save
- it’s become
/**
* ABCCCC
*
* @example <caption>DDDD</caption>
*
* <------here, a new line has been added
* const MyHook = () => {
* const config useConfig(state => state.config)
* return <span></span>
* }
*
* const useMyHook = () => {
* const config useConfig(state => state.config)
* return config
* }
*
* @example <caption>AAAA</caption>
* const config = useConfig.getState().config
*/
context
-
node -vv14.16.0 -
.prettierrc.js
// @ts-check
/**
* @type{{ overrides: { files: string | string[], options: import('prettier').Options }[] }}
*/
const overrides = {
overrides: [
{
files: '*.js',
options: {
parser: 'babel',
printWidth: 100,
},
},
{
files: ['*.json', '.*rc'],
options: {
parser: 'json',
printWidth: 100,
},
},
{
files: '*.vue',
options: {
parser: 'vue',
printWidth: 100,
},
},
{
files: '*.htmlx',
options: {
htmlWhitespaceSensitivity: 'strict',
parser: 'html',
printWidth: 100,
},
},
{
files: '*.scss',
options: {
parser: 'scss',
printWidth: 100,
},
},
],
}
/**
* @type{import('prettier').Options}
*/
const config = {
arrowParens: 'avoid',
bracketSpacing: true,
insertPragma: false,
jsxBracketSameLine: false,
jsxSingleQuote: true,
parser: 'typescript',
proseWrap: 'preserve',
requirePragma: false,
semi: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
printWidth: 100,
}
module.exports = { ...config, ...overrides }
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
bash: syntax error near unexpected token `newline
What is the reason for this problem? I am running the command as root. bash · syntax · newline · token.
Read more >How to fix the “syntax error near unexpected token `newline ...
Oftentimes when we are using Bash scripting or the git add command, we can run into this error “syntax error near unexpected token...
Read more >ERROR newline unexpected · Issue #221 · Ultimaker/cura-build
A newline is a character that tells the computer that a new line is starting. Basically the character that it stores when you...
Read more >syntax error near unexpected token `newline - 华为云
Symptom. The message syntax error near unexpected token `newline' is displayed after the git add command is executed.
Read more >Getting an unexpected newline in my while loop line-by-line ...
I'm trying to get a line returned as is from the below input. csv file in Bash in Linux, and somehow I get...
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 Free
Top 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

Unexpected new line fixed version: 0.3.21
@hosseinmd, do you have PayPal? I want to buy you coffee.