💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
1. 安装node包 * eslint<font color=red> `npm install eslint -g`</font> * csscomb <font color=red>`npm install csscomb -g`</font> * csslint <font color=red>`npm install csslint -g`</font> * sass-lint <font color=red>`npm install sass-lint -g`</font> 2. 安装sublime3 [Package Control](https://packagecontrol.io/installation#st3) * 按下 ctrl+` * 复制粘贴以下代码 <font color=red>import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)</font> 3. 安装sublime3插件 * 按下 <font color=red>`ctrl+shift+p`</font>,输入'ip'(Install Package) * 输入以下插件的名字,按顺序逐个进行安装: * <font color=red>`Sass`</font> * <font color=red>`SublimeLinter`</font> * <font color=red>`SublimeLinter-contrib-eslint`</font> * <font color=red>`SublimeLinter-contrib-sass-lint`</font> * <font color=red>`SublimeLinter-csslint`</font> * <font color=red>`DocBlockr`</font> 4. 插件的配置文件 将以下配置文件分别下载后放入项目根目录下: * <font color=red>`ESLint`</font> [配置文件](http://static.zhangyoubao.com/config/.eslintrc.js) * <font color=red>`CSSLint`</font> [配置文件](http://static.zhangyoubao.com/config/csslintrc) * <font color=red>`SCSS-Lint`</font> [配置文件](http://static.zhangyoubao.com/config/scss-lint.yml) ###phpstrom配置 phpstrom中自带了eslint插件,只需要启用并选择配置文件即可 ![](https://box.kancloud.cn/08b28ccb20c7ece7212b38b54d1a9ba8_2074x1352.png)