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

View File

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