前端开发入门到进阶第四集【使用sublime安装jshint和cssLint】

参考:https://blog.csdn.net/qq_27965129/article/details/52786224

使用sublime安装JSHint插件:

1,解决不能使用package control——install Package的问题

2,安装nodejs,使用cmd查看安装的环境变量配置:path命令和使用node --version查看是否安装

3,使用cmd安装:通过node.js 安装:npm install -g jshint 。安装的目录是在c盘,所以如果重做系统后得重新安装。参考:https://www.runoob.com/nodejs/nodejs-install-setup.html

C:\Users\lenovo>npm install -g jshint
^CTerminate batch job (Y/N)? n

C:\Users\lenovo>npm install -g jshint
C:\Users\lenovo\AppData\Roaming\npm\jshint -> C:\Users\lenovo\AppData\Roaming\npm\node_modules\jshint\bin\jshint
jshint@2.10.2 C:\Users\lenovo\AppData\Roaming\npm\node_modules\jshint
├── strip-json-comments@1.0.4
├── exit@0.1.2
├── shelljs@0.3.0
├── console-browserify@1.1.0 (date-now@0.1.4)
├── minimatch@3.0.4 (brace-expansion@1.1.11)
├── cli@1.0.1 (glob@7.1.4)
├── lodash@4.17.15
└── htmlparser2@3.8.3 (domelementtype@1.3.1, entities@1.0.0, domhandler@2.3.0, readable-stream@1.1.14, domutils@1.5.1)

 

4,在sublime中安装sublimelinter-jshint

 

Package Control Messages
========================

SublimeLinter
-------------


____ _ _ _ _ _ _
/ ___| _ _| |__ | (_)_ __ ___ ___| | (_)_ __ | |_ ___ _ __
\___ \| | | | '_ \| | | '_ ` _ \ / _ \ | | | '_ \| __/ _ \ '__|
___) | |_| | |_) | | | | | | | | __/ |___| | | | | || __/ |
|____/ \__,_|_.__/|_|_|_| |_| |_|\___|_____|_|_| |_|\__\___|_|


Welcome to SublimeLinter, a linter framework for Sublime Text 3.
Linters are not included, they must be installed separately.


For complete documentation on how to use and configure SublimeLinter,
please see: http://www.sublimelinter.com

To report issues: https://github.com/SublimeLinter/SublimeLinter


SublimeLinter-jshint
--------------------

SublimeLinter-jshint
-------------------------------
This linter plugin for SublimeLinter provides an interface to jshint.

Please read the installation instructions at:

https://github.com/SublimeLinter/SublimeLinter-jshint

5,安装cssLint:参考https://www.cnblogs.com/xiaohuochai/p/6914830.html

       先从nodejs上安装csslint

C:\Users\lenovo>npm install csslint -g
C:\Users\lenovo\AppData\Roaming\npm\csslint -> C:\Users\lenovo\AppData\Roaming\npm\node_modules\csslint\dist\cli.js
csslint@1.0.5 C:\Users\lenovo\AppData\Roaming\npm\node_modules\csslint
├── clone@2.1.2
└── parserlib@1.1.1

C:\Users\lenovo>

 

  

       然后在sublime上安装csslint:package control —— install package —— csslint

 

posted @ 2019-09-19 10:30  西装人  阅读(163)  评论(0编辑  收藏  举报