VUE + ESlint + TypeScript + Prettier + ChromeDEV FIX
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
quotes: ["error", "single"],
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: true,
trailingComma: 'all'
}
]
},
parserOptions: {
parser: "@typescript-eslint/parser"
}
};
{
"name": "",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"postinstall": "patch-package",
"test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"axios": "^0.18.0",
"copy-webpack-plugin": "^5.0.2",
"lodash": "^4.17.11",
"raw-loader": "^2.0.0",
"register-service-worker": "^1.5.2",
"vue": "^2.6.6",
"vue-i18n": "^8.0.0",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-persist": "^2.0.0",
"xml-js": "^1.6.11"
},
"devDependencies": {
"@types/jest": "^23.1.4",
"@types/lodash": "^4.14.122",
"@types/webpack": "^4.4.0",
"@vue/cli-plugin-babel": "^3.4.0",
"@vue/cli-plugin-e2e-cypress": "^3.4.0",
"@vue/cli-plugin-eslint": "^3.4.0",
"@vue/cli-plugin-pwa": "^3.4.0",
"@vue/cli-plugin-typescript": "^3.4.0",
"@vue/cli-plugin-unit-jest": "^3.4.0",
"@vue/cli-service": "^3.4.0",
"@vue/eslint-config-prettier": "^4.0.1",
"@vue/eslint-config-typescript": "^4.0.0",
"@vue/test-utils": "^1.0.0-beta.20",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-plugin-transform-decorators": "^6.24.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"jest": ">=22.0.0 <24.0.0",
"lint-staged": "^8.1.0",
"node-sass": "^4.9.0",
"patch-package": "^6.0.2",
"postinstall-postinstall": "^2.0.0",
"sass-loader": "^7.1.0",
"ts-jest": "^23.0.0",
"typescript": "~3.2.2",
"vue-class-component": "^6.0.0",
"vue-cli-plugin-i18n": "^0.5.2",
"vue-jest": "^3.0.4",
"vue-property-decorator": "^8.0.0",
"vue-template-compiler": "^2.5.21",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.9.8"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.ts": [
"vue-cli-service lint",
"git add"
],
"*.vue": [
"vue-cli-service lint",
"git add"
]
}
}
module.exports = {
configureWebpack: config => {
if (process.env.NODE_ENV === 'development') {
config.devtool = 'eval-source-map';
config.output.devtoolFallbackModuleFilenameTemplate =
'webpack:///[resource-path]?[hash]';
config.output.devtoolModuleFilenameTemplate = info => {
const isVue = info.resourcePath.match(/\.vue$/);
const isScript = info.identifier.match(/type=script/);
return isVue && !isScript
? `webpack-vue:///${info.resourcePath}`
: `webpack-generated:///${info.resourcePath}?${info.hash}`;
};
}
}
};