zoukankan      html  css  js  c++  java
  • sublime jshint插件安装

    下面是在sublime上配置jshint代码检查的详细步骤。
     
    1、安装nodejs。下载地址:http://nodejs.org/download/
    2、在控制台安装jshint:$ npm install jshint -g
    3、在sublime安装sublimelinter
    4、在sublime安装jshint
    5、配置sublimelinter:preference-package setting-sublimelinter-user
    {
      "sublimelinter": "save-only",
       "jshint_options":
        {
            // To fix column positions for JSHint errors you may want to add `"indent": 1` to your
            // **User** "jshint_options". This issue affects users with tabs for indentation.
            // This fix was reverted due to a conflict with using the `"white": true` option.
            // "indent": 1,
            // 设置 JS 执行环境为浏览器
            "browser": true,
             // 加载 jQuery 的全局变量(jQuery、$)
            "jquery": true,
            //禁止下划线的变量名
            "nomen":true,
             // 行尾不要分号,false表示强制需要分号结尾
            "asi": false,
            "white":true,
            // 其他全局变量,我用了 SeaJS
            "predef": [
                 "define",
                 "seajs",
                 "console"
                 ]
        },
        "sublimelinter_executable_map":
    {
        "javascript":"C:/Program Files/nodejs/node.exe",
        "css":"C:/Program Files/nodejs/node.exe"
    }
    }
  • 相关阅读:
    1."问吧APP"客户需求调查分析
    “软件工程”课程的学习目标
    范式
    知乎:有哪些让你相见恨晚的 PPT 制作技术或知识?
    前端指南
    在网页中JS函数自动执行常用三种方法
    index的用法
    搜索引擎的正确姿势
    display与visibility
    bootstrap之模态框
  • 原文地址:https://www.cnblogs.com/liubingna/p/4174416.html
Copyright © 2011-2022 走看看