Skip to content

Sublime Jsformat #20

@hackshen

Description

@hackshen

官方默认配置文件

{
    // exposed jsbeautifier options
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 4,
    "space_in_paren": false,
    "space_in_empty_paren": false,
    "space_after_anon_function": false,
    "jslint_happy": false,
    "brace_style": "collapse",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "eval_code": false,
    "unescape_strings": false,
    "unindent_chained_methods": false,
    "break_chained_methods": false,
    "e4x": false,
    "wrap_line_length": 0,
    "comma_first": false,
    "operator_position": "before-newline",

    // jsformat options
    "format_on_save": false,
    "format_selection": true,
    "jsbeautifyrc_files": false,
    "ignore_sublime_settings": true,
    "format_on_save_extensions": ["js", "json"]
}

我的配置文件

{
    "e4x": true,  // 支持JSX
    "format_on_save": true, // 保存时自动格式化
    "indent_size": 4, // 缩进4个字符
    "format_on_save_extensions": ["js", "json", "jsx"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions