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

feat/init #2

Open
wants to merge 5 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
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

root = true

[*]
charset = utf-8
indent_style = space # indent style
indent_size = 2 # indent size
trim_trailing_whitespace = true # trim trailing whitespace
insert_final_newline = true # insert final newline

[*.md]
max_line_length = off
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
public
dist
68 changes: 54 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,65 @@
module.exports = {
'env': {
'browser': true,
'node': true,
'es2021': true,
env: {
browser: true,
es2021: true,
node: true,
'vue/setup-compiler-macros': true,
},
'extends': [
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:prettier/recommended',
],
'parserOptions': {
'ecmaVersion': 'latest',
'parser': '@typescript-eslint/parser',
'sourceType': 'module',
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
'plugins': [
'vue',
'@typescript-eslint',
],
'rules': {
plugins: ['vue', '@typescript-eslint', 'prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-var': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'prettier/prettier': ['error'],
'lines-between-class-members': 'off',
'default-case': 'off',
'no-use-before-define': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': ['error'],
'no-bitwise': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'vue/no-unused-vars': ['error', { ignorePattern: '^_' }],
'no-void': 'off',
'no-return-assign': ['error', 'except-parens'],
'no-restricted-globals': ['error', 'event'],
'no-unused-expressions': 'off',
'vue/no-template-shadow': 'off',
'no-underscore-dangle': 'off',
'no-restricted-syntax': 'off',
'no-await-in-loop': 'off',
'no-plusplus': 'off',
'no-useless-return': 'off',
'no-param-reassign': 'off',
'consistent-return': 'off',
'no-return-await': 'off',
'class-methods-use-this': 'off',
'vue/multi-word-component-names': [
'error',
{ ignores: ['index', 'default'] },
],
},
overrides: [
{ files: ['*.ts', '*.tsx'], rules: { 'no-dupe-class-members': 'off' } },
],
};
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
* text=auto eol=lf
*.js linguist-detectable=false
43 changes: 43 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: deploy

on:
push:
branches: [master]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node.js v16.x
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Install
run: yarn install

- name: Build
run: yarn build
env:
BASE_URL: ${{ secrets.VITE_BASE }}

- name: deploy
run: |
cd dist
[ -f 404.html ] || ln -s index.html 404.html
if [ "none" != "$cname" ]; then echo "$cname" > CNAME; fi
git config --global user.name "$user_name"
git config --global user.email "$user_email"
git init
git add -A
git commit -m "${{ github.event.head_commit.message }}"
git push -f https://_:"$token"@github.com/${{ github.event.repository.full_name }}.git master:gh-pages
shell: bash
env:
token: ${{ secrets.GITHUB_TOKEN }}
user_name: GitHub Action
user_email: [email protected]
cname: none
135 changes: 120 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,126 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.pnpm-debug.log*

node_modules
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.vite-ssg-temp
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
3 changes: 3 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tabWidth: 2
semi: true
singleQuote: true
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/dist/*
/public/*
public/*
Loading