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

Commit

Permalink
Remove monkeypatching dead code (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaicataldo authored and existentialism committed Jan 10, 2019
1 parent a861223 commit 9199698
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 57 deletions.
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.

0 comments on commit 9199698

Please sign in to comment.