Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Sep 21, 2020
1 parent 28eefcf commit 2c08f4b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 125 deletions.
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"camelcase": 0,
"default-param-last": 0,
"complexity": ["error", { "max": 25 }],
"no-unused-vars": "off",

/* jest plugin */

Expand Down Expand Up @@ -59,6 +60,7 @@
"@typescript-eslint/prefer-optional-chain": 2,
"@typescript-eslint/prefer-readonly": 2,
"@typescript-eslint/array-type": [2, { "default": "array-simple" }],
"@typescript-eslint/no-unused-vars": ["error"],

// just rely on typescript inference
"@typescript-eslint/explicit-function-return-type": 0,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@fortawesome/react-fontawesome": "^0.1.9",
"@types/jest": "^26.0.0",
"@types/parse-github-url": "1.0.0",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^3.8.0",
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
"all-contributors-cli": "^6.4.0",
"change-case": "^4.0.0",
"command-line-docs": "^0.0.6",
Expand Down Expand Up @@ -74,7 +74,7 @@
"simple-react-lightbox": "^3.1.2-3",
"title-case": "^3.0.2",
"ts-jest": "^26.1.3",
"typescript": "~3.9.3"
"typescript": "~4.0.3"
},
"husky": {
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/__tests__/auto.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ describe("Auto", () => {
expect(createStatus).toHaveBeenCalled();
});

test("should do nothing ", async () => {
test("should do nothing", async () => {
const auto = new Auto(defaults);
auto.logger = dummyLog();

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/__tests__/changelog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const testOptions = (): IGenerateReleaseNotesOptions => ({
const logParse = new LogParse();

describe("createUserLink", () => {
test("should ", () => {
test("should", () => {
const changelog = new Changelog(dummyLog(), {
owner: "",
repo: "",
Expand Down
16 changes: 8 additions & 8 deletions packages/core/src/__tests__/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,33 +231,33 @@ describe("github", () => {
expect(result.data).not.toBeUndefined();
});

test("getFirstCommit ", async () => {
test("getFirstCommit", async () => {
const gh = new Git(options);

expect(await gh.getFirstCommit()).toBe(
"0b2af75d8b55c8869cda93d0e5589ad9f2677e18"
);
});

test("addLabelToPr ", async () => {
test("addLabelToPr", async () => {
const gh = new Git(options);
await gh.addLabelToPr(123, "foo bar");
expect(addLabels).toHaveBeenCalled();
});

test("removeLabel ", async () => {
test("removeLabel", async () => {
const gh = new Git(options);
await gh.removeLabel(123, "foo bar");
expect(removeLabel).toHaveBeenCalled();
});

test("lockIssue ", async () => {
test("lockIssue", async () => {
const gh = new Git(options);
await gh.lockIssue(123);
expect(lock).toHaveBeenCalled();
});

test("getCommitDate ", async () => {
test("getCommitDate", async () => {
const gh = new Git(options);

expect(
Expand Down Expand Up @@ -655,7 +655,7 @@ describe("github", () => {
});

describe("getLatestRelease", () => {
test("has tag ", async () => {
test("has tag", async () => {
const gh = new Git(options);

getLatestRelease.mockReturnValueOnce({ data: { tag_name: "1.0.0" } });
Expand All @@ -680,7 +680,7 @@ describe("github", () => {
});
});

describe("getProjectLabels ", () => {
describe("getProjectLabels", () => {
test("return labels", async () => {
const gh = new Git(options);

Expand All @@ -701,7 +701,7 @@ describe("github", () => {
});
});

describe("getPr ", () => {
describe("getPr", () => {
test("return pr", async () => {
const gh = new Git(options);
get.mockReturnValueOnce({ success: true });
Expand Down
6 changes: 3 additions & 3 deletions plugins/npm/__tests__/npm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const monorepoPackagesResult = [
{ path: "packages/d", name: "@packages/d", package: { version: "0.1.1" } },
];

describe("getChangedPackages ", () => {
describe("getChangedPackages", () => {
test("should return nothing without a package directory", async () => {
exec.mockReturnValueOnce(`packages/README.md\npackage.json`);

Expand Down Expand Up @@ -1389,12 +1389,12 @@ describe("beforeCommitChangelog", () => {
});
}

test("should create sub-package changelogs ", async () => {
test("should create sub-package changelogs", async () => {
await subPackageChangelogTest();
expect(updateChangelogFile).toHaveBeenCalled();
});

test("should not create sub-package changelogs ", async () => {
test("should not create sub-package changelogs", async () => {
await subPackageChangelogTest({ subPackageChangelogs: false });
expect(updateChangelogFile).not.toHaveBeenCalled();
});
Expand Down
128 changes: 19 additions & 109 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3199,11 +3199,6 @@
resolved "https://registry.yarnpkg.com/@types/env-ci/-/env-ci-3.1.0.tgz#8b8b388641c641fa4eb51862cbb018db013aeb68"
integrity sha512-oJTxA/GmZavFFr6wtuFcmOUH4Lfj0RU9icnYBzp8gXDj7p8rCr5XRR2W6VzYOoCuEJusQsRUjSMr+3xOJ1S6yw==

"@types/eslint-visitor-keys@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==

"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
Expand Down Expand Up @@ -3492,43 +3487,20 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.0.0.tgz#99349a501447fed91de18346705c0c65cf603bee"
integrity sha512-5e6q1TR7gS2P+8W2xndCu7gBh3BzmYEo70OyIdsmCmknHha/yNbz2vdevl+tP1uoaMOcrzg4gyrAijuV3DDBHA==
"@typescript-eslint/eslint-plugin@^4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.1.1.tgz#78d5b18e259b13c2f4ec41dd9105af269a161a75"
integrity sha512-Hoxyt99EA9LMmqo/5PuWWPeWeB3mKyvibfJ1Hy5SfiUpjE8Nqp+5QNd9fOkzL66+fqvIWSIE+Ett16LGMzCGnQ==
dependencies:
"@typescript-eslint/experimental-utils" "4.0.0"
"@typescript-eslint/scope-manager" "4.0.0"
"@typescript-eslint/experimental-utils" "4.1.1"
"@typescript-eslint/scope-manager" "4.1.1"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/experimental-utils@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686"
integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/types" "3.10.1"
"@typescript-eslint/typescript-estree" "3.10.1"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/experimental-utils@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.0.0.tgz#fbec21a3b5ab59127edb6ce2e139ed378cc50eb5"
integrity sha512-hbX6zR+a/vcpFVNJYN/Nbd7gmaMosDTxHEKcvmhWeWcq/0UDifrqmCfkkodbAKL46Fn4ekSBMTyq2zlNDzcQxw==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/scope-manager" "4.0.0"
"@typescript-eslint/types" "4.0.0"
"@typescript-eslint/typescript-estree" "4.0.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/experimental-utils@^4.0.1":
"@typescript-eslint/experimental-utils@4.1.1", "@typescript-eslint/experimental-utils@^4.0.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.1.tgz#52ff4e37c93113eb96385a4e6d075abece1ea72d"
integrity sha512-jzYsNciHoa4Z3c1URtmeT/bamYm8Dwfw6vuN3WHIE/BXb1iC4KveAnXDErTAZtPVxTYBaYn3n2gbt6F6D2rm1A==
Expand All @@ -3540,24 +3512,15 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/parser@^3.8.0":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467"
integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "3.10.1"
"@typescript-eslint/types" "3.10.1"
"@typescript-eslint/typescript-estree" "3.10.1"
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/scope-manager@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.0.0.tgz#8c9e3b3b8cdf5a1fbe671d9fad73ff67bc027ea8"
integrity sha512-9gcWUPoWo7gk/+ZQPg7L1ySRmR5HLIy3Vu6/LfhQbuzIkGm6v2CGIjpVRISoDLFRovNRDImd4aP/sa8O4yIEBg==
"@typescript-eslint/parser@^4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.1.1.tgz#324b4b35e314075adbc92bd8330cf3ef0c88cf3e"
integrity sha512-NLIhmicpKGfJbdXyQBz9j48PA6hq6e+SDOoXy7Ak6bq1ebGqbgG+fR1UIDAuay6OjQdot69c/URu2uLlsP8GQQ==
dependencies:
"@typescript-eslint/types" "4.0.0"
"@typescript-eslint/visitor-keys" "4.0.0"
"@typescript-eslint/scope-manager" "4.1.1"
"@typescript-eslint/types" "4.1.1"
"@typescript-eslint/typescript-estree" "4.1.1"
debug "^4.1.1"

"@typescript-eslint/scope-manager@4.1.1":
version "4.1.1"
Expand All @@ -3567,49 +3530,11 @@
"@typescript-eslint/types" "4.1.1"
"@typescript-eslint/visitor-keys" "4.1.1"

"@typescript-eslint/types@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727"
integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==

"@typescript-eslint/types@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.0.0.tgz#ec1f9fc06b8558a1d5afa6e337182d08beece7f5"
integrity sha512-bK+c2VLzznX2fUWLK6pFDv3cXGTp7nHIuBMq1B9klA+QCsqLHOOqe5TQReAQDl7DN2RfH+neweo0oC5hYlG7Rg==

"@typescript-eslint/types@4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.1.1.tgz#57500c4a86b28cb47094c1a62f1177ea279a09cb"
integrity sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA==

"@typescript-eslint/typescript-estree@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853"
integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==
dependencies:
"@typescript-eslint/types" "3.10.1"
"@typescript-eslint/visitor-keys" "3.10.1"
debug "^4.1.1"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/typescript-estree@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.0.0.tgz#2244c63de2f2190bc5718eb0fb3fd2c437d42097"
integrity sha512-ewFMPi2pMLDNIXGMPdf8r7El2oPSZw9PEYB0j+WcpKd7AX2ARmajGa7RUHTukllWX2bj4vWX6JLE1Oih2BMokA==
dependencies:
"@typescript-eslint/types" "4.0.0"
"@typescript-eslint/visitor-keys" "4.0.0"
debug "^4.1.1"
globby "^11.0.1"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/typescript-estree@4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.1.tgz#2015a84d71303ecdb6f46efd807ac19a51aab490"
Expand All @@ -3624,21 +3549,6 @@
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/visitor-keys@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931"
integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==
dependencies:
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/visitor-keys@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.0.0.tgz#e2bbb69d98076d6a3f06abcb2048225a74362c33"
integrity sha512-sTouJbv6rjVJeTE4lpSBVYXq/u5K3gbB6LKt7ccFEZPTZB/VeQ0ssUz9q5Hx++sCqBbdF8PzrrgvEnicXAR6NQ==
dependencies:
"@typescript-eslint/types" "4.0.0"
eslint-visitor-keys "^2.0.0"

"@typescript-eslint/visitor-keys@4.1.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.1.tgz#bb05664bf4bea28dc120d1da94f3027d42ab0f6f"
Expand Down Expand Up @@ -17726,10 +17636,10 @@ typescript-memoize@^1.0.0-alpha.3:
dependencies:
core-js "2.4.1"

typescript@~3.9.3:
version "3.9.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
typescript@~4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==

typical@^2.6.1:
version "2.6.1"
Expand Down

0 comments on commit 2c08f4b

Please sign in to comment.