• 我的vscode配置和eslint配置


    还是记一下记一下
    vscode 配置:

    {
        "editor.fontSize": 15,
        "editor.formatOnType": true,
        "workbench.colorCustomizations": {
            "colors": "#a33d02",
            "activityBar.background": "#a33d02",
            "list.list.activeSelectionBackground": "#ff3e03"
        },
        "workbench.iconTheme": "material-icon-theme",
        "editor.quickSuggestions": {
            "other": true,
            "comments": false,
            "strings": false
        },
        "terminal.integrated.fontSize": 15,
        "todo-tree.highlights.defaultHighlight": {
            "icon": "checklist",
            "type": "text",
            "foreground": "white",
            "background": "#ffab00",
            "borderRadius": "2px",
            "gutterIcon": true,
            "iconColour": "#ffab00"
        },
        "todo-tree.highlights.customHighlight": {
            "FIXME": {
                "background": "#FF69B4",
                "icon": "alert",
                "iconColour": "#FF69B4"
            }
        },
        "todo-tree.general.tags": [
            "BUG",
            "HACK",
            "FIXME",
            "TODO",
            "XXX",
            "[ ]",
            "[x]"
        ],
        "todo-tree.regex.regex": "(//|#|<!--|;|/\*|^|^\s*(-|\d+.))\s*($TAGS)",
        "javascript.updateImportsOnFileMove.enabled": "always",
        "files.eol": "
    ",
        "editor.formatOnSave": true,
        "javascript.format.enable": false,
        "eslint.alwaysShowStatus": true,
        "eslint.options": {
            "extensions": [
                ".html",
                ".js",
                ".jsx",
                ".vue"
            ]
        },
        "eslint.validate": [
            "javascript",
            "html",
            "vue"
        ],
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": true
        },
        "vetur.format.defaultFormatter.html": "js-beautify-html",
        "vetur.format.options.tabSize": 4,
        "vetur.format.options.useTabs": true,
        "vetur.validation.template": true,
        "vetur.format.defaultFormatterOptions": {
            "js-beautify-html": {
                "wrap_attributes": "force-aligned" //属性强制折行对齐
            },
            "prettier": {
                "singleQuote": true,
                "trailingComma": 1,
            }
        }
    }
    

    eslint配置:

    module.exports = {
        parser: 'vue-eslint-parser',
        env: {
            browser: true,
            es6: true,
            node: true
        },
        extends: 'semistandard',
        parserOptions: {
            parser: 'babel-eslint',
            sourceType: 'module',
            ecmaVersion: 8
        },
        rules: {
            'no-return-await': 'off',
            'camelcase': 2,
            'no-console': 'off',
            "no-tabs": 0,
            indent: [
                'error',
                4,
                {
                    SwitchCase: 1
                }
            ],
            'linebreak-style': [
                'error',
                'unix'
            ],
            quotes: [
                1,
                'single'
            ],
            semi: [
                1,
                'always'
            ],
            'no-console': 1,
            'space-before-function-paren': 0,
            'no-multiple-empty-lines': [
                'off'
            ]
        },
        globals: {
            $: true,
            __BROWSER__: true,
            __DEV__: true,
            __SIT__: true,
            __UAT__: true,
            __PROD__: true,
            __DEBUG_UAT__: true,
            __DEBUG_PROD__: true,
            __VPC__: true,
            describe: true,
            it: true,
            BMap: true,
            document: true,
            window: true
        }
    };
    

    eslint package.js

        "eslint": "^5.16.0",
        "babel-eslint": "^10.1.0",
        "eslint-plugin-vue": "^6.2.2",
        "eslint-config-semistandard": "^16.0.0",
        "eslint-config-standard": "^12.0.0",
        "eslint-plugin-import": "^2.16.0",
        "eslint-plugin-node": "^8.0.1",
        "eslint-plugin-promise": "^4.1.1",
        "eslint-plugin-standard": "^4.0.0"
    
  • 相关阅读:
    解析excel表格为DataSet
    easyui 上传文件代码
    上传文件后台代码
    easyui dialog
    C++ 强制设置文件大小
    std::function与std::bind
    glog 编译报错 ERROR macro is defined. Define GLOG_NO_ABBREVIATED_SEVERITIES before including logging.h. See the document for detail.
    Qt删除目录
    C++11 中的std::function和std::bind
    TortoiseGit 使用教程
  • 原文地址:https://www.cnblogs.com/JohannaFeng/p/15273234.html
Copyright © 2020-2023  润新知