Skip to content

Commit

Permalink
Rebase and fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Jul 21, 2022
1 parent 3f57a1a commit a6b307f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/eslint/flat-eslint.js
Expand Up @@ -3,9 +3,6 @@
* @author Nicholas C. Zakas
*/

/* eslint node/no-unsupported-features/es-syntax: off --
This file uses dynamic import and the rule believes its not yet supported. */

"use strict";

//------------------------------------------------------------------------------
Expand Down
9 changes: 5 additions & 4 deletions tests/lib/eslint/flat-eslint.js
Expand Up @@ -12,6 +12,7 @@

const assert = require("assert");
const fs = require("fs");
const fsp = fs.promises;
const os = require("os");
const path = require("path");
const escapeStringRegExp = require("escape-string-regexp");
Expand Down Expand Up @@ -2488,7 +2489,7 @@ describe("FlatESLint", () => {
let id;

beforeEach(() => (id = Date.now().toString()));
afterEach(() => fs.rmSync(root, { recursive: true, force: true }));
afterEach(async () => fsp.rm(root, { recursive: true, force: true }));

it("should lint only JavaScript blocks if '--ext' was not given.", async () => {
const teardown = createCustomTeardown({
Expand Down Expand Up @@ -3750,15 +3751,15 @@ describe("FlatESLint", () => {
});

it("should return multiple rule meta when there are multiple linting errors from a plugin", async () => {
const nodePlugin = require("eslint-plugin-node");
const nodePlugin = require("eslint-plugin-n");
const engine = new FlatESLint({
overrideConfigFile: true,
overrideConfig: {
plugins: {
node: nodePlugin
},
rules: {
"node/no-new-require": 2,
"n/no-new-require": 2,
semi: 2,
quotes: [2, "double"]
}
Expand All @@ -3771,7 +3772,7 @@ describe("FlatESLint", () => {
assert.strictEqual(rulesMeta.semi, coreRules.get("semi").meta);
assert.strictEqual(rulesMeta.quotes, coreRules.get("quotes").meta);
assert.strictEqual(
rulesMeta["node/no-new-require"],
rulesMeta["n/no-new-require"],
nodePlugin.rules["no-new-require"].meta
);
});
Expand Down

0 comments on commit a6b307f

Please sign in to comment.