Skip to content

Conversation

ckangwen
Copy link

@ckangwen ckangwen commented Jun 30, 2022

Description

这个PR是用于解决gogocode-plugin-prettier无法自定义配置项的问题。
对此提供了一个加载prettier配置文件的功能。

This PR is to solve the problem that gogocode-plugin-prettier cannot customize code format style.
Now provide a feature that support to load a prettier configuration file.

API

gogocode -s input.js -t gogocode-plugin-prettier -o output.js -p prettierrc=.prettierrc.json

Fixes

#166

parser: /\.vue$/.test(fileInfo.path) ? 'vue' : 'typescript',
});
};
const { prettierrc, rootPath } = options

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the command gogocode -s dir/input.js -t gogocode-plugin-prettier -o dir/output.js -p prettierrc=.prettierrc.json, rootPath value here would be dir instead of current working directory.

Probably options.pwdPath makes more sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants