Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update space-before-function-paren in eslint-config-eslint #12966

Merged
merged 2 commits into from Mar 2, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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