Compare commits

..
Author SHA1 Message Date
sharevb 9045303721 feat(new tool): Dockerfile Linter 2025-01-12 22:26:38 +01:00
10 changed files with 74 additions and 32 deletions

No files matched your search

+4
View File
@@ -6,6 +6,10 @@
Useful tools for developer and people working in IT. [Have a look !](https://it-tools.tech).
## Sponsors
[![Renderize banner](./.github/sponsor-banner.svg)](https://renderize.tech?utm_source=it-tools&utm_medium=readme)
## Functionalities and roadmap
Please check the [issues](https://github.com/CorentinTh/it-tools/issues) to see if some feature listed to be implemented.
+19 -1
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { IconDragDrop, IconHeart } from '@tabler/icons-vue';
import { IconDragDrop, IconFileDescription, IconHeart } from '@tabler/icons-vue';
import { useHead } from '@vueuse/head';
import { computed } from 'vue';
import Draggable from 'vuedraggable';
@@ -43,6 +43,24 @@ function onUpdateFavoriteTools() {
{{ $t('home.follow.thankYou') }}
<n-icon :component="IconHeart" />
</ColoredCard>
<a href="https://renderize.tech?utm_source=it-tools&utm_medium=banner" target="_blank" rel="noopener" class="text-current decoration-none">
<c-card v-if="config.showSponsorBanner" class="cursor-pointer !border-2px !hover:border-primary">
<div class="flex items-center justify-between">
<n-icon :component="IconFileDescription" class="text-neutral-400 dark:text-neutral-600" size="40" />
<div class="rounded-full bg-#eeeeee px-10px py-2px text-xs text-black dark:bg-#333333 dark:text-white">
Sponsor
</div>
</div>
<div class="my-5px flex items-baseline gap-4 text-balance text-lg text-black dark:text-white">
Generate PDFs from HTML with Renderize API
</div>
<div class="text-neutral-500 dark:text-neutral-400">
Automate your document generation with our fast, developer-friendly API. Start with a free forever plan.
</div>
</c-card>
</a>
</div>
<transition name="height">
@@ -0,0 +1,15 @@
import { test, expect } from '@playwright/test';
test.describe('Tool - Dockerfile linter', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/dockerfile-linter');
});
test('Has correct title', async ({ page }) => {
await expect(page).toHaveTitle('Dockerfile linter - IT Tools');
});
test('', async ({ page }) => {
});
});
@@ -0,0 +1,6 @@
import { expect, describe, it } from 'vitest';
// import { } from './dockerfile-linter.service';
//
// describe('dockerfile-linter', () => {
//
// })
Whitespace-only changes.
@@ -0,0 +1,12 @@
<template>
<div>
Lorem ipsum
</div>
</template>
<script setup lang="ts">
</script>
<style lang="less" scoped>
</style>
+12
View File
@@ -0,0 +1,12 @@
import { ArrowsShuffle } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Dockerfile Linter',
path: '/dockerfile-linter',
description: '',
keywords: ['dockerfile', 'docker', 'linter'],
component: () => import('./dockerfile-linter.vue'),
icon: ArrowsShuffle,
createdAt: new Date('2025-01-01'),
});
+2
View File
@@ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter';
import { tool as base64StringConverter } from './base64-string-converter';
import { tool as basicAuthGenerator } from './basic-auth-generator';
import { tool as emailNormalizer } from './email-normalizer';
import { tool as dockerfileLinter } from './dockerfile-linter';
import { tool as asciiTextDrawer } from './ascii-text-drawer';
@@ -155,6 +156,7 @@ export const toolsByCategory: ToolCategory[] = [
sqlPrettify,
chmodCalculator,
dockerRunToDockerComposeConverter,
dockerfileLinter,
xmlFormatter,
yamlViewer,
emailNormalizer,
+3 -30
View File
@@ -91,41 +91,14 @@ watch(
{ immediate: true },
);
/**
* Checks if the given HTMLElement overflows
* copied from stackoverflow: https://stackoverflow.com/questions/143815/determine-if-an-html-elements-content-overflows
* @param el The HTMLElement to check
*/
function checkOverflow(el: HTMLElement) {
const curOverflow = el.style.overflow;
if (!curOverflow || curOverflow === 'visible') {
el.style.overflow = 'hidden';
}
const isOverflowing = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
el.style.overflow = curOverflow;
return isOverflowing;
}
function resizeTextarea() {
if (textareaRef.value === undefined) {
return; // cannot chnge textarea if element is not available
}
if (!multiline) {
return; // textarea wont be displayed if multiline === false
}
if (!checkOverflow(textareaRef.value)) {
if (!textareaRef.value || !inputWrapperRef.value) {
return;
}
const textAreaElement = textareaRef.value!;
const scrollHeight = textareaRef.value.scrollHeight + 2;
const scrollHeight = textAreaElement.scrollHeight + 2;
textAreaElement.style.height = `${scrollHeight}px`;
inputWrapperRef.value.style.height = `${scrollHeight}px`;
}
const htmlInputType = computed(() => {
+1 -1
View File
@@ -10,7 +10,7 @@ import {
import { presetScrollbar } from 'unocss-preset-scrollbar';
export default defineConfig({
presets: [presetUno(), presetAttributify({ ignoreAttributes: ['size'] }), presetTypography(), presetScrollbar()],
presets: [presetUno(), presetAttributify(), presetTypography(), presetScrollbar()],
transformers: [transformerDirectives(), transformerVariantGroup()],
theme: {
colors: {