mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
This is need to be able to move to flat config which I am handling in a separate CL. The overrides are there as these packages got update today, so we need to way, but they were last touched 3 years ago, so reviewing their changes upstream as well. Bug: none Change-Id: I61534f881fd4e747c716b42b773f8f7f3e9bc761 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6063618 Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Reviewed-by: Danil Somsikov <dsv@chromium.org>
977 B
977 B
import/no-amd
Reports require([array], ...) and define([array], ...) function calls at the
module scope. Will not report if !=2 arguments, or first argument is not a literal array.
Intended for temporary use when migrating to pure ES6 modules.
Rule Details
This will be reported:
define(["a", "b"], function (a, b) { /* ... */ })
require(["b", "c"], function (b, c) { /* ... */ })
CommonJS require is still valid.
When Not To Use It
If you don't mind mixing module systems (sometimes this is useful), you probably don't want this rule.
It is also fairly noisy if you have a larger codebase that is being transitioned from AMD to ES6 modules.
Contributors
Special thanks to @xjamundx for donating his no-define rule as a start to this.
Further Reading
no-commonjs: report CommonJSrequireandexports- Source: https://github.com/xjamundx/eslint-plugin-modules