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