chore: Re-setup eslint

This commit is contained in:
Tixie 2019-03-11 22:10:12 +01:00
parent 2285b58322
commit ec993fbbb7
8 changed files with 958 additions and 36 deletions

10
.eslintignore Normal file
View file

@ -0,0 +1,10 @@
# Statics
public
# Generated by the build
dist
*.min.js
node_modules
tmp
.cache

View file

@ -1,16 +1,40 @@
module.exports = { module.exports = {
root: true, 'env': {
env: { 'es6': true,
node: true 'node': true
}, },
'extends': [ 'extends': [
'plugin:vue/essential', 'standard',
'@vue/standard' 'plugin:vue/essential'
], ],
rules: { 'globals': {
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
}, },
parserOptions: { 'parserOptions': {
parser: 'babel-eslint' 'ecmaVersion': 2018,
},
'plugins': [
'vue'
],
'rules': {
'no-console': 'off',
'no-debugger': 'off',
'vue/html-end-tags': 'error',
'vue/html-indent': [
'error',
2
],
'vue/require-prop-types': 'error',
'vue/attributes-order': 'error',
'vue/attribute-hyphenation': [
'error',
'always'
],
'vue/html-quotes': [
'error',
'double'
]
} }
} }

View file

@ -4,7 +4,11 @@ Capture few seconds as a gif for souvenir
## Project setup ## Project setup
``` ```
npm install npm i
```
of if you don't want to impact the package-lock
```
npm ci
``` ```
### Compiles and hot-reloads for development ### Compiles and hot-reloads for development
@ -17,15 +21,10 @@ npm run serve
npm run build npm run build
``` ```
### Run your tests
```
npm run test
```
### Lints and fixes files ### Lints and fixes files
``` ```
npm run lint npm run lint
``` ```
```
### Customize configuration npm run lint-fix
See [Configuration Reference](https://cli.vuejs.org/config/). ```

904
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,9 @@
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "parcel src/index.html", "serve": "parcel src/index.html",
"build": "parcel build src/index.html" "build": "parcel build src/index.html",
"lint": "eslint --ext .js,vue .",
"lint-fix": "eslint --ext .js,vue . --fix"
}, },
"dependencies": { "dependencies": {
"gif-writer": "^0.9.3", "gif-writer": "^0.9.3",
@ -15,6 +17,13 @@
"devDependencies": { "devDependencies": {
"@vue/component-compiler-utils": "^2.6.0", "@vue/component-compiler-utils": "^2.6.0",
"autoprefixer": "^9.4.10", "autoprefixer": "^9.4.10",
"eslint": "^5.15.1",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.2",
"parcel-bundler": "^1.12.0", "parcel-bundler": "^1.12.0",
"parcel-plugin-static-files-copy": "^2.0.0", "parcel-plugin-static-files-copy": "^2.0.0",
"vue-hot-reload-api": "^2.3.3", "vue-hot-reload-api": "^2.3.3",

View file

@ -1,11 +1,11 @@
<template lang="html"> <template lang="html">
<div class="options"> <div class="options">
<select class="options__select" v-model="timer.selected" @change="updateTimer(timer.selected)" :disabled="encoding.status"> <select v-model="timer.selected" class="options__select" :disabled="encoding.status" @change="updateTimer(timer.selected)">
<option v-for="time in timer.list" :key="time" :value="time"> <option v-for="time in timer.list" :key="time" :value="time">
{{ timeLabel(time) }} {{ timeLabel(time) }}
</option> </option>
</select> </select>
<button class="options__btn" @click="back" :disabled="encoding.status"><icon-switch/>switch</button> <button class="options__btn" :disabled="encoding.status" @click="back"><icon-switch/>switch</button>
</div> </div>
</template> </template>

View file

@ -1,11 +1,11 @@
<template lang="html"> <template lang="html">
<div class="capture"> <div class="capture">
<div class="capture-progress" v-if="capturing.status"> <div v-if="capturing.status" class="capture-progress">
<capture-progress></capture-progress> <capture-progress></capture-progress>
</div> </div>
<capture-options v-else></capture-options> <capture-options v-else></capture-options>
<div class="preview" ref="previewcontainer"> <div ref="previewcontainer" class="preview">
<video ref="preview" class="preview-visual" preload="yes" autoplay muted playsinline webkit-playsinline></video> <video ref="preview" class="preview-visual" preload="yes" autoplay muted playsinline webkit-playsinline></video>
</div> </div>

View file

@ -5,7 +5,7 @@
<button class="options__btn" @click="back"> back</button> <button class="options__btn" @click="back"> back</button>
</div> </div>
<div class="preview" ref="previewcontainer"> <div ref="previewcontainer" class="preview">
<img class="preview-visualImg" :src="downloading.objectUrl" alt=""> <img class="preview-visualImg" :src="downloading.objectUrl" alt="">
</div> </div>