mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-25 23:24:09 +03:00
fix: lint
This commit is contained in:
1 parent
b309e2dcc7
commit
606e2a8219
11 files changed
+21
-22
No files matched your search
@@ -15,7 +15,7 @@ export const i18nPlugin: Plugin = {
|
||||
},
|
||||
};
|
||||
|
||||
export const translate = function (localeKey: string) {
|
||||
export const translate = function (localeKey: string, list: unknown[] = []) {
|
||||
const hasKey = i18n.global.te(localeKey, get(i18n.global.locale));
|
||||
return hasKey ? i18n.global.t(localeKey) : localeKey;
|
||||
return hasKey ? i18n.global.t(localeKey, list) : localeKey;
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
import _ from 'lodash';
|
||||
import type { GroupPermissions, Permissions, SpecialPermissions } from './chmod-calculator.types';
|
||||
|
||||
export { computeUmaskRepresentation, computeChmodOctalRepresentation, computeChmodSymbolicRepresentation, computePermissionsFromChmodOctalRepresentation, computePermissionsFromChmodSymbolicRepresentation };
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export { computeUmaskRepresentation, computeChmodOctalRepresentation, computeChmodSymbolicRepresentation, computePermissionsFromChmodOctalRepresentation, computePermissionsFromChmodSymbolicRepresentation };
|
||||
|
||||
function computeChmodOctalRepresentation({ permissions }: { permissions: Permissions }): string {
|
||||
const permissionValue = { read: 4, write: 2, execute: 1 };
|
||||
const specialPermissionValue = { setuid: 4, setgid: 2, stickybit: 1 };
|
||||
|
||||
@@ -2,10 +2,10 @@ import { type Colord, colord } from 'colord';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
|
||||
export { removeAlphaChannelWhenOpaque, buildColorFormat };
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export { removeAlphaChannelWhenOpaque, buildColorFormat };
|
||||
|
||||
function removeAlphaChannelWhenOpaque(hexColor: string) {
|
||||
return hexColor.replace(/^(#(?:[0-9a-f]{3}){1,2})ff$/i, '$1');
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { DateTime } from 'luxon';
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export type DayOfWeek =
|
||||
| 'monday'
|
||||
| 'tuesday'
|
||||
@@ -19,8 +21,6 @@ const weekDayToName = {
|
||||
7: 'sunday',
|
||||
};
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export type Holiday = `${3 | 2 | 1 | 0}${number}/${1 | 0}${number}` | `${3 | 2 | 1 | 0}${number}/${1 | 0}${number}/${number}${number}${number}${number}`;
|
||||
|
||||
export class BusinessTime {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { pack, unpack } from 'byte-data';
|
||||
|
||||
export type Conversion = 'dec' | 'bin' | 'hex' | 'char';
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export type Conversion = 'dec' | 'bin' | 'hex' | 'char';
|
||||
|
||||
export function cleanHex(hex: string): string {
|
||||
return hex.replace(/\\x|0x/g, '');
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ import { encrypt } from 'unixcrypt-browser';
|
||||
import md5 from 'apache-md5';
|
||||
import { multiRandFromArray } from '@/utils/random';
|
||||
|
||||
const itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
const itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
export function generateHtpasswd({
|
||||
username,
|
||||
password,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { generateMeta } from '@it-tools/oggen';
|
||||
import _ from 'lodash';
|
||||
import { image, ogSchemas, twitter, website } from './og-schemas';
|
||||
@@ -84,7 +83,7 @@ const metaTags = computed(() => {
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<n-form-item :label="t('tools.meta-tag-generator.texts.label-your-meta-tags')">
|
||||
<n-form-item :label="$t('tools.meta-tag-generator.texts.label-your-meta-tags')">
|
||||
<TextareaCopyable :value="metaTags" language="html" />
|
||||
</n-form-item>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { onBeforeUnmount, ref } from 'vue';
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
interface IMessageSender {
|
||||
error: (...messages: any[]) => void
|
||||
}
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export function useMicrophoneService(messageSender: IMessageSender) {
|
||||
let audioContext: AudioContext | null = null;
|
||||
let delayNode: DelayNode | null = null;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
export { getPasswordCrackTimeEstimation, getCharsetLength };
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export { getPasswordCrackTimeEstimation, getCharsetLength };
|
||||
|
||||
function prettifyExponentialNotation(exponentialNotation: number) {
|
||||
const [base, exponent] = exponentialNotation.toString().split('e');
|
||||
const baseAsNumber = Number.parseFloat(base);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { CountryCode, NumberType } from 'libphonenumber-js/types';
|
||||
import lookup from 'country-code-lookup';
|
||||
|
||||
export { formatTypeToHumanReadable, getFullCountryName, getDefaultCountryCode };
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export { formatTypeToHumanReadable, getFullCountryName, getDefaultCountryCode };
|
||||
|
||||
const typeToLabel: Record<NonNullable<NumberType>, string> = {
|
||||
MOBILE: t('tools.phone-parser-and-formatter.models.text.mobile'),
|
||||
FIXED_LINE: t('tools.phone-parser-and-formatter.models.text.fixed-line'),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export { raidCalculations };
|
||||
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
|
||||
export { raidCalculations };
|
||||
|
||||
interface RaidType {
|
||||
about: string
|
||||
requirements: string
|
||||
|
||||
Reference in new issue
Block a user