@konomi-app/kintone-utilities 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/api-types.d.ts +140 -0
- package/dist/api-types.js +2 -0
- package/dist/api-types.js.map +1 -0
- package/dist/event-listener.d.ts +16 -0
- package/dist/event-listener.js +23 -0
- package/dist/event-listener.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/utilities.d.ts +19 -0
- package/dist/utilities.js +71 -0
- package/dist/utilities.js.map +1 -0
- package/package.json +29 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Ribbit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { App as DefaultApp, Layout as DefaultLayout, Record as DefaultRecord, ViewForParameter, ViewForResponse } from '@kintone/rest-api-client/lib/client/types';
|
|
2
|
+
import type { Calc as CalcField, Category as CategoryField, CheckBox as CheckBoxField, CreatedTime as CreatedTimeField, Creator as CreatorField, Date as DateField, DateTime as DateTimeField, Dropdown as DropdownField, File as FileField, GroupSelect as GroupSelectField, ID as IDField, InSubtable as InSubtableField, Link as LinkField, Modifier as ModifierField, MultiLineText as MultiLineTextField, MultiSelect as MultiSelectField, Number as NumberField, OneOf as OneOfField, OrganizationSelect as OrganizationSelectField, RadioButton as RadioButtonField, RecordNumber as RecordNumberField, Revision as RevisionField, RichText as RichTextField, SingleLineText as SingleLineTextField, Status as StatusField, StatusAssignee as StatusAssigneeField, Subtable as SubtableField, Time as TimeField, UpdatedTime as UpdatedTimeField, UserSelect as UserSelectField } from '@kintone/rest-api-client/lib/KintoneFields/types/field';
|
|
3
|
+
import type { Label as DefaultLayoutLabel, OneOf as DefaultLayoutField } from '@kintone/rest-api-client/lib/KintoneFields/types/fieldLayout';
|
|
4
|
+
import type { Group as DefaultGroup, Row as DefaultRow } from '@kintone/rest-api-client/lib/KintoneFields/types/layout';
|
|
5
|
+
import type { Calc as CalcProperty, Category as CategoryProperty, CheckBox as CheckBoxProperty, CreatedTime as CreatedTimeProperty, Creator as CreatorProperty, Date as DateProperty, DateTime as DateTimeProperty, Dropdown as DropdownProperty, File as FileProperty, GroupSelect as GroupSelectProperty, InSubtable as InSubtableProperty, Link as LinkProperty, Modifier as ModifierProperty, MultiLineText as MultiLineTextProperty, MultiSelect as MultiSelectProperty, Number as NumberProperty, OneOf as OneOfProperty, OrganizationSelect as OrganizationSelectProperty, RadioButton as RadioButtonProperty, RecordNumber as RecordNumberProperty, RichText as RichTextProperty, SingleLineText as SingleLineTextProperty, Status as StatusProperty, StatusAssignee as StatusAssigneeProperty, Subtable as SubtableProperty, Time as TimeProperty, UpdatedTime as UpdatedTimeProperty, UserSelect as UserSelectProperty } from '@kintone/rest-api-client/lib/KintoneFields/types/property';
|
|
6
|
+
export declare namespace kintoneAPI {
|
|
7
|
+
type App = DefaultApp;
|
|
8
|
+
type RecordData = DefaultRecord;
|
|
9
|
+
namespace view {
|
|
10
|
+
type Response = ViewForResponse;
|
|
11
|
+
type Parameter = ViewForParameter;
|
|
12
|
+
}
|
|
13
|
+
type Field = OneOfField;
|
|
14
|
+
/** JavaScript APIやREST APIから取得できるレコードの各フィールド情報 */
|
|
15
|
+
namespace field {
|
|
16
|
+
type Calc = CalcField;
|
|
17
|
+
type Category = CategoryField;
|
|
18
|
+
type CheckBox = CheckBoxField;
|
|
19
|
+
type CreatedTime = CreatedTimeField;
|
|
20
|
+
type Creator = CreatorField;
|
|
21
|
+
type Date = DateField;
|
|
22
|
+
type DateTime = DateTimeField;
|
|
23
|
+
type Dropdown = DropdownField;
|
|
24
|
+
type File = FileField;
|
|
25
|
+
type GroupSelect = GroupSelectField;
|
|
26
|
+
type GroupEntity = GroupSelect['value'][number];
|
|
27
|
+
type ID = IDField;
|
|
28
|
+
type InSubtable = InSubtableField;
|
|
29
|
+
type Link = LinkField;
|
|
30
|
+
type Modifier = ModifierField;
|
|
31
|
+
type MultiLineText = MultiLineTextField;
|
|
32
|
+
type MultiSelect = MultiSelectField;
|
|
33
|
+
type Number = NumberField;
|
|
34
|
+
type OneOf = OneOfField;
|
|
35
|
+
type OrganizationSelect = OrganizationSelectField;
|
|
36
|
+
type OrganizationEntity = OrganizationSelect['value'][number];
|
|
37
|
+
type RadioButton = RadioButtonField;
|
|
38
|
+
type RecordNumber = RecordNumberField;
|
|
39
|
+
type Revision = RevisionField;
|
|
40
|
+
type RichText = RichTextField;
|
|
41
|
+
type SingleLineText = SingleLineTextField;
|
|
42
|
+
type Status = StatusField;
|
|
43
|
+
type StatusAssignee = StatusAssigneeField;
|
|
44
|
+
type Subtable<T extends Record<string, InSubtable> = Record<string, InSubtable>> = SubtableField<T>;
|
|
45
|
+
type Time = TimeField;
|
|
46
|
+
type UpdatedTime = UpdatedTimeField;
|
|
47
|
+
type UserSelect = UserSelectField;
|
|
48
|
+
type UserEntity = UserSelect['value'][number];
|
|
49
|
+
}
|
|
50
|
+
type FieldProperty = OneOfProperty;
|
|
51
|
+
type FieldPropertyType = FieldProperty['type'];
|
|
52
|
+
type FieldProperties = Record<string, OneOfProperty>;
|
|
53
|
+
type FieldEntry = [string, OneOfProperty];
|
|
54
|
+
/** REST APIから取得できるアプリの各フィールド情報 */
|
|
55
|
+
namespace property {
|
|
56
|
+
type Calc = CalcProperty;
|
|
57
|
+
type Category = CategoryProperty;
|
|
58
|
+
type CheckBox = CheckBoxProperty;
|
|
59
|
+
type CreatedTime = CreatedTimeProperty;
|
|
60
|
+
type Creator = CreatorProperty;
|
|
61
|
+
type Date = DateProperty;
|
|
62
|
+
type DateTime = DateTimeProperty;
|
|
63
|
+
type Dropdown = DropdownProperty;
|
|
64
|
+
type File = FileProperty;
|
|
65
|
+
type GroupSelect = GroupSelectProperty;
|
|
66
|
+
type InSubtable = InSubtableProperty;
|
|
67
|
+
type Link = LinkProperty;
|
|
68
|
+
type Modifier = ModifierProperty;
|
|
69
|
+
type MultiLineText = MultiLineTextProperty;
|
|
70
|
+
type MultiSelect = MultiSelectProperty;
|
|
71
|
+
type Number = NumberProperty;
|
|
72
|
+
type OneOf = OneOfProperty;
|
|
73
|
+
type OrganizationSelect = OrganizationSelectProperty;
|
|
74
|
+
type RadioButton = RadioButtonProperty;
|
|
75
|
+
type RecordNumber = RecordNumberProperty;
|
|
76
|
+
type RichText = RichTextProperty;
|
|
77
|
+
type SingleLineText = SingleLineTextProperty;
|
|
78
|
+
type Status = StatusProperty;
|
|
79
|
+
type StatusAssignee = StatusAssigneeProperty;
|
|
80
|
+
type Subtable<T extends Record<string, InSubtable> = Record<string, InSubtable>> = SubtableProperty<T>;
|
|
81
|
+
type Time = TimeProperty;
|
|
82
|
+
type UpdatedTime = UpdatedTimeProperty;
|
|
83
|
+
type UserSelect = UserSelectProperty;
|
|
84
|
+
}
|
|
85
|
+
type Layout = DefaultLayout;
|
|
86
|
+
type LayoutField = DefaultLayoutField;
|
|
87
|
+
namespace layout {
|
|
88
|
+
type Label = DefaultLayoutLabel;
|
|
89
|
+
type Row = DefaultRow<LayoutField[]>;
|
|
90
|
+
type Group = DefaultGroup<Row[]>;
|
|
91
|
+
}
|
|
92
|
+
namespace response {
|
|
93
|
+
type App = {
|
|
94
|
+
readonly app?: DefaultApp;
|
|
95
|
+
readonly fields?: FieldProperties;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
type EventType = 'portal.show' | 'app.record.index.show' | 'app.record.index.edit.show' | 'app.record.index.edit.submit' | 'app.record.index.edit.submit.success' | 'app.record.index.delete.submit' | 'app.record.detail.show' | 'app.record.detail.delete.submit' | 'app.record.detail.process.proceed' | 'app.record.create.show' | 'app.record.create.change' | 'app.record.create.submit' | 'app.record.create.submit.success' | 'app.record.edit.show' | 'app.record.edit.change' | 'app.record.edit.submit' | 'app.record.edit.submit.success' | 'app.record.print.show' | 'mobile.app.record.index.show' | 'mobile.app.record.detail.show' | 'mobile.app.record.detail.delete.submit' | 'mobile.app.record.detail.process.proceed' | 'mobile.app.record.create.show' | 'mobile.app.record.create.change' | 'mobile.app.record.create.submit' | 'mobile.app.record.create.submit.success' | 'mobile.app.record.edit.show' | 'mobile.app.record.edit.change' | 'mobile.app.record.edit.submit' | 'mobile.app.record.edit.submit.success';
|
|
99
|
+
type Event<T = RecordData> = {
|
|
100
|
+
appId: number;
|
|
101
|
+
viewId: number;
|
|
102
|
+
recordId: number;
|
|
103
|
+
record: T;
|
|
104
|
+
error: string;
|
|
105
|
+
url: string;
|
|
106
|
+
type: EventType;
|
|
107
|
+
changes?: {
|
|
108
|
+
field: {
|
|
109
|
+
type: string;
|
|
110
|
+
value: string;
|
|
111
|
+
};
|
|
112
|
+
row: any;
|
|
113
|
+
};
|
|
114
|
+
records?: T[];
|
|
115
|
+
viewType?: string;
|
|
116
|
+
viewName?: string;
|
|
117
|
+
offset?: number;
|
|
118
|
+
/**
|
|
119
|
+
* プロセス - 実行されたアクション
|
|
120
|
+
* app.record.detail.process.proceed イベントで取得できます
|
|
121
|
+
*/
|
|
122
|
+
action?: {
|
|
123
|
+
value: string;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* プロセス - 現在のステータス
|
|
127
|
+
* app.record.detail.process.proceed イベントで取得できます
|
|
128
|
+
*/
|
|
129
|
+
status?: {
|
|
130
|
+
value: string;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* プロセス - 次のステータス
|
|
134
|
+
* app.record.detail.process.proceed イベントで取得できます
|
|
135
|
+
*/
|
|
136
|
+
nextStatus?: {
|
|
137
|
+
value: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-types.js","sourceRoot":"","sources":["../src/api-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { kintoneAPI } from './api-types';
|
|
2
|
+
type ErrorHandler = (error: any, props: {
|
|
3
|
+
event: kintoneAPI.Event;
|
|
4
|
+
}) => void;
|
|
5
|
+
type ConstructorProps = {
|
|
6
|
+
errorHandler?: ErrorHandler;
|
|
7
|
+
};
|
|
8
|
+
export declare class KintoneEventListener {
|
|
9
|
+
#private;
|
|
10
|
+
/**
|
|
11
|
+
* 複数の処理を、各イベントに登録することができます
|
|
12
|
+
*/
|
|
13
|
+
constructor(props?: ConstructorProps);
|
|
14
|
+
add: <T = import("@kintone/rest-api-client/lib/client/types").Record>(events: kintoneAPI.EventType[], callback: (event: kintoneAPI.Event<T>) => kintoneAPI.Event<T> | Promise<kintoneAPI.Event<T>>) => void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { withMobileEvents } from './utilities';
|
|
2
|
+
export class KintoneEventListener {
|
|
3
|
+
#commonErrorHandler;
|
|
4
|
+
/**
|
|
5
|
+
* 複数の処理を、各イベントに登録することができます
|
|
6
|
+
*/
|
|
7
|
+
constructor(props) {
|
|
8
|
+
const { errorHandler = () => null } = props ?? {};
|
|
9
|
+
this.#commonErrorHandler = errorHandler;
|
|
10
|
+
}
|
|
11
|
+
add = (events, callback) => {
|
|
12
|
+
kintone.events.on(withMobileEvents(events), async (event) => {
|
|
13
|
+
try {
|
|
14
|
+
return await callback(event);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
await this.#commonErrorHandler(error, { event });
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=event-listener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-listener.js","sourceRoot":"","sources":["../src/event-listener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAM/C,MAAM,OAAO,oBAAoB;IACtB,mBAAmB,CAAe;IAE3C;;OAEG;IACH,YAAmB,KAAwB;QACzC,MAAM,EAAE,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,EAAE,CAAC;QAElD,IAAI,CAAC,mBAAmB,GAAG,YAAY,CAAC;IAC1C,CAAC;IAEM,GAAG,GAAG,CACX,MAA8B,EAC9B,QAA4F,EAC5F,EAAE;QACF,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YAC1D,IAAI;gBACF,OAAO,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC9B;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;gBACjD,MAAM,KAAK,CAAC;aACb;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;CACH"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { kintoneAPI } from './api-types';
|
|
2
|
+
/**
|
|
3
|
+
* 各フィールドタイプの値を文字列として返却します
|
|
4
|
+
*
|
|
5
|
+
* 配列で取得されるような値は区切り文字で連結されます
|
|
6
|
+
* @param field
|
|
7
|
+
* @param options
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare const getFieldValueAsString: (field: kintoneAPI.Field, options?: {
|
|
11
|
+
separator?: string;
|
|
12
|
+
ignoresCalculationError?: boolean;
|
|
13
|
+
}) => string;
|
|
14
|
+
/**
|
|
15
|
+
* デスクトップ版のイベントタイプを基に、モバイル版を追加し返却します
|
|
16
|
+
* @param events デスクトップのイベントタイプ
|
|
17
|
+
* @returns モバイルを含むイベントタイプ
|
|
18
|
+
*/
|
|
19
|
+
export declare const withMobileEvents: (events: string[]) => string[];
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 各フィールドタイプの値を文字列として返却します
|
|
3
|
+
*
|
|
4
|
+
* 配列で取得されるような値は区切り文字で連結されます
|
|
5
|
+
* @param field
|
|
6
|
+
* @param options
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export const getFieldValueAsString = (field, options) => {
|
|
10
|
+
const { separator = ', ', ignoresCalculationError = false } = options ?? {};
|
|
11
|
+
if (field.type === 'MULTI_LINE_TEXT' ||
|
|
12
|
+
field.type === 'RICH_TEXT' ||
|
|
13
|
+
field.type === 'CREATED_TIME' ||
|
|
14
|
+
field.type === 'DATE' ||
|
|
15
|
+
field.type === 'DATETIME' ||
|
|
16
|
+
field.type === 'DROP_DOWN' ||
|
|
17
|
+
field.type === 'LINK' ||
|
|
18
|
+
field.type === 'RECORD_NUMBER' ||
|
|
19
|
+
field.type === 'STATUS' ||
|
|
20
|
+
field.type === 'RADIO_BUTTON' ||
|
|
21
|
+
field.type === 'TIME' ||
|
|
22
|
+
field.type === 'UPDATED_TIME' ||
|
|
23
|
+
field.type === '__ID__' ||
|
|
24
|
+
field.type === '__REVISION__') {
|
|
25
|
+
return field.value ?? '';
|
|
26
|
+
}
|
|
27
|
+
else if (field.type === 'SINGLE_LINE_TEXT' ||
|
|
28
|
+
field.type === 'NUMBER' ||
|
|
29
|
+
field.type === 'CALC') {
|
|
30
|
+
const value = field.value ?? '';
|
|
31
|
+
if (ignoresCalculationError) {
|
|
32
|
+
return /^#.*!$/.test(value) ? '' : value;
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
else if (field.type === 'CATEGORY' ||
|
|
37
|
+
field.type === 'CHECK_BOX' ||
|
|
38
|
+
field.type === 'MULTI_SELECT') {
|
|
39
|
+
return field.value.join(separator);
|
|
40
|
+
}
|
|
41
|
+
else if (field.type === 'CREATOR' || field.type === 'MODIFIER') {
|
|
42
|
+
return field.value.name;
|
|
43
|
+
}
|
|
44
|
+
else if (field.type === 'GROUP_SELECT' ||
|
|
45
|
+
field.type === 'ORGANIZATION_SELECT' ||
|
|
46
|
+
field.type === 'USER_SELECT' ||
|
|
47
|
+
field.type === 'STATUS_ASSIGNEE') {
|
|
48
|
+
return field.value.map((value) => value.name).join(separator);
|
|
49
|
+
}
|
|
50
|
+
else if (field.type === 'FILE') {
|
|
51
|
+
return field.value.map((value) => value.name).join(separator);
|
|
52
|
+
}
|
|
53
|
+
else if (field.type === 'SUBTABLE') {
|
|
54
|
+
return field.value
|
|
55
|
+
.map((row) => Object.values(row.value)
|
|
56
|
+
.map((cell) => getFieldValueAsString(cell, { separator }))
|
|
57
|
+
.join(separator))
|
|
58
|
+
.join(separator);
|
|
59
|
+
}
|
|
60
|
+
return '';
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* デスクトップ版のイベントタイプを基に、モバイル版を追加し返却します
|
|
64
|
+
* @param events デスクトップのイベントタイプ
|
|
65
|
+
* @returns モバイルを含むイベントタイプ
|
|
66
|
+
*/
|
|
67
|
+
export const withMobileEvents = (events) => {
|
|
68
|
+
const mobileEvents = events.filter((e) => !/^mobile/.test(e)).map((type) => 'mobile.' + type);
|
|
69
|
+
return [...events, ...mobileEvents];
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@konomi-app/kintone-utilities",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"repository": "https://github.com/local-bias/kintone-utilities.git",
|
|
7
|
+
"author": "Ribbit",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"prepare": "yarn run build"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@kintone/rest-api-client": "^3.3.1"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@kintone/dts-gen": "^6.1.19",
|
|
18
|
+
"typescript": "^4.9.5"
|
|
19
|
+
},
|
|
20
|
+
"prettier": {
|
|
21
|
+
"printWidth": 100,
|
|
22
|
+
"arrowParens": "always",
|
|
23
|
+
"singleQuote": true,
|
|
24
|
+
"jsxSingleQuote": true,
|
|
25
|
+
"tabWidth": 2,
|
|
26
|
+
"trailingComma": "es5",
|
|
27
|
+
"endOfLine": "lf"
|
|
28
|
+
}
|
|
29
|
+
}
|