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

WIP: (baby-project-web) Setup #2

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .browserslistrc

This file was deleted.

8 changes: 5 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
49 changes: 29 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
module.exports = {
root: true,
env: {
node: true
browser: true,
es2021: true,
node: true,
},
extends: [
'plugin:vue/vue3-essential',
'@vue/standard',
'@vue/typescript/recommended'
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended",
"standard",
"prettier",
],
overrides: [
{
// List of file extensions to lint.
files: "**/*.{js,jsx,ts,tsx,vue}",
},
{
// Remove when `<setup script>` works with ESLint.
// https://github.com/vuejs/eslint-plugin-vue/issues/1248
files: "**/*.vue",
rules: {
"@typescript-eslint/no-unused-vars": "off",
"no-unused-vars": "off",
},
},
],
parserOptions: {
ecmaVersion: 2020
parser: "@typescript-eslint/parser",
sourceType: "module",
},
plugins: ["vue", "@typescript-eslint"],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"vue/sort-keys": "error",
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
mocha: true
}
}
]
}
};
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug
about: Create a bug report helping us improve this project
title: "(BUG) General summary of the issue"
labels: bug, help wanted, question
assignees: ''

---

## Detailed Description
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug. -->

## Context
<!--- How has this bug affected you? What were you trying to accomplish? -->

## Expected Behavior
<!--- Tell us what should happen. -->

## Actual Behavior
<!--- Tell us what currently happens. -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant. -->
1.
2.
3.
4.

## Possible Fix
<!--- Optional. -->
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea for this project
title: "(Feature) General summary of the issue"
labels: enhancement
assignees: ''

---

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing. -->

## Context
<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->

## Possible Implementation
<!--- Optional. -->
21 changes: 4 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
.DS_Store
node_modules
/dist

/tests/e2e/videos/
/tests/e2e/screenshots/


# local env files
.env.local
.env.*.local
.DS_Store
dist
dist-ssr
*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
61 changes: 27 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
# baby-project-web

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your unit tests
```
npm run test:unit
```

### Run your end-to-end tests
```
npm run test:e2e
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
# Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings!

### If Using `<script setup>`

[`<script setup>`](https://github.com/vuejs/rfcs/pull/227) is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) instead of Vetur (and disable Vetur).

## Type Support For `.vue` Imports in TS

Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can use the following:

### If Using Volar

Run `Volar: Switch TS Plugin on/off` from VSCode command palette.

### If Using Vetur

1. Install and add `@vuedx/typescript-plugin-vue` to the [plugins section](https://www.typescriptlang.org/tsconfig#plugins) in `tsconfig.json`
2. Delete `src/shims-vue.d.ts` as it is no longer needed to provide module info to Typescript
3. Open `src/main.ts` in VSCode
4. Open the VSCode command palette
5. Search and run "Select TypeScript version" -> "Use workspace version"
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Baby Project Web</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading