【问题标题】:Is there an elegant way to tell eslint to ensure that we're not using any ES6 syntax / functions?有没有一种优雅的方法来告诉 eslint 以确保我们没有使用任何 ES6 语法/函数?
【发布时间】:2016-08-29 01:55:31
【问题描述】:

有没有一种优雅的方式来告诉 ESLint 以确保我们没有使用任何 ES6/EMCAScript 2015 语法/函数?

我发现以下答案有些帮助,但它似乎并不能解决所有问题(例如,我不知道如何捕捉 Object.assign() 的用法): How to disable usage of certain ES2015 features with ESLint 2?

【问题讨论】:

  • 很想知道你最终做了什么——我正在尝试做同样的事情:)

标签: javascript continuous-integration ecmascript-6 lint eslint


【解决方案1】:

eslint-plugin-es5 是专用于您的用例的包。例如规则es5/no-es6-static-methods 禁止使用Object.assign。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多