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
module.exports = {
options: {
'indent_size': 4,
'indent_char': '\t',
'indent_with_tabs': false,
'eol': '\r\n',
'end_with_newline': false,
'indent_level': 0,
'editorconfig': false,
'preserve_newlines': true,
'max_preserve_newlines': null,
'space_in_paren': false,
'space_in_empty_paren': false,
'jslint_happy': false,
'space_after_anon_function': false,
'space_after_named_function': false,
'brace_style': 'collapse',
'unindent_chained_methods': false,
'break_chained_methods': false,
'keep_array_indentation': false,
'unescape_strings': false,
'wrap_line_length': 0,
'e4x': false,
'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,
'indent-scripts': 'separate',
'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,
'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,
'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,
'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',
'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
module.exports = {
printWidth: 140,
tabWidth: 4,
useTabs: true,
embeddedLanguageFormatting: 'auto',
endOfLine: 'lf',
singleQuote: true,
bracketSpacing: true,
bracketSameLine: true,
singleAttributePerLine: false,
semi: true,
jsxSingleQuote: true,
quoteProps: 'as-needed',
arrowParens: 'avoid',
trailingComma: 'none',
htmlWhitespaceSensitivity: 'ignore',
vueIndentScriptAndStyle: false,
proseWrap: 'preserve',
parsers: {}
};
eslint-js配置文件→ .eslintrc.js
module.exports = {
plugins: ['html', 'vue'],
parserOptions:
{
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: { jsx: true },
allowImportExportEverywhere: false
},
rules:
{
'no-alert': 0,
'no-unused-vars': 0,
'no-multi-spaces': 2,
'semi': [2, 'always'],
'quotes': [2, 'single']
}
};
eslint-vue配置文件→ .eslintrc.js
module.exports = {
extends: 'plugin:vue/base',
parserOptions:
{
ecmaVersion: 'latest',
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
}],
'vue/no-async-in-computed-properties': 2,
'vue/no-dupe-keys': 1,
'vue/no-duplicate-attributes': 1,
'vue/no-reserved-keys': 2,
'vue/no-side-effects-in-computed-properties': 2,
'vue/no-spaces-around-equal-signs-in-attribute': 1,
'vue/no-template-key': 1,
'vue/no-textarea-mustache': 2,
'vue/no-unused-vars': 1,
'vue/no-multi-spaces': 2,
'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
'vue/prop-name-casing': [1, 'camelCase'],
'vue/require-component-is': 2,
'vue/require-render-return': 2,
'vue/require-v-for-key': 2,
'vue/require-valid-default-prop': 2,
'vue/require-prop-types': 2,
'vue/return-in-computed-property': 2,
'vue/v-bind-style': [1, 'shorthand'],
'vue/v-on-style': [1, 'shorthand'],
'vue/valid-template-root': 2,
'vue/valid-v-bind': 2,
'vue/valid-v-cloak': 2,
'vue/valid-v-else-if': 2,
'vue/valid-v-else': 2,
'vue/valid-v-for': 2,
'vue/valid-v-html': 2,
'vue/valid-v-if': 2,
'vue/valid-v-model': 2,
'vue/valid-v-on': 2,
'vue/valid-v-once': 2,
'vue/valid-v-pre': 2,
'vue/valid-v-show': 2,
'vue/valid-v-text': 2,
'vue/comment-directive': 0
}
};
个人备份,仅供参考