主题
🌐 Inline ignore comments
对于 JS/TS 文件,使用 oxfmt-ignore 来跳过格式化下一条语句:
oxfmt-ignore
🌐 For JS/TS files, use oxfmt-ignore to skip formatting the next statement:
// oxfmt-ignore const a = 42; /* oxfmt-ignore */ const x = () => { return 2; }; <> {/* oxfmt-ignore */} <span ugly format="" /> </>;
对于非 JS 文件,使用 prettier-ignore 注释。另请参阅 Prettier 的忽略文档。
prettier-ignore
🌐 For non-JS files, use prettier-ignore comment. See also Prettier's ignore documentation.
目前,TOML 文件不支持忽略注释。
🌐 Currently, TOML files do not support ignore comments.
🌐 Prettier compatibility
行内忽略注释
🌐 Inline ignore comments
对于 JS/TS 文件,使用
oxfmt-ignore来跳过格式化下一条语句:🌐 For JS/TS files, use
oxfmt-ignoreto skip formatting the next statement:对于非 JS 文件,使用
prettier-ignore注释。另请参阅 Prettier 的忽略文档。🌐 For non-JS files, use
prettier-ignorecomment. See also Prettier's ignore documentation.目前,TOML 文件不支持忽略注释。
🌐 Currently, TOML files do not support ignore comments.
Prettier 兼容性
🌐 Prettier compatibility
prettier-ignore注释也被支持