jsbeautify配置文件

jsbeautify配置文件

module.exports = {
    parsers: {
        ".js": "js",
        ".json": "js",
        ".njs": "js",
        ".css": "css",
        ".nss": "css",
        ".wxss": "css",
        ".html": "html",
        ".ux": "html",
        ".wxml": "html",
        ".nml": "html",
        ".vue": "html",
        ".nvue": "html"
    },
    options: {
        "indent_size":2,
        "indent_char": " ",
        "indent_with_tabs": false, //使用tab缩进
        "eol": "\n", //行结束符
        "end_with_newline": false, //使用换行结束输出
        "indent_level": 0, //起始代码缩进数
        "preserve_newlines": true, //保留空行
        "max_preserve_newlines": 2, //最大连续保留换行符个数。比如设为2,则会将2行以上的空行删除为只保留1行
        "space_in_paren": false, //括弧添加空格 示例 f( a, b )
        "space_in_empty_paren": false, //函数的括弧内没有参数时插入空格 示例 f( )
        "jslint_happy": false, //启用jslint-strict模式
        "space_after_anon_function": false, //匿名函数的括号前加空格
        "brace_style": "collapse", //代码样式,可选值 [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline
        "unindent_chained_methods": false, //不缩进链式方法调用
        "break_chained_methods": true, //在随后的行中断开链式方法调用
        "keep_array_indentation": true, //保持数组缩进
        "unescape_strings": false, //使用xNN符号编码解码可显示的字符
        "wrap_line_length": 120,
        "e4x": false, //支持jsx
        "comma_first": false, //把逗号放在新行开头,而不是结尾
        "operator_position": "before-newline",
        "unformatted": ["wbr"],
        "html": {
            "indent_handlebars": true,
            "indent_inner_html": true,
            "indent-scripts": "normal", //[keep|separate|normal]
            "extra_liners": [] //配置标签列表,需要在这些标签前面额外加一空白行
        }
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


uuid javascript语言代码function uuid() {   return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
js关闭当前页面
二维数组动态定义,赋值。 例如创建一个N行2列的二维数组。
jQuery实现PHP的htmlspecialchars的功能
js关闭当前页面
提取网页中的表格,把输出的内容复制粘贴到表格即可
js中,将数字字符串转换成数字,parseInt不是很好的办法,因为当你忘了传第二个参数的时候,会出现一些问题
javascript 中,删除一个数组,应该使用`arr.length = 0`,而不是`delete a`
广告屏蔽检测
js根据相对url获取绝对url的一种方式
404模板
vscode settings.json
简单的数组排序
简单的数组去重
React + nodejs 提交成功界面(包含进度条)
在线统计owhat集资金额
混合数组深度去重,源自项目 gQuery.js
jsbeautify配置文件
匹配邮箱
源代码: vue特效70行代码,一片动态星空 视频地址: https://www.bilibili.com/video/BV1EJ411e7sr