Skip to content

Commit

Permalink
Chore: remove undocumented defaults() method (refs #9161) (#9237)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-an-aardvark committed Sep 7, 2017
1 parent 82d8b73 commit 8f6546c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
8 changes: 0 additions & 8 deletions lib/linter.js
Expand Up @@ -1039,14 +1039,6 @@ class Linter {
});
}

/**
* Gets the default eslint configuration.
* @returns {Object} Object mapping rule IDs to their default configurations
*/
defaults() { // eslint-disable-line class-methods-use-this
return defaultConfig;
}

/**
* Gets an object with all loaded rules.
* @returns {Map} All loaded rules
Expand Down
14 changes: 1 addition & 13 deletions tests/lib/linter.js
Expand Up @@ -908,12 +908,8 @@ describe("Linter", () => {
}

it("should pass parser as parserPath to all rules when default parser is used", () => {

const DEFAULT_PARSER = linter.defaults().parser;

linter.reset();
linter.defineRule("test-rule", sandbox.mock().withArgs(
sinon.match({ parserPath: DEFAULT_PARSER })
sinon.match({ parserPath: "espree" })
).returns({}));

const config = { rules: { "test-rule": 2 } };
Expand Down Expand Up @@ -2392,14 +2388,6 @@ describe("Linter", () => {
});
});

describe("when calling defaults", () => {
it("should return back config object", () => {
const config = linter.defaults();

assert.isNotNull(config.rules);
});
});

describe("when calling getRules", () => {
it("should return all loaded rules", () => {
const rules = linter.getRules();
Expand Down

0 comments on commit 8f6546c

Please sign in to comment.