【备份】HBuilderX及相关插件的配置文件

HBuilderX配置文件→Settings.json

{
	"adb.path": "",
	"alipayApp.devTools.menu.enable": false,
	"android.simulator.port": "65141",
	"baiduApp.devTools.menu.enable": false,
	"beautify.useProjectConfigFile": false,
	"bytedanceApp.devTools.menu.enable": false,
	"chrome.menu.enable": true,
	"custom.menu.enable": false,
	"defaultFomat.css": "formator-prettier",
	"defaultFomat.html_es6": "formator-prettier",
	"defaultFomat.javascript_es6": "formator-prettier",
	"defaultFomat.json": "formator-prettier",
	"defaultFomat.vue": "formator-prettier",
	"editor.caretWidth": 2,
	"editor.codeassist.px2rem.enabel": false,
	"editor.codeassist.px2upx.enabel": false,
	"editor.colorScheme": "Atom One Dark",
	"editor.editorConfigSupport": false,
	"editor.foldedCodeExpandMode": "全部展开",
	"editor.fontSize": 12,
	"editor.formatOnSave": true,
	"editor.minimap.maxPixelWidth": 32,
	"editor.mouseWheelZoom": false,
	"editor.onlyHighlightWord": true,
	"editor.renderWhitespace": true,
	"editor.saveFoldStatus.enabled": false,
	"editor.saveOnFocusLost": true,
	"editor.scrollBeyondLastLine": true,
	"editor.showEndOfLine": false,
	"editor.tokenColorCustomizations": {
		"[Atom One Dark]": {
			"rules": [
				{
					"scope": ["comment", "comment.block", "comment.line.double-slash", "punctuation.definition.comment"],
					"settings": {
						"fontStyle": "italic",
						"foreground": "#687c96"
					}
				},
				{
					"scope": [
						"text.html.vue",
						"meta.tag",
						"text.html.markdown",
						"punctuation.terminator.statement.tsx",
						"punctuation.terminator.statement.ts",
						"punctuation.terminator.statement.js",
						"meta.method",
						"meta.method-call",
						"punctuation.separator.key-value.scss",
						"punctuation.separator.key-value.tsx",
						"punctuation.separator.key-value.ts",
						"punctuation.separator.key-value.js"
					],
					"settings": {
						"foreground": "#c8cff0"
					}
				},
				{
					"scope": ["string"],
					"settings": {
						"foreground": "#3daa58"
					}
				},
				{
					"scope": [
						"variable",
						"entity.name.tag",
						"variable.parameter",
						"keyword.other.unit",
						"support.type.property-name",
						"punctuation.definition.constant.css",
						"variable.other.readwrite.alias.ts",
						"variable.other.readwrite.alias.js",
						"variable.other.readwrite.alias.tsx",
						"variable.other.readwrite.alias.jsx"
					],
					"settings": {
						"foreground": "#f05b68"
					}
				},
				{
					"scope": [
						"storage",
						"keyword.control",
						"keyword.operator.expression.in.js",
						"keyword.operator.expression.in.jsx",
						"keyword.operator.expression.in.tsx",
						"keyword.operator.expression.in.ts",
						"keyword.control.default.js",
						"keyword.control.default.tsx",
						"keyword.control.default.ts",
						"punctuation.definition.function-parameters",
						"punctuation.definition.seperator",
						"punctuation.definition.separator",
						"punctuation.definition.method-parameters",
						"punctuation.definition.array",
						"punctuation.definition.parameters",
						"meta.brace.round.ts",
						"meta.brace.square.js",
						"meta.array-binding-pattern-variable.js",
						"meta.brace.square.tsx",
						"meta.brace.square.ts",
						"meta.array-binding-pattern-variable.tsx",
						"meta.brace.round.js",
						"meta.brace.round.tsx",
						"meta.array-binding-pattern-variable.ts"
					],
					"settings": {
						"foreground": "#f055cc"
					}
				},
				{
					"scope": [
						"constant",
						"variable.other.readwrite.ts",
						"variable.other.readwrite.tsx",
						"variable.other.readwrite.js",
						"variable.other.constant.property.ts",
						"variable.other.constant.property.tsx",
						"variable.other.constant.property.js",
						"support.constant.property-value.css",
						"constant.other.color",
						"constant.numeric",
						"variable.other.constant.tsx",
						"variable.other.constant.ts",
						"variable.other.constant.js",
						"variable.other.constant.jsx",
						"support.type",
						"entity.name.type"
					],
					"settings": {
						"foreground": "#f0db84"
					}
				},
				{
					"scope": ["keyword.operator"],
					"settings": {
						"foreground": "#50f0f0"
					}
				},
				{
					"scope": ["entity.other.attribute-name"],
					"settings": {
						"foreground": "#f09560"
					}
				},
				{
					"scope": ["support.function", "entity.name.function"],
					"settings": {
						"foreground": "#1eaef0"
					}
				}
			]
		}
	},
	"editor.wordWrap": true,
	"editor.wordWrapMode": "word",
	"emmet.codeassist": true,
	"eslint-js.validateOnDocumentChanged": false,
	"eslint-vue.validateOnDocumentChanged": false,
	"explorer.fileReveal.policy": "default",
	"explorer.fontSize": "12",
	"explorer.iconTheme": "hx-file-icons-colorful",
	"explorer.showClosedProject": false,
	"feishuApp.devTools.menu.enable": false,
	"files.associations.contextmenu": true,
	"files.associations.suffixs": "css,htm,html,htmlhintrc,js,json,md,mjs,nvue,txt,vue,wxml,wxss,xml",
	"files.associations.types.mdfile": true,
	"files.exclude": "**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store,.settings,.project,.HBuilder,.hbuilderx,.vite,unpackage",
	"javascript.validate.enable": true,
	"jingdongApp.devTools.menu.enable": false,
	"jre.path": "C:\\Program Files\\Java\\jre-1.8\\bin",
	"kuaishouApp.devTools.menu.enable": false,
	"node.path": "",
	"npm.path": "",
	"prettier._enable": true,
	"prettier.scope": "**/*.html,**/*.vue,**/*.nvue,**/*.ux,**/*.js,**/*.json,**/*.ts,**/*.tsx,**/*.css,**/*.less,**/*.sass,**/*.scss",
	"prettier.useEditorIndentStyle": false,
	"prettier.useProjectConfigFile": false,
	"qqApp.devTools.menu.enable": false,
	"quickAppUnion.devTools.menu.enable": false,
	"terminal.maxcount": "4",
	"terminal.type": "内置终端",
	"typescript.validate.enable": true,
	"weApp.devTools.path": "D:/Tencent/微信web开发者工具",
	"workbench.colorCustomizations": {
		"[Atom One Dark]": {
			"console.ad": "#aa55ff",
			"console.background": "#22262d",
			"console.error": "#dd524d",
			"console.foreground": "#9ba4b4",
			"console.success": "#4cd964",
			"console.time": "#999999",
			"console.warn": "#f0ad4e",
			"debug.foreground": "#9ba4b4",
			"editor.background": "#282c34",
			"editor.caret": "#55aaff",
			"editor.caretLine": "#2c313c",
			"editor.foreground": "#9ba4b4",
			"editor.hyperlink": "#55aaff",
			"editor.indentguide": "#51545a",
			"editor.indicator.matchtag": "#ffffff",
			"editor.indicator.sameword": "#e4edff",
			"editor.linenumber": "#6c7078",
			"editor.selectRegion": "#ff9463",
			"editor.whitespace": "#3f4146",
			"editorGroup.border": "#444b5a",
			"editorGroupHeader.tabsBackground": "#1e2228",
			"menubar.background": "#262a32",
			"menubar.foreground": "#9ba4b4",
			"minimap.handle.background": "#4d5668",
			"outlineBackground": "#1e2228",
			"panelTitle.activeForeground": "#55aaff",
			"scrollbarSlider.background": "#5d6378",
			"scrollbarSlider.hoverBackground": "#7e87a2",
			"sideBar.background": "#1e2228",
			"sideBar.border": "#444b5a",
			"statusBar.background": "#4d78cc",
			"statusBar.foreground": "#ccedfa",
			"tab.activeBackground": "#282c34",
			"tab.border": "#444b5a",
			"tab.hoverBackground": "#282c34",
			"tab.inactiveBackground": "#1e2228",
			"tab.inactiveForeground": "#868f9d",
			"terminal.background": "#1e2228",
			"toolBar.background": "#1e2228",
			"toolBar.border": "#444b5a",
			"toolBar.hoverBackground": "#5d6878"
		}
	}
}

