国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

在sublime中實(shí)現(xiàn)代碼檢測(cè)

tain335 / 3066人閱讀

在sublime中配置linter, eslint sublime插件安裝

打開(kāi)pci,安裝sublimeLinter

進(jìn)入到,對(duì)path進(jìn)行配置:

配置node的基本位置:/usr/local/bin/node, /usr/local/bin

配置node_modules的基本位置:/usr/local/lib/node_modules

配置其他各項(xiàng)插件的位置:如eslint: /usr/local/bin/eslint

示例代碼如下:

"paths": {
  "linux": [],
  "osx": [
      "/usr/local/bin/node",
      "/usr/local/lib/node_modules",
      "/usr/local/bin/eslint",
      "/usr/local/bin/jslint"
  ],
  "windows": []
}
安裝插件(以eslint為例):

安裝eslint的npm插件,包括:

sudo npm i eslint babel-eslint -g

將所安裝的工具的路徑放到的path中,即:/usr/local/bin/eslint

在項(xiàng)目中配置.eslintrc文件,類似:(每個(gè)項(xiàng)目都需要配置)

當(dāng)中包括非常多的依賴,可以在項(xiàng)目中輸入eslint .,然后根據(jù)提示對(duì)缺少的依賴進(jìn)行sudo npm i -g ***

然后就可以愉快的使用啦!

可以通過(guò)右鍵進(jìn)入到sublimelinter來(lái)調(diào)用其功能。

.eslintrc文件示例
{
    "env": {
        "browser": true,
        "node": true,
        "es6": true
    },
    "parser": "babel-eslint",
    "extends" : [
      "airbnb"
    ],
    "plugins": [
      "babel",
      "promise"
    ],
    "ecmaFeatures": {
       "jsx": true
    },
    "rules": {
        "semi": [2, "always"],
        "quotes": [2, "single"]
    }
}
最后

展示一下配置完成后的sublimelinter-user.settings

{
    "user": {
        "debug": true,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "eslint": {
                "@disable": false,
                "args": [],
                "ecmaFeatures": {
                    "jsx": true
                },
                "env": {
                    "browser": true,
                    "es6": true,
                    "node": true
                },
                "excludes": [],
                "extends": [
                    "standard"
                ],
                "parser": "babel-eslint",
                "plugins": [
                    "babel",
                    "promise"
                ],
                "rules": {
                    "quotes": [
                        2,
                        "single"
                    ],
                    "semi": [
                        2,
                        "always"
                    ]
                }
            },
            "jsxhint": {
                "@disable": false,
                "args": [],
                "excludes": []
            }
        },
        "mark_style": "stippled underline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [
                "/usr/local/bin/node",
                "/usr/local/lib/node_modules",
                "/usr/local/bin/eslint"
            ],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "javascript (babel)": "javascript",
            "magicpython": "python",
            "php": "html",
            "python django": "python",
            "pythonimproved": "python"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://m.specialneedsforspecialkids.com/yun/81139.html

相關(guān)文章

  • 工欲善其事,必先利其器 _SUBLIME TEXT 3_使用心得(上篇)

    摘要:的主要功能包括拼寫檢查,書簽,完整的,功能,即時(shí)項(xiàng)目切換,多選擇,多窗口等等。缺點(diǎn)是一款收費(fèi)軟件,不過(guò)可以無(wú)限期使用。舉個(gè)栗子快速選中并更改所有相同的變量名函數(shù)名等。設(shè)置書簽,切換書簽左右字母互換。 Sublime text 簡(jiǎn)介 Sublime text具有漂亮的用戶界面和強(qiáng)大的功能,例如代碼縮略圖,Python的插件,代碼段等。還可自定義鍵綁定,菜單和工具欄。Sublime Tex...

    endless_road 評(píng)論0 收藏0
  • sublime的js代碼檢測(cè)的插件(by jshint)

    項(xiàng)目地址:Sublime-JSHint 安裝 Ctrl+Shift+P or Cmd+Shift+P in Linux/Windows/OS X 輸入 install, 選擇 Package Control: Install Package 輸入 js gutter, 選擇 JSHint Gutter 配置 Ctrl+Shift+P or Cmd+Shift+P 輸入 jshint, 選擇 ...

    Pandaaa 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<