Skip to content

Commit 5d4ccec

Browse files
committed
style: linting and formatting
1 parent 0843828 commit 5d4ccec

File tree

31 files changed

+144
-127
lines changed

31 files changed

+144
-127
lines changed

docs/src/integrations/svgSprite.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const integration: AstroIntegration = {
1515

1616
return content.replace('<svg', `<symbol id="icon-${id}"`).replace('</svg>', '</symbol>');
1717
});
18-
})
18+
}),
1919
);
2020

2121
const sprite = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="hidden">${icons.join(
22-
'\n'
22+
'\n',
2323
)}</svg>`;
2424

2525
await writeFile(path.join(path.resolve(), '../docs/dist/sprite.svg'), sprite, { encoding: 'utf-8' });

docs/src/utils/seo.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { MarkdownInstance } from 'astro';
2-
31
export function generateSocialImage({
42
title,
53
tagline,

inlang.config.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
export async function defineConfig(env) {
2-
const { default: pluginJson } = await env.$import(
3-
'https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@2/dist/index.js'
4-
);
2+
const { default: pluginJson } = await env.$import(
3+
'https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@2/dist/index.js',
4+
);
55

6-
const { default: standardLintRules } = await env.$import(
7-
'https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js'
8-
);
6+
const { default: standardLintRules } = await env.$import(
7+
'https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js',
8+
);
99

10-
return {
11-
referenceLanguage: 'en',
12-
plugins: [pluginJson({
13-
pathPattern: './packages/i18n/src/locale/{language}.json',
14-
variableReferencePattern: ["{", "}"]
15-
}), standardLintRules()]
16-
};
10+
return {
11+
referenceLanguage: 'en',
12+
plugins: [
13+
pluginJson({
14+
pathPattern: './packages/i18n/src/locale/{language}.json',
15+
variableReferencePattern: ['{', '}'],
16+
}),
17+
standardLintRules(),
18+
],
19+
};
1720
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
],
7676
"*.js": [
7777
"eslint --fix",
78-
"vitest run related"
78+
"vitest run related --passWithNoTests"
7979
]
8080
}
8181
}

packages/i18n/src/utils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { isObject } from '../../shared';
2-
31
/**
42
* Replaces placeholder values in a string with their actual values
53
*/

packages/nuxt/src/module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default defineNuxtModule<VeeValidateNuxtOptions>({
4141
autoImports: true,
4242
componentNames: {},
4343
},
44-
setup(options, nuxt) {
44+
setup(options) {
4545
if (options.autoImports) {
4646
composables.forEach(composable => {
4747
addImports({
@@ -70,14 +70,14 @@ export default defineNuxtModule<VeeValidateNuxtOptions>({
7070
function checkForZod(options: VeeValidateNuxtOptions) {
7171
if (isPackageExists('zod') && !isPackageExists('@vee-validate/zod')) {
7272
logger.warn(
73-
'You seem to be using zod, but you have not installed @vee-validate/zod. Please install it to use zod with vee-validate.'
73+
'You seem to be using zod, but you have not installed @vee-validate/zod. Please install it to use zod with vee-validate.',
7474
);
7575
return true;
7676
}
7777

7878
if (isPackageExists('@vee-validate/zod') && !isPackageExists('zod')) {
7979
logger.warn(
80-
'You seem to be using @vee-validate/zod, but you have not installed zod. Please install it to use zod with vee-validate.'
80+
'You seem to be using @vee-validate/zod, but you have not installed zod. Please install it to use zod with vee-validate.',
8181
);
8282
return true;
8383
}
@@ -101,14 +101,14 @@ function checkForZod(options: VeeValidateNuxtOptions) {
101101
function checkForYup(options: VeeValidateNuxtOptions) {
102102
if (isPackageExists('yup') && !isPackageExists('@vee-validate/yup')) {
103103
logger.warn(
104-
'You seem to be using yup, but you have not installed @vee-validate/yup. Please install it to use yup with vee-validate.'
104+
'You seem to be using yup, but you have not installed @vee-validate/yup. Please install it to use yup with vee-validate.',
105105
);
106106
return true;
107107
}
108108

109109
if (isPackageExists('@vee-validate/yup') && !isPackageExists('yup')) {
110110
logger.warn(
111-
'You seem to be using @vee-validate/yup, but you have not installed yup. Please install it to use yup with vee-validate.'
111+
'You seem to be using @vee-validate/yup, but you have not installed yup. Please install it to use yup with vee-validate.',
112112
);
113113
return true;
114114
}

packages/rules/src/toTypedSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TypedSchema, RawFormSchema, validateObject, TypedSchemaError, validate
33
import { Optional } from '../../shared';
44

55
export function toTypedSchema<TOutput = any, TInput extends Optional<TOutput> = Optional<TOutput>>(
6-
rawSchema: RawFormSchema<TInput> | string
6+
rawSchema: RawFormSchema<TInput> | string,
77
): TypedSchema<TInput, TOutput> {
88
const schema: TypedSchema = {
99
__type: 'VVTypedSchema',

packages/rules/tests/helpers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export default {
44
name,
55
type,
66
size: size * 1024,
7-
} as File),
7+
}) as File,
88
};

packages/rules/tests/mimes.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ test('validates mime types', () => {
1111
helpers.file('file.jpg', 'image/jpeg'),
1212
helpers.file('file.svg', 'image/svg'),
1313
],
14-
params
15-
)
14+
params,
15+
),
1616
).toBe(true);
1717

1818
expect(validate(helpers.file('file.pdf', 'application/pdf'), params)).toBe(false);

packages/shared/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ export interface FieldValidationMetaInfo {
1313
export type ValidationRuleFunction<TValue = unknown, TParams = unknown[] | Record<string, unknown>> = (
1414
value: TValue,
1515
params: TParams,
16-
ctx: FieldValidationMetaInfo
16+
ctx: FieldValidationMetaInfo,
1717
) => boolean | string | Promise<boolean | string>;
1818

1919
export type SimpleValidationRuleFunction<TValue = unknown, TParams = unknown[] | Record<string, unknown>> = (
2020
value: TValue,
21-
params: TParams
21+
params: TParams,
2222
) => boolean | string | Promise<boolean | string>;
2323

2424
export type ValidationMessageGenerator = (ctx: FieldValidationMetaInfo) => string;

0 commit comments

Comments
 (0)