Install and configure eslint-plugin-vue
patrickalima98 opened this issue · 2 comments
patrickalima98 commented
Hi, how are you? I'm migrating from Electron to nw.js with an existing vue project, I'm trying to configure the eslint-plugin-vue but I'm not getting it, could you help me set up the eslint file?
My eslint config file from electron projeto:
module.exports = {
root: true,
parserOptions: {
"parser": "babel-eslint",
"ecmaVersion": 2017,
"sourceType": "module"
},
env: {
browser: true,
node: true
},
"extends": [
"airbnb-base",
"plugin:vue/recommended"
],
globals: {
__static: true
},
plugins: [
'vue'
],
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js','.jsx','.vue']
}
}
}
}
My package.josn:
{
"name": "helloworld",
"label": "Helloworld",
"description": "A nwjs-vue application",
"version": "1.0.0",
"author": "Patrick A Lima <patrickalima98@live.com>",
"private": true,
"main": "./dist/bg/bg.js",
"node-remote": "*://localhost/*",
"window": {
"width": 1000,
"height": 563
},
"build": {
"files": [
"node_modules/**/*",
"dist/**/*"
],
"output": "./releases",
"nwVersion": "0.32.4",
"nwPlatforms": [
"win"
],
"nwArchs": [
"x64"
]
},
"scripts": {
"dev": "node build/dev-runner.js",
"build": "node build/runner.js"
},
"devDependencies": {
"ajv": "^6.5.3",
"axios": "^0.18.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.0",
"babel-loader": "^7.1.5",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^0.28.11",
"eslint": "^5.6.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-vue": "^4.7.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^0.11.2",
"fs-extra": "^7.0.0",
"html-webpack-plugin": "^3.2.0",
"node-sass": "^4.9.2",
"npm-which": "^3.0.1",
"nwjs-builder-phoenix": "^1.14.7",
"sass-loader": "^7.0.1",
"url-loader": "^0.6.2",
"vue": "^2.5.17",
"vue-loader": "^15.2.7",
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.5.17",
"vuex": "^3.0.1",
"webpack": "^3.12.0",
"webpack-dev-server": "^2.11.2",
"webpack-hot-middleware": "^2.22.3"
},
"dependencies": {
"bluebird": "^3.5.2",
"dugite": "^1.75.0",
"gitlab": "^4.1.1",
"moment": "^2.22.2",
"vue-virtual-scroller": "^0.12.0"
}
}
thanks in advance
sharifzadesina commented
@patrickalima98 I don't think this is a bug related to nwjs-vue
.
patrickalima98 commented
Oops, you're right, I'm sorry. I was able to fix it here, an error occurred because of migrating from electron to nw.js