Merge pull request #17117 from Snuffleupagus/eslint-import-no-commonjs
Enable the `import/no-commonjs` ESLint plugin rule
This commit is contained in:
commit
23b8dbb730
@ -39,6 +39,7 @@
|
||||
"import/named": "error",
|
||||
"import/no-cycle": "error",
|
||||
"import/no-empty-named-blocks": "error",
|
||||
"import/no-commonjs": "error",
|
||||
"import/no-mutable-exports": "error",
|
||||
"import/no-self-import": "error",
|
||||
"import/no-unresolved": ["error", {
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
//
|
||||
// Basic node example that prints document metadata and text content.
|
||||
//
|
||||
|
@ -12,6 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
const Canvas = require("canvas");
|
||||
const assert = require("assert").strict;
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Any copyright is dedicated to the Public Domain.
|
||||
// http://creativecommons.org/licenses/publicdomain/
|
||||
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
// Hello world example for webpack.
|
||||
|
||||
const pdfjsLib = require("pdfjs-dist");
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
const webpack = require("webpack"); // eslint-disable-line no-unused-vars
|
||||
const path = require("path");
|
||||
|
||||
|
1
external/dist/webpack.js
vendored
1
external/dist/webpack.js
vendored
@ -12,6 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
(typeof window !== "undefined"
|
||||
? window
|
||||
|
@ -15,11 +15,9 @@
|
||||
*/
|
||||
/* eslint-disable no-var */
|
||||
|
||||
"use strict";
|
||||
|
||||
var assert = require("assert");
|
||||
var fs = require("fs");
|
||||
var vm = require("vm");
|
||||
import assert from "assert";
|
||||
import fs from "fs";
|
||||
import vm from "vm";
|
||||
|
||||
var SRC_DIR = __dirname + "/../../";
|
||||
var telemetryJsPath = "extensions/chromium/telemetry.js";
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
import { createRequire } from "module";
|
||||
import fs from "fs";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user