mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-06 12:01:40 +08:00
Will be used to make sure no default exports are in DevTools. The PRESUBMIT.py has been updated to skip running the formatting check if node_modules files are affected, to workaround crbug.com/1068198. DISABLE_THIRD_PARTY_CHECK=Add plugin to node_modules Bug: 1068198 Change-Id: I04d4dc813daa01099f21d40edf47aaefcc0b045f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2135610 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
932 B
932 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