chore: format all frontend files (#430)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import fs from 'fs-extra';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type Program, after, type IPlugin } from '@coze-arch/idl2ts-plugin';
|
||||
import { type IParseEntryCtx, isPbFile } from '@coze-arch/idl2ts-helper';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { isAbsolute } from 'path';
|
||||
|
||||
import { type Program, after, type IPlugin } from '@coze-arch/idl2ts-plugin';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type Program, after, before } from '@coze-arch/idl2ts-plugin';
|
||||
import { isStructDefinition } from '@coze-arch/idl2ts-helper';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type Program, after } from '@coze-arch/idl2ts-plugin';
|
||||
import {
|
||||
isStructDefinition,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
export * from './adapter-plugin';
|
||||
export * from './client-plugin';
|
||||
export * from './meta-plugin';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type IPlugin, type Program, on } from '@coze-arch/idl2ts-plugin';
|
||||
import {
|
||||
type Identifier,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { faker } from '@faker-js/faker';
|
||||
import {
|
||||
type IPlugin,
|
||||
@@ -196,7 +196,9 @@ export class MockTransformerPlugin implements IPlugin {
|
||||
const { name, returnType, fields } = f;
|
||||
const reqType = fields[0].fieldType as any;
|
||||
const resType = this.processReqResPramsType(returnType, ctx.ast);
|
||||
return `${name.value}:{req:${parseId(reqType.value)},res:${parseId(resType)}}`;
|
||||
return `${name.value}:{req:${parseId(reqType.value)},res:${parseId(
|
||||
resType,
|
||||
)}}`;
|
||||
})}}`,
|
||||
) as t.ExpressionStatement;
|
||||
return variableDeclaration;
|
||||
@@ -260,8 +262,8 @@ export class MockTransformerPlugin implements IPlugin {
|
||||
const key = t.isStringLiteral(i.key)
|
||||
? i.key.value
|
||||
: t.isIdentifier(i.key)
|
||||
? i.key.name
|
||||
: '';
|
||||
? i.key.name
|
||||
: '';
|
||||
fieldNames.delete(key);
|
||||
}
|
||||
newPros.push(i);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { EOL } from 'os';
|
||||
|
||||
import { type IPlugin, type Program, after } from '@coze-arch/idl2ts-plugin';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import {
|
||||
type IPlugin,
|
||||
type Program,
|
||||
|
||||
Reference in New Issue
Block a user