Closed tommytroylin closed 11 months ago
Hi, your config should be like this
module.exports = {
plugins: [
require.resolve('prettier-plugin-jsdoc'),
],
overrides: [
{
files: '*.md',
plugins: [],
options: {
jsdocParser: false
},
},
],
}
@hosseinmd
plugins
field in overrides
seems to not be working at all
my config is
module.exports = {
pluginSearchDirs: false,
plugins: [
require.resolve('prettier-plugin-organize-imports'),
require.resolve('prettier-plugin-packagejson'),
require.resolve('prettier-plugin-jsdoc'),
],
printWidth: 80,
proseWrap: 'never',
singleQuote: true,
trailingComma: 'all',
overrides: [
{
files: '*.md',
plugins: [require.resolve('prettier-plugin-organize-imports')],
options: {
proseWrap: 'preserve',
jsdocParser: false,
},
},
],
organizeImportsSkipDestructiveCodeActions: true,
};
and VSCode output something like
["INFO" - 10:44:15] File Info:
{
"ignored": false,
"inferredParser": "markdown"
}
["INFO" - 10:44:15] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 10:44:15] Prettier Options:
{
"filepath": "./form/index.md",
"parser": "markdown",
"useTabs": false,
"tabWidth": 2,
"endOfLine": "lf",
"pluginSearchDirs": false,
"plugins": [
"./node_modules/prettier-plugin-organize-imports/index.js",
"./node_modules/prettier-plugin-packagejson/lib/index.js",
./node_modules/prettier-plugin-jsdoc/dist/index.js"
],
"printWidth": 80,
"proseWrap": "preserve",
"singleQuote": true,
"trailingComma": "all",
"organizeImportsSkipDestructiveCodeActions": true,
"jsdocParser": false
}
Sorry, Add plugins to options
module.exports = {
plugins: [
require.resolve('prettier-plugin-jsdoc'),
],
overrides: [
{
files: '*.md',
options: {
plugins: [],
jsdocParser: false
},
},
],
}
many thanks
in out project we disable jsdoc plugin like this
since jsdoc plugin may mass our
FrontMatter
commentsso is there an another way to tell jsdoc plugin do not format these jsdoc comments or this file?