Add linter

This commit is contained in:
Damillora 2020-01-11 02:11:04 +07:00
parent 6a943e8274
commit 13505d3a6d
3 changed files with 26 additions and 9 deletions

17
.eslintrc.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}

View File

@ -1,16 +1,15 @@
{
"name": "@mitsuminedamillora/yuika",
"version": "0.2.0",
"main": "./dist/yuika.common.js",
"license": "MIT",
"version": "0.2.1",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build-lib": "vue-cli-service build --target lib --name yuika src/main.js",
"lint": "vue-cli-service lint",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
"build-lib": "vue-cli-service build --target lib --name yuika src/main.js",
"docs:build": "vuepress build docs",
"docs:dev": "vuepress dev docs"
},
"main": "./dist/yuika.common.js",
"dependencies": {
"@fullhuman/postcss-purgecss": "^1.3.0",
"core-js": "^3.4.4",
@ -21,7 +20,7 @@
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.2",
"@vue/cli-service": "^4.1.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
@ -46,5 +45,6 @@
"browserslist": [
"> 1%",
"last 2 versions"
]
],
"license": "MIT"
}

View File

@ -997,7 +997,7 @@
thread-loader "^2.1.3"
webpack "^4.0.0"
"@vue/cli-plugin-eslint@^4.1.0":
"@vue/cli-plugin-eslint@^4.1.2":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@vue/cli-plugin-eslint/-/cli-plugin-eslint-4.1.2.tgz#173d2a40beb7debc03a217db3bb4c67cbf255bd6"
integrity sha512-j6Z6tyhas7AFBwSvQ8JdKPLfaakZbwmK0+Xk8H6BK1/GrEpSCsb8pzBV8faStbKCPUO9vlKEuO319kHypUTJ1g==