Skip to content

Commit

Permalink
Chore: update space-before-function-paren in eslint-config-eslint (#1…
Browse files Browse the repository at this point in the history
…2966)

* Chore: update space-before-function-paren in eslint-config-eslint

* Run autofixer
  • Loading branch information
kaicataldo committed Mar 2, 2020
1 parent fd8c42a commit 472025f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion packages/eslint-config-eslint/default.yml
Expand Up @@ -188,7 +188,11 @@ rules:
semi-spacing: ["error", {before: false, after: true}]
semi-style: "error"
space-before-blocks: "error"
space-before-function-paren: ["error", "never"]
space-before-function-paren: ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}]
space-in-parens: "error"
space-infix-ops: "error"
space-unary-ops: ["error", {words: true, nonwords: false}]
Expand Down
24 changes: 12 additions & 12 deletions tests/lib/cli-engine/cascading-config-array-factory.js
Expand Up @@ -160,7 +160,7 @@ describe("CascadingConfigArrayFactory", () => {

// no warning.
describe("when it lints 'subdir/exist-with-root/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist-with-root/test.js");
await delay();
});
Expand All @@ -179,7 +179,7 @@ describe("CascadingConfigArrayFactory", () => {

// no warning.
describe("when it lints 'subdir/exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist/test.js");
await delay();
});
Expand All @@ -198,7 +198,7 @@ describe("CascadingConfigArrayFactory", () => {

// no warning
describe("when it lints 'subdir/not-exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("not-exist/test.js");
await delay();
});
Expand Down Expand Up @@ -240,7 +240,7 @@ describe("CascadingConfigArrayFactory", () => {

// Project's config file has `root:true`, then no warning.
describe("when it lints 'subdir/exist-with-root/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist-with-root/test.js");
await delay();
});
Expand All @@ -259,7 +259,7 @@ describe("CascadingConfigArrayFactory", () => {

// Project's config file doesn't have `root:true` and home is ancestor, then ESLINT_PERSONAL_CONFIG_SUPPRESS.
describe("when it lints 'subdir/exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist/test.js");
await delay();
});
Expand All @@ -286,7 +286,7 @@ describe("CascadingConfigArrayFactory", () => {
* In this case, ESLint will continue to use `~/.eslintrc.json` even if personal config file feature is removed.
*/
describe("when it lints 'subdir/not-exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("not-exist/test.js");
await delay();
});
Expand Down Expand Up @@ -328,7 +328,7 @@ describe("CascadingConfigArrayFactory", () => {

// Project's config file has `root:true`, then no warning.
describe("when it lints 'exist-with-root/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist-with-root/test.js");
await delay();
});
Expand All @@ -347,7 +347,7 @@ describe("CascadingConfigArrayFactory", () => {

// Project's config file doesn't have `root:true` but home is not ancestor, then no warning.
describe("when it lints 'exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist/test.js");
await delay();
});
Expand All @@ -366,7 +366,7 @@ describe("CascadingConfigArrayFactory", () => {

// Project's config file doesn't exist and home is not ancestor, then ESLINT_PERSONAL_CONFIG_LOAD.
describe("when it lints 'not-exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("not-exist/test.js");
await delay();
});
Expand Down Expand Up @@ -407,7 +407,7 @@ describe("CascadingConfigArrayFactory", () => {
});

describe("when it lints 'subdir/exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("exist/test.js");
await delay();
});
Expand Down Expand Up @@ -436,7 +436,7 @@ describe("CascadingConfigArrayFactory", () => {
});

describe("when it lints 'not-exist/test.js'", () => {
beforeEach(async() => {
beforeEach(async () => {
config = factory.getConfigArrayForFile("not-exist/test.js", { ignoreNotFoundError: true });
await delay();
});
Expand Down Expand Up @@ -1514,7 +1514,7 @@ describe("CascadingConfigArrayFactory", () => {
process.removeListener("warning", onWarning);
});

it("should emit a deprecation warning if 'ecmaFeatures' is given.", async() => {
it("should emit a deprecation warning if 'ecmaFeatures' is given.", async () => {
getConfig(factory, "ecma-features/test.js");

// Wait for "warning" event.
Expand Down

0 comments on commit 472025f

Please sign in to comment.