Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Destiner authored Mar 28, 2024
0 parents commit 038f76d
Show file tree
Hide file tree
Showing 17 changed files with 359 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"env": {
"es2020": true,
"browser": true,
"vue/setup-compiler-macros": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended"
],
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["import", "vue"],
"rules": {
"import/first": "error",
"import/exports-last": "error",
"import/newline-after-import": "error",
"import/prefer-default-export": "error",
"import/group-exports": "error",
"import/no-duplicates": "error",
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc"
}
}
],
"import/no-unused-modules": "error",
"import/no-mutable-exports": "error",
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["vite.config.ts", "test/**/*.test.ts"] }
],
"@typescript-eslint/explicit-function-return-type": "error",
"vue/component-api-style": ["error", ["script-setup"]],
"vue/custom-event-name-casing": ["error", "kebab-case"],
"vue/no-empty-component-block": "error",
"vue/html-self-closing": "off",
"vue/singleline-html-element-content-newline": "off"
},
"settings": {
"import/resolver": {
"typescript": {}
}
},
"overrides": [
{
"files": ["src/**/*.vue"],
"rules": {
"import/prefer-default-export": "off"
}
},
{
"files": ["src/pages/**/*.vue"],
"rules": {
"vue/multi-word-component-names": "off"
}
}
]
}
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: main
pull_request:
branches: main

jobs:
run:
name: Run
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Clean install
run: bun install

- name: Lint
run: bun run lint

- name: Type checking
run: bun run typecheck

- name: Build
run: bun run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"singleAttributePerLine": true
}
10 changes: 10 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-vue",
"stylelint-config-property-sort-order-smacss"
],
"rules": {
"media-feature-name-allowed-list": ["width", "prefers-color-scheme"]
}
}
Binary file added bun.lockb
Binary file not shown.
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<!-- Encoding -->
<meta charset="utf-8">

<!-- Responsiveness -->
<meta content="width=device-width, initial-scale=1" name="viewport">

<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="/favicon.svg">

<!-- Title -->
<title>App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
51 changes: 51 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "starter-app",
"version": "1.0.0",
"description": "Starter Vue app",
"author": {
"name": "Timur Badretdinov",
"url": "https://github.com/Destiner"
},
"keywords": [
"vue",
"starter"
],
"license": "UNLICENSED",
"repository": {
"type": "git",
"url": "git://github.com/Destiner/starter-app.git"
},
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite",
"lint": "bun run lint:prettier && bun run lint:eslint && bun run lint:stylelint",
"lint:prettier": "prettier -c \"src/**/*.{json,js,ts,vue}\"",
"lint:eslint": "eslint \"src/**/*.{js,ts,vue}\"",
"lint:stylelint": "stylelint \"src/**/*.{css,vue}\"",
"typecheck": "tsc --noEmit && vue-tsc --noEmit"
},
"dependencies": {
"vue": "^3.4.19",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-sfc": "^3.4.19",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-vue": "^9.22.0",
"prettier": "^3.2.5",
"stylelint": "^16.2.1",
"stylelint-config-property-sort-order-smacss": "^10.0.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.0",
"typescript": "^5.4.2",
"vite": "^5.1.4",
"vite-plugin-vue-devtools": "^7.0.16",
"vite-tsconfig-paths": "^4.3.1",
"vue-tsc": "^1.8.27"
}
}
3 changes: 3 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div id="app">
<router-view />
</div>
</template>

<style>
:root {
--font-sans: -apple-system, 'BlinkMacSystemFont', avenir next, avenir,
segoe ui, helvetica neue, helvetica, 'Ubuntu', roboto, noto, arial,
sans-serif;
--font-serif: 'Iowan Old Style', 'Apple Garamond', 'Baskerville',
'Times New Roman', 'Droid Serif', 'Times', 'Source Serif Pro', serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
--font-mono: 'Menlo', 'Consolas', 'Monaco', 'Liberation Mono',
'Lucida Console', monospace;
}
body {
font-family: var(--font-sans);
}
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
#app {
isolation: isolate;
}
</style>
20 changes: 20 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { createApp } from 'vue';
import { createWebHistory, createRouter } from 'vue-router';

import Main from '@/pages/Main.vue';

import App from './App.vue';

const routerHistory = createWebHistory();
const router = createRouter({
history: routerHistory,
routes: [{ path: '/', component: Main }],
});

const app = createApp(App);

app.use(router);

app.mount('#app');

export { routerHistory, router };
5 changes: 5 additions & 0 deletions src/pages/Main.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div>
<h1>Home page</h1>
</div>
</template>
6 changes: 6 additions & 0 deletions src/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module '*.vue' {
import { ComponentOptions } from 'vue';

const component: ComponentOptions;
export default component;
}
33 changes: 33 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"compilerOptions": {
/* Base */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ES2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
/* Strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": false,
/* No transpiling */
"moduleResolution": "Bundler",
"module": "preserve",
"noEmit": true,
/* Browser-specific */
"lib": ["ES2022", "DOM", "DOM.Iterable"],
/* Imports */
"baseUrl": "src",
"paths": {
"@/*": ["*"]
}
}
}
4 changes: 4 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"framework": "vite",
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}
14 changes: 14 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
import VueDevTools from 'vite-plugin-vue-devtools';
import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
plugins: [
tsconfigPaths({
loose: true,
}),
vue(),
VueDevTools(),
],
});

0 comments on commit 038f76d

Please sign in to comment.