插件

Beautify Formator配置文件→jsbeautifyrc.js
//配置文档参考:https://www.npmjs.com/package/js-beautify#options
module.exports = {
	options: {
		'indent_size': 4,
		'indent_char': '\t',
		'indent_with_tabs': false, //使用tab缩进
		'eol': '\r\n', //行结束符
		'end_with_newline': false, //使用换行结束输出
		'indent_level': 0, //起始代码缩进数
		'editorconfig': false,
		'preserve_newlines': true, //保留空行
		'max_preserve_newlines': null, //最大连续保留换行符个数。比如设为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, //匿名函数的括号前加空格
		'space_after_named_function': false,
		'brace_style': 'collapse', //代码样式,可选值 [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline
		'unindent_chained_methods': false, //不缩进链式方法调用
		'break_chained_methods': false, //在随后的行中断开链式方法调用
		'keep_array_indentation': false, //保持数组缩进
		'unescape_strings': false, //使用xNN符号编码解码可显示的字符
		'wrap_line_length': 0,
		'e4x': false, //支持jsx
		'comma_first': false, //把逗号放在新行开头,而不是结尾
		'operator_position': 'before-newline', //操作符的位置
		'unformatted': ['wbr'],

		'html': {
			'wrap_attributes': 'auto', //包装属性
			'wrap-attributes-indent-size': 1, //换行属性缩进大小
			'inline': undefined, //内联
			'unformatted': undefined, //无格式
			'content_unformatted': undefined, //无格式的内容
			'indent_handlebars': true,
			'indent_inner_html': true, //HTML内部缩进
			'indent-scripts': 'separate', //缩进脚本,值包括:[keep|separate|normal]
			'extra_liners': ['script', 'style'] //配置标签列表,需要在这些标签前面额外加一空白行
		},

		'css': {
			'selector-separator-newline': false, //选择分隔符换行
			'newline-between-rules': false //规则间换行
		},

		'js': {
			'convert_tabs_to_spaces': true, //将制表符转换为空格
			'indent_multi_line_object_literal_beginning_on_blank_line': true, //缩进从空白行开始的多行对象文字
			'insert_space_after_comma_delimiter': true, //在逗号分隔符后插入空格
			'insert_space_after_constructor': true, //在构造函数后插入空格
			'insert_space_after_function_keyword_for_anonymous_functions': true, //对于匿名函数,在function关键字后插入空格
			'insert_space_after_keywords_in_control_flow_statements': true, //在控制流语句的关键字后面插入空格
			'insert_space_after_opening_and_before_closing_empty_braces': false, //在开始和结束空大括号之前插入空格
			'insert_space_after_opening_and_before_closing_jsx_expression_braces': false, //在JSX表达式大括号前后插入空格
			'insert_space_after_opening_and_before_closing_nonempty_braces': true, //在非空大括号之后和结束之前插入空格
			'insert_space_after_opening_and_before_closing_nonempty_brackets': false, //在非空方括号的前后插入空格
			'insert_space_after_opening_and_before_closing_nonempty_parenthesis': false, //在非空圆括号的前后插入空格
			'insert_space_after_opening_and_before_closing_template_string_braces': true, //在开始模板字符串大括号之后和结束模板字符串大括号之前插入空格
			'insert_space_after_semicolon_in_for_statements': true, //在for语句的分号后插入空格
			'insert_space_after_type_assertion': false, //在类型断言后插入空格
			'insert_space_before_and_after_binary_operators': true, //在二进制运算符前后插入空格
			'insert_space_before_function_parenthesis': false, //在函数括号前插入空格
			'insert_space_before_type_annotation': true, //在类型注释之前插入空格
			'place_open_brace_on_new_line_for_control_blocks': false, //将开括号放在控制块的新行上
			'place_open_brace_on_new_line_for_functions': false, //将开大括号放在函数的新行上
			'semicolons': 'ignore', //分号,值包括:"ignore" | "insert" | "remove"
			'trim_trailing_whitespace': true //修整尾部空白
		}
	},
	parsers: {
		'.html': 'html',
		'.ux': 'html',
		'.wxml': 'html',
		'.nml': 'html',
		'.vue': 'html',
		'.nvue': 'html',
		'.axml': 'html',
		'.swan': 'html',
		'.ttml': 'html',
		'.qml': 'html',
		'.js': 'js',
		'.json': 'js',
		'.njs': 'js',
		'.sjs': 'js',
		'.wxs': 'js',
		'.css': 'css',
		'.nss': 'css',
		'.wxss': 'css',
		'.acss': 'css',
		'.ttss': 'css',
		'.qss': 'css'
	}
};
Prettier配置文件→prettier.config.js
// Prettier配置文档:https://prettier.io/docs/en/options.html
module.exports = {
	//全局的
	printWidth: 140, //指定prettier将换行的行长
	tabWidth: 4, //指定每个缩进级别的空格数
	useTabs: true, //用制表符而不是空格缩进
	embeddedLanguageFormatting: 'auto', //控制 Prettier 是否格式化嵌入在文件中的引用代码,可选值:auto|off
	endOfLine: 'lf', //行尾换行符,可选值:lf|crlf|cr|auto

	//公共的
	singleQuote: true, //使用单引号而不是双引号
	bracketSpacing: true, //对象字面量中括号之间的空格
	bracketSameLine: true, //将 > 多行 HTML(HTML、JSX、Vue、Angular)元素放在最后一行的末尾,而不是单独放在下一行(不适用于自关闭元素)
	singleAttributePerLine: false, //在 HTML、Vue 和 JSX 中强制执行每行单个属性

	//JavaScript
	semi: true, //在语句末尾打印分号
	jsxSingleQuote: true, //在 JSX 中使用单引号而不是双引号
	quoteProps: 'as-needed', //Object 对象中 key 值是否加引号,可选值:as-needed|consistent|preserve
	arrowParens: 'avoid', //在唯一的箭头函数参数周围包含括号,可选值:always|avoid
	trailingComma: 'none', //在多行逗号分隔的句法结构中尽可能打印尾随逗号,可选值:es5|none|all

	//HTML
	htmlWhitespaceSensitivity: 'ignore', //指定 HTML、Vue、Angular 和 Handlebars 的全局空格敏感度,可选值:css|strict|ignore
	vueIndentScriptAndStyle: false, //Vue文件 script 和 style 标签中是否缩进

	//Markdown
	proseWrap: 'preserve', //超过最大宽度是否换行,可选值:always|never|preserve

	//自定义文件后缀对应的parser
	parsers: {}
};
eslint-js配置文件→ .eslintrc.js
//详细配置教程请参考:http://eslint.cn/docs/user-guide/configuring
module.exports = {
	plugins: ['html', 'vue'],
	parserOptions:
	{
		ecmaVersion: 'latest', //ECMAScript 版本
		sourceType: 'module',
		ecmaFeatures: { jsx: true }, //启用jsx
		allowImportExportEverywhere: false
	},
	rules:
	{
		'no-alert': 0,
		'no-unused-vars': 0, //禁止出现未使用过的变量
		'no-multi-spaces': 2, // 禁止多个空格 
		'semi': [2, 'always'], // 自动补充分号
		'quotes': [2, 'single'] // 使用单引号
	}
};
eslint-vue配置文件→ .eslintrc.js
//更详细的配置文档请参考:https://github.com/vuejs/eslint-plugin-vue#gear-configs
module.exports = {
	extends: 'plugin:vue/base',
	parserOptions:
	{
		ecmaVersion: 'latest', //ECMAScript 版本
		sourceType: 'module'
	},
	settings:
	{
		'html/html-extensions': [
			'.erb',
			'.handlebars',
			'.hbs',
			'.htm',
			'.html',
			'.mustache',
			'.nunjucks',
			'.php',
			'.tag',
			'.twig',
			'.wxml',
			'.we'
		]
	},
	rules:
	{
		'no-alert': 0,
		'no-unused-vars': 0, //禁止出现未使用过的变量
		'no-multi-spaces': 2, // 禁止多个空格 
		'semi': [2, 'always'], // 自动补充分号
		'quotes': [2, 'single'], // 使用单引号

		'no-multiple-empty-lines': [2,
		{
			'max': 1
		}], //空行最多不能超过1行

		'vue/no-async-in-computed-properties': 2, //在computed properties中禁用异步actions
		'vue/no-dupe-keys': 1, //不允许重复的keys
		'vue/no-duplicate-attributes': 1, //不允许重复的attributes
		'vue/no-reserved-keys': 2, //不允许覆盖保留关键字
		'vue/no-side-effects-in-computed-properties': 2, //不允许在computed properties中出现副作用。
		'vue/no-spaces-around-equal-signs-in-attribute': 1, //元素的属性的等号前后不允许有空格,即不允许
		'vue/no-template-key': 1, //