GithubHelp home page GithubHelp logo

Comments (7)

Justineo avatar Justineo commented on June 4, 2024

node 项目的话请配置一下 .eslintrc

{
    "env": {
        "browser": false,
        "node": true
    },
    "rules": {
        "no-console": 0
    }
}

from fecs.

hushicai avatar hushicai commented on June 4, 2024

@Justineo 不能整个project配置吧,有的项目node跟browser代码都有。。。

from fecs.

chriswong avatar chriswong commented on June 4, 2024

@Justineo 不能整个project配置吧,有的项目node跟browser代码都有。。。

可以啊, browser 和 node 都置为 true 呗,也可以在子目录中配。

from fecs.

hushicai avatar hushicai commented on June 4, 2024

@Justineo

node代码:

exports.xxx = function() {}; // 合法

browser代码

var exports = {}; // 必须先声明,要是不声明,设置node=true之后,估计就不报错了吧?
exports.xxx = function() {};

from fecs.

otakustay avatar otakustay commented on June 4, 2024

如果你按目录划分的,且要很保险,可以在目录下放.eslintrc

如果你是按文件划分的……在文件里写注释吧- -

from fecs.

chriswong avatar chriswong commented on June 4, 2024

https://github.com/ecomfe/fecs/wiki/ESLint#如何针对检查结果作修复

都不看 WIKI 的么...

from fecs.

hushicai avatar hushicai commented on June 4, 2024

@otakustay 目前只写了一些文件级别的配置项。。。子目录级别的没玩过。。。

from fecs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.