Comments (7)
node 项目的话请配置一下 .eslintrc
:
{
"env": {
"browser": false,
"node": true
},
"rules": {
"no-console": 0
}
}
from fecs.
@Justineo 不能整个project配置吧,有的项目node跟browser代码都有。。。
from fecs.
@Justineo 不能整个project配置吧,有的项目node跟browser代码都有。。。
可以啊, browser 和 node 都置为 true 呗,也可以在子目录中配。
from fecs.
node代码:
exports.xxx = function() {}; // 合法
browser代码
var exports = {}; // 必须先声明,要是不声明,设置node=true之后,估计就不报错了吧?
exports.xxx = function() {};
from fecs.
如果你按目录划分的,且要很保险,可以在目录下放.eslintrc
如果你是按文件划分的……在文件里写注释吧- -
from fecs.
https://github.com/ecomfe/fecs/wiki/ESLint#如何针对检查结果作修复
都不看 WIKI 的么...
from fecs.
@otakustay 目前只写了一些文件级别的配置项。。。子目录级别的没玩过。。。
from fecs.
Related Issues (20)
- An in-range update of mock-fs is breaking the build 🚨 HOT 9
- An in-range update of eslint is breaking the build 🚨 HOT 7
- An in-range update of coveralls is breaking the build 🚨 HOT 13
- --stream 不支持 HTML
- --stream 参数会把运行信息输出到 stdout
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 11
- 新增 --config 参数
- An in-range update of csscomb is breaking the build 🚨 HOT 1
- 箭头函数中 return 不带参数时导致 fecs 检查报错
- An in-range update of eslint-plugin-html is breaking the build 🚨 HOT 2
- An in-range update of manis is breaking the build 🚨 HOT 1
- An in-range update of babel-eslint is breaking the build 🚨 HOT 3
- 旧版本(0.3.0)启动检查的问题
- .fecsrc 中fecs-indent关不掉 HOT 1
- 是否可支持lint-staged
- An in-range update of minimist is breaking the build 🚨 HOT 5
- Potential Regular Expression Denial of Service (ReDoS) in valid-var-jsdoc HOT 1
- How do you ignore rules?
- Trying to get in touch regarding a security issue
- Cannot read properties of undefined (reading 'type')
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fecs.