Skip to content

Commit

Permalink
chore: use cybozu/eslint-config instead of own settings
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Sep 18, 2020
1 parent 6cb3726 commit b8d5851
Show file tree
Hide file tree
Showing 9 changed files with 319 additions and 11,557 deletions.
25 changes: 0 additions & 25 deletions packages/dts-gen/.eslintrc.json

This file was deleted.

11,480 changes: 0 additions & 11,480 deletions packages/dts-gen/package-lock.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages/dts-gen/package.json
Expand Up @@ -35,19 +35,10 @@
},
"devDependencies": {
"@types/es6-promise": "^3.3.0",
"@types/jest": "^26.0.14",
"@types/lodash": "^4.14.161",
"@types/node": "^10.17.35",
"@typescript-eslint/eslint-plugin": "^3.9.0",
"@typescript-eslint/parser": "^3.9.0",
"eslint": "^7.8.1",
"eslint-plugin-jest": "^24.0.1",
"jest": "^26.4.2",
"npm-run-all": "^4.1.5",
"standard-version": "^9.0.0",
"ts-jest": "^26.3.0",
"ts-loader": "^8.0.3",
"typescript": "^3.9.7",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/dts-gen/src/integration-tests/dts-gen-fields-test.ts
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference path="./testfields.d.ts" />
import * as assert from "assert";
type SavedTestFields = kintone.types.SavedFields;
Expand Down Expand Up @@ -258,11 +259,11 @@ function assertNotUndefined(ref) {

interface FileFieldValue {
type: "FILE";
value: {
value: Array<{
name: string;
contentType: string;
fileKey: string;
}[];
}>;
}
function assertFileField(ref: FileFieldValue) {
assert.ok(ref.type, "FILE");
Expand Down
@@ -1,4 +1,6 @@
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference types="../../kintone" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
/// <reference path="./testfields.d.ts" />
import * as assert from "assert";

Expand Down
2 changes: 1 addition & 1 deletion packages/dts-gen/src/integration-tests/setup-test-utils.ts
Expand Up @@ -94,7 +94,7 @@ async function deployApp(client: Client, app: string) {
.requestGetDeployStatus({ apps: [app] })
.then((resp) => {
return resp.apps.filter(
(app) => app.status === "SUCCESS"
(a) => a.status === "SUCCESS"
);
})
.catch(rethrow);
Expand Down
8 changes: 4 additions & 4 deletions packages/dts-gen/src/integration-tests/testfields.d.ts
Expand Up @@ -19,7 +19,7 @@ declare namespace kintone.types {
Attachment: kintone.fieldTypes.File;
Table: {
type: "SUBTABLE";
value: {
value: Array<{
id: string;
value: {
Text_Table: kintone.fieldTypes.SingleLineText;
Expand All @@ -28,11 +28,11 @@ declare namespace kintone.types {
Number_Table: kintone.fieldTypes.Number;
Calculated_Table: kintone.fieldTypes.Calc;
};
}[];
}>;
};
Table_0: {
type: "SUBTABLE";
value: {
value: Array<{
id: string;
value: {
Radio_button_Table: kintone.fieldTypes.RadioButton;
Expand All @@ -47,7 +47,7 @@ declare namespace kintone.types {

Attachment_Table: kintone.fieldTypes.File;
};
}[];
}>;
};
}
interface SavedFields extends Fields {
Expand Down
4 changes: 3 additions & 1 deletion packages/dts-gen/src/utils/objectvalues.ts
@@ -1,5 +1,7 @@
import { toPairs } from "lodash";

export function objectValues(object: Object) {
export function objectValues(
object: Record<string, unknown>
) {
return toPairs(object).map((entry) => entry[1]);
}

0 comments on commit b8d5851

Please sign in to comment.