Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency @antfu/eslint-config to ^0.40.0 #552

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"yaml": "^2.2.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.3",
"@antfu/eslint-config": "^0.40.2",
"@iconify-json/mdi": "^1.1.50",
"@intlify/unplugin-vue-i18n": "^0.12.0",
"@playwright/test": "^1.32.3",
Expand All @@ -111,7 +111,7 @@
"@vue/tsconfig": "^0.1.3",
"c8": "^8.0.0",
"consola": "^3.0.2",
"eslint": "^8.38.0",
"eslint": "^8.47.0",
"jsdom": "^22.0.0",
"less": "^4.1.3",
"prettier": "^3.0.0",
Expand Down
716 changes: 327 additions & 389 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/tools/case-converter/case-converter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const inputLabelAlignmentConfig = {
v-bind="inputLabelAlignmentConfig"
/>

<div divider my-16px />
<div my-16px divider />

<InputCopyable
v-for="format in formats"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/date-time-converter/date-time-converter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const formats: DateFormat[] = [
{
name: 'Mongo ObjectID',
fromDate: date => `${Math.floor(date.getTime() / 1000).toString(16)}0000000000000000`,
toDate: objectId => new Date(parseInt(objectId.substring(0, 8), 16) * 1000),
toDate: objectId => new Date(Number.parseInt(objectId.substring(0, 8), 16) * 1000),
formatMatcher: date => isMongoObjectId(date),
},
];
Expand Down
2 changes: 1 addition & 1 deletion src/tools/emoji-picker/emoji-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const { copy } = useCopy();
Unicode: <span border="1px solid current op-30" b-rd-xl px-12px py-4px>{{ emojiInfo.unicode }}</span>
</div> -->

<div flex gap-2 font-mono text-xs op-70>
<div flex gap-2 text-xs font-mono op-70>
<span cursor-pointer transition hover:text-primary @click="copy(emojiInfo.codePoints, { notificationMessage: `Code points '${emojiInfo.codePoints}' copied to the clipboard` })">
{{ emojiInfo.codePoints }}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/tools/hash-text/hash-text.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ export function convertHexToBin(hex: string) {
return hex
.trim()
.split('')
.map(byte => parseInt(byte, 16).toString(2).padStart(4, '0'))
.map(byte => Number.parseInt(byte, 16).toString(2).padStart(4, '0'))
.join('');
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ipv4ToIpv6({ ip, prefix = '0000:0000:0000:0000:0000:ffff:' }: { ip: str
+ _.chain(ip)
.trim()
.split('.')
.map(part => parseInt(part).toString(16).padStart(2, '0'))
.map(part => Number.parseInt(part).toString(16).padStart(2, '0'))
.chunk(2)
.map(blocks => blocks.join(''))
.join(':')
Expand Down
6 changes: 3 additions & 3 deletions src/tools/ipv4-range-expander/ipv4-range-expander.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function getRangesize(start: string, end: string) {
return -1;
}

return 1 + parseInt(end, 2) - parseInt(start, 2);
return 1 + Number.parseInt(end, 2) - Number.parseInt(start, 2);
}

function getCidr(start: string, end: string) {
Expand Down Expand Up @@ -55,8 +55,8 @@ function calculateCidr({ startIp, endIp }: { startIp: string; endIp: string }) {
const cidr = getCidr(start, end);
if (cidr != null) {
const result: Ipv4RangeExpanderResult = {};
result.newEnd = bits2ip(parseInt(cidr.end, 2));
result.newStart = bits2ip(parseInt(cidr.start, 2));
result.newEnd = bits2ip(Number.parseInt(cidr.end, 2));
result.newStart = bits2ip(Number.parseInt(cidr.start, 2));
result.newCidr = `${result.newStart}/${cidr.mask}`;
result.newSize = getRangesize(cidr.start, cidr.end);

Expand Down
4 changes: 2 additions & 2 deletions src/tools/otp-code-generator-and-validator/otp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export {
};

function hexToBytes(hex: string) {
return (hex.match(/.{1,2}/g) ?? []).map(char => parseInt(char, 16));
return (hex.match(/.{1,2}/g) ?? []).map(char => Number.parseInt(char, 16));
}

function computeHMACSha1(message: string, key: string) {
Expand All @@ -32,7 +32,7 @@ function base32toHex(base32: string) {
.map(value => base32Chars.indexOf(value).toString(2).padStart(5, '0'))
.join('');

const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => parseInt(chunk, 2).toString(16).padStart(2, '0')).join('');
const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => Number.parseInt(chunk, 2).toString(16).padStart(2, '0')).join('');

return hex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export { getPasswordCrackTimeEstimation, getCharsetLength };

function prettifyExponentialNotation(exponentialNotation: number) {
const [base, exponent] = exponentialNotation.toString().split('e');
const baseAsNumber = parseFloat(base);
const baseAsNumber = Number.parseFloat(base);
const prettyBase = baseAsNumber % 1 === 0 ? baseAsNumber.toLocaleString() : baseAsNumber.toFixed(2);
return exponent ? `${prettyBase}e${exponent}` : prettyBase;
}
Expand Down
10 changes: 6 additions & 4 deletions src/ui/c-modal/c-modal.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<script setup lang="ts">
import { useTheme } from './c-modal.theme';

defineOptions({
inheritAttrs: false,
});

const props = withDefaults(defineProps<{ open?: boolean; centered?: boolean }>(), {
open: false,
centered: true,
});

const emit = defineEmits(['update:open']);

const isOpen = useVModel(props, 'open', emit, { passive: true });

const { centered } = toRefs(props);
Expand All @@ -29,10 +35,6 @@ defineExpose({
isOpen,
});

defineOptions({
inheritAttrs: false,
});

const theme = useTheme();
const modal = ref();

Expand Down
2 changes: 1 addition & 1 deletion src/ui/color/color.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const clampHex = (value: number) => Math.max(0, Math.min(255, Math.round(value))

function lighten(color: string, amount: number): string {
const alpha = color.length === 9 ? color.slice(7) : '';
const num = parseInt(color.slice(1, 7), 16);
const num = Number.parseInt(color.slice(1, 7), 16);

const r = clampHex(((num >> 16) & 255) + amount);
const g = clampHex(((num >> 8) & 255) + amount);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export function formatBytes(bytes: number, decimals = 2) {
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));

return `${parseFloat((bytes / k ** i).toFixed(decimals))} ${sizes[i]}`;
return `${Number.parseFloat((bytes / k ** i).toFixed(decimals))} ${sizes[i]}`;
}