style: fix linting issues met lint-action
This commit is contained in:
parent
9f88737c48
commit
aeab6aee61
14 changed files with 102 additions and 103 deletions
|
@ -1,9 +1,9 @@
|
|||
import { describe, it, expect } from "vitest";
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe("Sample test", () => {
|
||||
it("should sum to 2", () => {
|
||||
describe('Sample test', () => {
|
||||
it('should sum to 2', () => {
|
||||
const expected = 2;
|
||||
const result = 1 + 1;
|
||||
expect(result).toBe(expected);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"include": ["src/**/*.ts"],
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist"
|
||||
|
|
|
@ -6,8 +6,8 @@ services:
|
|||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
network_mode: "host"
|
||||
- '5432:5432'
|
||||
network_mode: 'host'
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./backend/config/db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
|
|
@ -16,13 +16,13 @@ export default [
|
|||
prettierConfig,
|
||||
includeIgnoreFile(gitignorePath),
|
||||
{
|
||||
ignores: ['**/dist/**', '**/.node_modules/**', '**/coverage/**', '**/.github/**'],
|
||||
files: [
|
||||
"**/*.ts",
|
||||
"**/*.cts",
|
||||
"**.*.mts",
|
||||
"**/*.ts"
|
||||
]
|
||||
ignores: [
|
||||
'**/dist/**',
|
||||
'**/.node_modules/**',
|
||||
'**/coverage/**',
|
||||
'**/.github/**',
|
||||
],
|
||||
files: ['**/*.ts', '**/*.cts', '**.*.mts', '**/*.ts'],
|
||||
},
|
||||
{
|
||||
languageOptions: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
import { test, expect } from "@playwright/test";
|
||||
|
||||
// See here how to get started:
|
||||
// https://playwright.dev/docs/intro
|
||||
test('visits the app root url', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await expect(page.locator('h1')).toHaveText('You did it!');
|
||||
test("visits the app root url", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await expect(page.locator("h1")).toHaveText("You did it!");
|
||||
});
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
import pluginVue from 'eslint-plugin-vue';
|
||||
import {
|
||||
defineConfigWithVueTs,
|
||||
vueTsConfigs,
|
||||
} from '@vue/eslint-config-typescript';
|
||||
import pluginVitest from '@vitest/eslint-plugin';
|
||||
import pluginPlaywright from 'eslint-plugin-playwright';
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
||||
import rootConfig from '../eslint.config';
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript";
|
||||
import pluginVitest from "@vitest/eslint-plugin";
|
||||
import pluginPlaywright from "eslint-plugin-playwright";
|
||||
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
|
||||
import rootConfig from "../eslint.config";
|
||||
|
||||
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
||||
// Import { configureVueProject } from '@vue/eslint-config-typescript'
|
||||
|
@ -15,31 +12,28 @@ import rootConfig from '../eslint.config';
|
|||
|
||||
const vueConfig = defineConfigWithVueTs(
|
||||
{
|
||||
name: 'app/files-to-lint',
|
||||
files: ['**/*.{ts,mts,tsx,vue}'],
|
||||
name: "app/files-to-lint",
|
||||
files: ["**/*.{ts,mts,tsx,vue}"],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'app/files-to-ignore',
|
||||
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
|
||||
name: "app/files-to-ignore",
|
||||
ignores: ["**/dist/**", "**/dist-ssr/**", "**/coverage/**"],
|
||||
},
|
||||
|
||||
pluginVue.configs['flat/essential'],
|
||||
pluginVue.configs["flat/essential"],
|
||||
vueTsConfigs.recommended,
|
||||
|
||||
{
|
||||
...pluginVitest.configs.recommended,
|
||||
files: ['src/**/__tests__/*'],
|
||||
files: ["src/**/__tests__/*"],
|
||||
},
|
||||
|
||||
{
|
||||
...pluginPlaywright.configs['flat/recommended'],
|
||||
files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
||||
...pluginPlaywright.configs["flat/recommended"],
|
||||
files: ["e2e/**/*.{test,spec}.{js,ts,jsx,tsx}"],
|
||||
},
|
||||
skipFormatting
|
||||
skipFormatting,
|
||||
);
|
||||
|
||||
export default [
|
||||
...rootConfig,
|
||||
...vueConfig
|
||||
]
|
||||
export default [...rootConfig, ...vueConfig];
|
||||
|
|
|
@ -2,12 +2,21 @@
|
|||
<html lang="">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="icon"
|
||||
href="/favicon.ico"
|
||||
/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0"
|
||||
/>
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<script
|
||||
type="module"
|
||||
src="/src/main.ts"
|
||||
></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import process from 'node:process';
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
import process from "node:process";
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
|
@ -11,7 +11,7 @@ import { defineConfig, devices } from '@playwright/test';
|
|||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
testDir: "./e2e",
|
||||
/* Maximum time one test can run for. */
|
||||
timeout: 30 * 1000,
|
||||
expect: {
|
||||
|
@ -28,18 +28,16 @@ export default defineConfig({
|
|||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: 'html',
|
||||
reporter: "html",
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
||||
actionTimeout: 0,
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
baseURL: process.env.CI
|
||||
? 'http://localhost:4173'
|
||||
: 'http://localhost:5173',
|
||||
baseURL: process.env.CI ? "http://localhost:4173" : "http://localhost:5173",
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
trace: "on-first-retry",
|
||||
|
||||
/* Only on CI systems run the tests headless */
|
||||
headless: Boolean(process.env.CI),
|
||||
|
@ -48,21 +46,21 @@ export default defineConfig({
|
|||
/* Configure projects for major browsers */
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
name: "chromium",
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
...devices["Desktop Chrome"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'firefox',
|
||||
name: "firefox",
|
||||
use: {
|
||||
...devices['Desktop Firefox'],
|
||||
...devices["Desktop Firefox"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'webkit',
|
||||
name: "webkit",
|
||||
use: {
|
||||
...devices['Desktop Safari'],
|
||||
...devices["Desktop Safari"],
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -105,7 +103,7 @@ export default defineConfig({
|
|||
* Use the preview server on CI for more realistic testing.
|
||||
* Playwright will re-use the local server if there is already a dev-server running.
|
||||
*/
|
||||
command: process.env.CI ? 'npm run preview' : 'npm run dev',
|
||||
command: process.env.CI ? "npm run preview" : "npm run dev",
|
||||
port: process.env.CI ? 4173 : 5173,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
* @type {import("prettier").Options}
|
||||
*/
|
||||
|
||||
const rootConfig = import ('../prettier.config.js');
|
||||
const rootConfig = import("../prettier.config.js");
|
||||
|
||||
export default {
|
||||
...rootConfig,
|
||||
vueIndentScriptAndStyle: true,
|
||||
singleAttributePerLine: true
|
||||
singleAttributePerLine: true,
|
||||
};
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueDevTools from 'vite-plugin-vue-devtools';
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vueDevTools from "vite-plugin-vue-devtools";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue(), vueDevTools()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { fileURLToPath } from 'node:url';
|
||||
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config';
|
||||
import viteConfig from './vite.config';
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { mergeConfig, defineConfig, configDefaults } from "vitest/config";
|
||||
import viteConfig from "./vite.config";
|
||||
|
||||
export default mergeConfig(
|
||||
viteConfig,
|
||||
defineConfig({
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
exclude: [...configDefaults.exclude, 'e2e/**'],
|
||||
root: fileURLToPath(new URL('./', import.meta.url)),
|
||||
environment: "jsdom",
|
||||
exclude: [...configDefaults.exclude, "e2e/**"],
|
||||
root: fileURLToPath(new URL("./", import.meta.url)),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
|
|
@ -10,4 +10,4 @@ export default {
|
|||
objectWrap: 'preserve',
|
||||
bracketSameLine: false,
|
||||
arrowParens: 'always',
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue