This repository has been archived by the owner on Sep 22, 2022. It is now read-only.
forked from DARPA-ASKEM/terarium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Setup eslint (with aribnb rules), prettier, and pre commit hook (…
- Loading branch information
Showing
17 changed files
with
2,479 additions
and
2,459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/.eslintrc.cjs | ||
**/dist | ||
**/assets | ||
**/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require('@rushstack/eslint-patch/modern-module-resolution'); | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'@vue/eslint-config-airbnb-with-typescript', | ||
'prettier' // Turns off the formatting rules from the linter since formatting is handled by prettier | ||
], | ||
parser: 'vue-eslint-parser' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/dist | ||
**/assets | ||
**/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
<script setup lang="ts"> | ||
// This starter template is using Vue 3 <script setup> SFCs | ||
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup | ||
import HelloWorld from '@/components/HelloWorld.vue' | ||
import HelloWorld from '@/components/HelloWorld.vue'; | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank"> | ||
<img src="/vite.svg" class="logo" alt="Vite logo" /> | ||
</a> | ||
<a href="https://vuejs.org/" target="_blank"> | ||
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" /> | ||
</a> | ||
</div> | ||
<HelloWorld msg="Vite + Vue" /> | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank" rel="noopener noreferrer"> | ||
<img src="/vite.svg" class="logo" alt="Vite logo" /> | ||
</a> | ||
<a href="https://vuejs.org/" target="_blank" rel="noopener noreferrer"> | ||
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" /> | ||
</a> | ||
</div> | ||
<HelloWorld msg="Vite + Vue" /> | ||
</template> | ||
|
||
<style scoped> | ||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.vue:hover { | ||
filter: drop-shadow(0 0 2em #42b883aa); | ||
filter: drop-shadow(0 0 2em #42b883aa); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { createApp } from 'vue' | ||
import './style.css' | ||
import App from './App.vue' | ||
import { createApp } from 'vue'; | ||
import './style.css'; | ||
import App from './App.vue'; | ||
|
||
createApp(App).mount('#app') | ||
createApp(App).mount('#app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
/// <reference types="vite/client" /> | ||
|
||
declare module '*.vue' { | ||
import type { DefineComponent } from 'vue' | ||
const component: DefineComponent<{}, {}, any> | ||
export default component | ||
import type { DefineComponent } from 'vue'; | ||
|
||
const component: DefineComponent<{}, {}, any>; | ||
export default component; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
import path from 'path' | ||
import { defineConfig } from 'vite'; | ||
import vue from '@vitejs/plugin-vue'; | ||
import path from 'path'; | ||
|
||
// See: https://vitejs.dev/config/ | ||
// See: https://vitejs.dev/config/server-options.html#server-proxy | ||
export default defineConfig({ | ||
// Syntax sugar for specifying imports | ||
resolve: { | ||
alias: { | ||
'@': path.resolve(__dirname, './src') | ||
} | ||
}, | ||
// Server proxy - change here to connect to API server (e.g. staging environment) | ||
server: { | ||
proxy: { | ||
'/api': { | ||
target: 'http://localhost:3000/api', | ||
changeOrigin: true, | ||
rewrite: (path) => { | ||
return path.replace(/^\/api/, ''); | ||
} | ||
} | ||
} | ||
}, | ||
plugins: [vue()] | ||
}) | ||
// Syntax sugar for specifying imports | ||
resolve: { | ||
alias: { | ||
'@': path.resolve(__dirname, './src') | ||
} | ||
}, | ||
// Server proxy - change here to connect to API server (e.g. staging environment) | ||
server: { | ||
proxy: { | ||
'/api': { | ||
target: 'http://localhost:3000/api', | ||
changeOrigin: true, | ||
rewrite: (_path) => _path.replace(/^\/api/, '') | ||
} | ||
} | ||
}, | ||
plugins: [vue()] | ||
}); |
Oops, something went wrong.