Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Remove monkeypatching dead code #737

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/analyze-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,6 @@ module.exports = function(ast, parserOptions) {
fallback,
};

if (OriginalReferencer._babelEslintPatched) {
require("./patch-eslint-scope")(parserOptions);
return escope.analyze(ast, options);
}

options.childVisitorKeys = childVisitorKeys;

const scopeManager = new escope.ScopeManager(options);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"homepage": "https://github.com/babel/babel-eslint",
"scripts": {
"test": "npm run lint && npm run test-only",
"test-only": "cd test && mocha --require fixtures/preprocess-to-patch.js specs && cd -",
"test-only": "cd test && mocha specs && cd -",
"lint": "eslint .",
"lint-fix": "npm run lint -- --fix",
"precommit": "lint-staged",
Expand Down
6 changes: 0 additions & 6 deletions test/fixtures/preprocess-to-patch.js

This file was deleted.

11 changes: 11 additions & 0 deletions test/specs/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,14 @@ function strictSuite() {
// it
});
}

describe("https://github.com/babel/babel-eslint/issues/558", () => {
it("doesn't crash with eslint-plugin-import", () => {
const engine = new eslint.CLIEngine({ ignore: false });
engine.executeOnFiles([
"fixtures/eslint-plugin-import/a.js",
"fixtures/eslint-plugin-import/b.js",
"fixtures/eslint-plugin-import/c.js",
]);
});
});
45 changes: 0 additions & 45 deletions test/specs/z_parser-for-eslint-after-patched.js

This file was deleted.