├── src ├── sass │ ├── _layout.sass │ ├── _shame.sass │ ├── _trumps.sass │ ├── _utility.sass │ ├── _functions.sass │ ├── _mediaqueries.sass │ ├── _var.sass │ ├── _mixins.sass │ ├── _base.sass │ └── main.scss ├── index.js ├── store │ └── index.js ├── router │ └── index.js ├── css │ └── main.css ├── app.vue └── components │ ├── restrictions.vue │ ├── reasoning.vue │ ├── features.vue │ └── tips.vue ├── .eslintignore ├── assets ├── icon.icns ├── icon.ico └── icon.png ├── .sass-lint.yml ├── .travis.yml ├── secondwindow.html ├── .editorconfig ├── index.html ├── LICENSE ├── .gitignore ├── README.md ├── package.json └── .eslintrc.js /src/sass/_layout.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/sass/_shame.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/sass/_trumps.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/sass/_utility.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/sass/_functions.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/sass/_mediaqueries.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /build/ 3 | /config/ 4 | /dist/ 5 | /*.js 6 | -------------------------------------------------------------------------------- /src/sass/_var.sass: -------------------------------------------------------------------------------- 1 | 2 | $white: #FFF 3 | $nearWhite: #EDEDED 4 | $black: #000 5 | -------------------------------------------------------------------------------- /src/sass/_mixins.sass: -------------------------------------------------------------------------------- 1 | 2 | =bmp0 3 | border: 0px 4 | margin: 0px 5 | padding: 0px 6 | -------------------------------------------------------------------------------- /assets/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheJaredWilcurt/vue-desktop-basic/HEAD/assets/icon.icns -------------------------------------------------------------------------------- /assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheJaredWilcurt/vue-desktop-basic/HEAD/assets/icon.ico -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheJaredWilcurt/vue-desktop-basic/HEAD/assets/icon.png -------------------------------------------------------------------------------- /.sass-lint.yml: -------------------------------------------------------------------------------- 1 | options: 2 | config-file: node_modules/tjw-sasslint-rules/tjwsasslint.yml 3 | files: 4 | include: 'src/sass/**/*.s+(a|c)ss' 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | language: node_js 4 | node_js: 5 | - "10" 6 | install: 7 | - npm install 8 | script: 9 | - npm run lint 10 | - npm run sasslint 11 | - node ./node_modules/.bin/build --concurrent --tasks linux-x86 --mirror https://dl.nwjs.io/ . 12 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | Vue.use(Vuex); 2 | Vue.use(VueRouter); 3 | 4 | // eslint-disable-next-line no-unused-vars 5 | const app = new Vue({ 6 | el: '#app', 7 | template: '', 8 | components: { 9 | App: httpVueLoader('src/app.vue') 10 | }, 11 | store: store, 12 | router: router 13 | }); 14 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars 2 | const store = new Vuex.Store({ 3 | state: { 4 | greeting: 'Hello' 5 | }, 6 | getters: {}, 7 | mutations: { 8 | changeGreeting: function (state, newGreeting) { 9 | state.greeting = newGreeting; 10 | } 11 | }, 12 | actions: {} 13 | }); 14 | 15 | -------------------------------------------------------------------------------- /secondwindow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Example of opening another window 5 | 10 | 11 | 12 | See the "Tips" section for more information. 13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # Top-most EditorConfig file 4 | root = true 5 | 6 | # defaults for all files 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 2 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | # Markdown files uses two trailing spaces to indicate a
16 | [*.{md}] 17 | trim_trailing_whitespace = false 18 | 19 | # 4 space indentation 20 | [*.{sass,scss,css}] 21 | indent_size = 4 22 | 23 | # 2 space indentation 24 | [*.{html,json}] 25 | indent_size = 2 26 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vue-Desktop-Basic boilerplate 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars 2 | const router = new VueRouter({ 3 | routes: [ 4 | { 5 | path: '*', 6 | redirect: 'features' 7 | }, 8 | { 9 | path: '/features', 10 | name: 'features', 11 | component: httpVueLoader('src/components/features.vue') 12 | }, 13 | { 14 | path: '/reasoning', 15 | name: 'reasoning', 16 | component: httpVueLoader('src/components/reasoning.vue') 17 | }, 18 | { 19 | path: '/restrictions', 20 | name: 'restrictions', 21 | component: httpVueLoader('src/components/restrictions.vue') 22 | }, 23 | { 24 | path: '/tips', 25 | name: 'tips', 26 | component: httpVueLoader('src/components/tips.vue') 27 | } 28 | ] 29 | }); 30 | -------------------------------------------------------------------------------- /src/css/main.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | border: 0px; 4 | margin: 0px; 5 | padding: 0px; 6 | padding-bottom: 20px; 7 | font-family: "Century Gothic", "Trebuchet MS", Tahoma, sans-serif; 8 | } 9 | 10 | h1, 11 | h2, 12 | nav, 13 | p { 14 | padding-right: 20px; 15 | padding-left: 20px; 16 | } 17 | 18 | h2 { 19 | border-top: 3px solid #000; 20 | padding-top: 1.2em; 21 | } 22 | 23 | nav a { 24 | display: inline-block; 25 | padding: 0px 10px; 26 | text-transform: capitalize; 27 | } 28 | 29 | li { 30 | padding-top: 7px; 31 | padding-right: 20px; 32 | line-height: 1.5; 33 | } 34 | 35 | h2 + ul > li:first-of-type { 36 | padding-top: 0px; 37 | } 38 | 39 | code, 40 | pre { 41 | background: #EDEDED; 42 | border-radius: 8px; 43 | padding: 3px 8px 5px 8px; 44 | font-size: 15px; 45 | } 46 | -------------------------------------------------------------------------------- /src/sass/_base.sass: -------------------------------------------------------------------------------- 1 | html, 2 | body 3 | +bmp0 4 | padding-bottom: 20px 5 | font-family: "Century Gothic", "Trebuchet MS", Tahoma, sans-serif 6 | 7 | h1, 8 | h2, 9 | nav, 10 | p 11 | padding-right: 20px 12 | padding-left: 20px 13 | 14 | h2 15 | border-top: 3px solid $black 16 | padding-top: 1.2em 17 | 18 | nav a 19 | display: inline-block 20 | padding: 0px 10px 21 | text-transform: capitalize 22 | 23 | li 24 | padding-top: 7px 25 | padding-right: 20px 26 | line-height: 1.5 27 | 28 | h2 + ul > li:first-of-type 29 | padding-top: 0px 30 | 31 | code, 32 | pre 33 | background: $nearWhite 34 | border-radius: 8px 35 | padding: 3px 8px 5px 8px 36 | font-size: 15px 37 | -webkit-box-decoration-break: clone 38 | box-decoration-break: clone 39 | -------------------------------------------------------------------------------- /src/app.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 44 | 45 | 52 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 The Jared Wilcurt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | dist/ 61 | package-lock.json 62 | -------------------------------------------------------------------------------- /src/sass/main.scss: -------------------------------------------------------------------------------- 1 | 2 | @charset "utf-8"; // Character type for the stylesheet 3 | 4 | // ITCSS: SETTINGS 5 | @import "_var.sass"; // Sass Variables - Does not effect page, but other Sass files reference this file. 6 | 7 | 8 | // ITCSS: TOOLS 9 | @import "_mixins.sass"; // Sass Mixins - Does not effect page, but other Sass files reference this file. 10 | @import "_functions.sass"; // Sass Functions - Does not effect page, but other Sass files reference this file. 11 | 12 | 13 | // ITCSS: RESETS - Remove inconsistencies in the way different browsers render elements by default 14 | // Not needed in a desktop app 15 | 16 | 17 | // ITCSS: FRAMEWORKS/THEMES 18 | 19 | 20 | // ITCSS: PLUGINS 21 | 22 | 23 | // ITCSS: GENERIC (ELEMENTS/BASE) 24 | @import "_base.sass"; // h1, h2, h3, p, etc. 25 | @import "_layout.sass"; // General layout classes, like .col-xs-4 26 | @import "_utility.sass"; // Utility classes, like .wrapper or .text-center 27 | 28 | 29 | // ITCSS: OBJECTS - Grouped reusable chunks 30 | 31 | 32 | // ITCSS: COMPONENTS - Component-specific styles 33 | 34 | 35 | // ITCSS: CONTAINERS 36 | 37 | 38 | // ITCSS: TRUMPS 39 | @import "_mediaqueries.sass"; // Adjusts CSS of elements depending app width. Adaptive Web Design. 40 | @import "_trumps.sass"; // Override above styles with high specificity selectors. Use sparingly 41 | @import "_shame.sass"; // Code you wrote to meet a deadline and need to fix later 42 | -------------------------------------------------------------------------------- /src/components/restrictions.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # vue-desktop-basic boilerplate 3 | 4 | 5 | ## What is this 6 | 7 | This is a boilerplate for a simple desktop app. It comes with tips about common tasks for a desktop app. 8 | 9 | 10 | ## Should I use this 11 | 12 | Probably not? It's more of a proof of concept to see if you can run all of the features of a Vue app without the need for a bundler, since the process of bundling is pretty pointless for a desktop app (no point in shaving off 25KB when you are shipping 100MB). 13 | 14 | Still though, there are a lot of good tips for NW.js apps in there in general, that are applicable to any desktop app, whether it is using Vue & NW.js or React & Electron. 15 | 16 | **What should I use instead?** 17 | 18 | * [NW.js + Vue 3 + Vite + Pinia + Vitest + Vue-DevTools](https://github.com/nwutils/nw-vue3-boilerplate) - This the newest/most robust/best option for desktop apps with Vue. 19 | * [NW-Vue-CLI-Example](https://github.com/nwutils/nw-vue-cli-example) is basically a normal Vue-CLI project with some additional setup already added in to work as a desktop app. 20 | 21 | 22 | ### Features 23 | 24 | The following are already set up: 25 | 26 | * Vue.js 27 | * Vue-Router 28 | * Vuex 29 | * Vue-DevTools 30 | * Sass 31 | * Sasslint 32 | * ESLint 33 | * nwjs-builder-phoenix 34 | * [VSCode intellisense for nw](http://docs.nwjs.io/en/latest/For%20Users/FAQ/) 35 | 36 | 37 | ## Usage 38 | 39 | 1. Download and install [Node.js](https://nodejs.org) 40 | 1. Download `vue-desktop-basic` 41 | 1. Run `npm install` 42 | 1. Run `npm start` 43 | 44 | 45 | ## Linting 46 | 47 | 1. `npm run lint` will lint your `.js` and `.vue` files according to the rules in `.eslintrc.js` 48 | 1. `npm run fix` this will auto-fix any linting issues that `npm run lint` finds (not everything can be auto fixed) 49 | 1. `npm run sass` will start watching for changes in the sass folder and process the changes to the css folder. 50 | 1. `npm run sasslint` will lint your `.sass` and `.scss` files. 51 | 1. `npm run sassfix` will attempt to auto-fix Sass linting issues, however it may take several runs and not everything can be auto fixed 52 | 53 | 54 | ## To do a build: 55 | 56 | 1. `npm install` 57 | 1. `npm run build` 58 | 59 | All settings regarding the build are handled in the `package.json`. 60 | 61 | 62 | ### Vue-DevTools 63 | 64 | If you want Vue-DevTools to be accessible in the Chromium DevTools in your app, you cannot use the minified version of Vue.js (use `vue.js` not `vue.min.js`). 65 | 66 | 67 | * * * 68 | 69 | All other instructions and details are inside the app. 70 | 71 | * * * 72 | 73 | ### TO DO List: 74 | 75 | * Add in Vue-Test-Utils 76 | -------------------------------------------------------------------------------- /src/components/reasoning.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 35 | -------------------------------------------------------------------------------- /src/components/features.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 91 | 92 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-desktop-basic", 3 | "version": "1.1.0", 4 | "description": "Boilerplate for a Vue based Desktop App", 5 | "keywords": [ 6 | "vue", 7 | "boilerplate", 8 | "desktop" 9 | ], 10 | "author": "TheJaredWilcurt@users.noreply.github.com", 11 | "license": "MIT", 12 | "repository": "https://github.com/TheJaredWilcurt/vue-desktop-basic", 13 | "main": "index.html", 14 | "scripts": { 15 | "start": "nw .", 16 | "build": "build --concurrent --tasks win-x86,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ .", 17 | "lint": "eslint --config=.eslintrc.js src/**/*.js src/**/*.vue", 18 | "fix": "eslint --fix --config=.eslintrc.js src/**/*.js src/**/*.vue", 19 | "sass": "node-sass -w -i -o=src/css --output-style=expanded --error-bell ./src/sass", 20 | "sasslint": "sass-lint -c .sass-lint.yml -v -f table", 21 | "sassfix": "sass-lint-auto-fix -c .sass-lint.yml", 22 | "validate": "npm run lint && npm run sasslint" 23 | }, 24 | "window": { 25 | "width": 800, 26 | "height": 500, 27 | "icon": "assets/icon.png" 28 | }, 29 | "chromium-args": "--load-extension='./node_modules/nw-vue-devtools-prebuilt/extension'", 30 | "dependencies": { 31 | "http-vue-loader": "1.x.x", 32 | "vue": "2.x.x", 33 | "vue-router": "3.x.x", 34 | "vuex": "3.x.x" 35 | }, 36 | "devDepComments": { 37 | "babel-eslint": "Allows linting of ES6+", 38 | "eslint": "Linting .js and .vue files", 39 | "eslint-plugin-jest": "Linter is aware of Jest globals", 40 | "eslint-plugin-vue": "Linting of Vue Templates", 41 | "node-sass": "Process .sass and .scss to .css", 42 | "nw": "Latest NW.js SDK version", 43 | "nw-vue-devtools": "Downloads latest Vue DevTools, modifies it, does a build so it works with NW.js", 44 | "nwjs-builder-phoenix": "Automates doing dist builds of your desktop app", 45 | "nwjs-types": "Gives VSCode intellisense for nw.whatever", 46 | "sass-lint": "Lints your Sass Files", 47 | "sass-lint-auto-fix": "Attempts to auto-fix Sass linting problems", 48 | "tjw-sasslint-rules": "A very strict ruleset for Sass linting" 49 | }, 50 | "devDependencies": { 51 | "babel-eslint": "8.x.x", 52 | "eslint": "4.x.x", 53 | "eslint-plugin-jest": "^22.4.1", 54 | "eslint-plugin-vue": "4.x.x", 55 | "node-sass": "4.x.x", 56 | "nw": "sdk", 57 | "nw-vue-devtools-prebuilt": "0.x.x", 58 | "nwjs-builder-phoenix": "1.x.x", 59 | "nwjs-types": "^1.0.0", 60 | "sass-lint": "1.x.x", 61 | "sass-lint-auto-fix": "0.x.x", 62 | "tjw-sasslint-rules": "2.x.x" 63 | }, 64 | "build": { 65 | "nwVersion": "latest", 66 | "nwFlavor": "normal", 67 | "targets": [ 68 | "zip", 69 | "nsis7z" 70 | ], 71 | "excludes": [ 72 | "package-lock.json", 73 | "assets/*", 74 | "src/sass/*" 75 | ], 76 | "strippedProperties": [ 77 | "chromium-args", 78 | "scripts", 79 | "devDependencies", 80 | "build" 81 | ], 82 | "win": { 83 | "icon": "assets/icon.ico" 84 | }, 85 | "mac": { 86 | "icon": "assets/icon.icns" 87 | }, 88 | "nsis": { 89 | "icon": "assets/icon.ico", 90 | "unIcon": "assets/icon.ico", 91 | "languages": [ 92 | "English" 93 | ], 94 | "diffUpdaters": false, 95 | "hashCalculation": true 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/components/tips.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 95 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'root': true, 3 | 'parserOptions': { 4 | 'parser': 'babel-eslint', 5 | 'ecmaVersion': 8, 6 | 'sourceType': 'module' 7 | }, 8 | 'env': { 9 | 'browser': true, 10 | 'node': true 11 | }, 12 | 'globals': { 13 | 'jsdom': true, 14 | 'Promise': true, 15 | 'nw': true, 16 | 'Vue': true, 17 | 'Vuex': true, 18 | 'VueRouter': true, 19 | 'httpVueLoader': true, 20 | 'store': true, 21 | 'router': true 22 | }, 23 | // required to lint *.vue files 24 | 'plugins': [ 25 | 'vue' 26 | ], 27 | 'extends': ['plugin:vue/recommended', "plugin:jest/recommended"], 28 | "plugins": ["jest"], 29 | 'rules': { 30 | 'arrow-parens': ['off'], 31 | 'brace-style': ['error', '1tbs', { 'allowSingleLine': true }], 32 | 'comma-dangle': ['error', 'never'], 33 | 'comma-spacing': ['error', { 'before': false, 'after': true }], 34 | 'comma-style': ['error', 'last'], 35 | 'curly': ['error'], 36 | // allow async-await 37 | 'generator-star-spacing': ['off'], 38 | // 2 space indentation to match .editorconfig 39 | 'indent': ['error', 2, { 'SwitchCase': 1 }], 40 | 'keyword-spacing': ['error', { 'before': true, 'after': true }], 41 | // allow debugger during development 42 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 43 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 44 | 'no-multi-spaces': ['error'], 45 | 'no-restricted-syntax': ['error', 'Property[method="true"]'], 46 | 'no-unused-vars': ['error'], 47 | 'no-undef': ['error'], 48 | // Only allow let and const, no var 49 | 'no-var': ['error'], 50 | 'object-curly-spacing': ['error', 'always'], 51 | 'one-var': ['error', 'never'], 52 | 'quotes': ['error', 'single'], 53 | 'semi': ['error', 'always'], 54 | 'space-before-blocks': ['error', 'always'], 55 | 'space-before-function-paren': ['error', 'always'], 56 | 'space-in-parens': ['error', 'never'], 57 | 'space-infix-ops': ['error'], 58 | 'spaced-comment': ['error', 'always'], 59 | // Vue Linter Options 60 | 'vue/attribute-hyphenation': ['error', 'never'], 61 | 'vue/attributes-order': ['error', { 62 | 'order': [ 63 | 'LIST_RENDERING', // 'v-for item in items' 64 | 'CONDITIONALS', // 'v-if', 'v-else-if', 'v-else', 'v-show', 'v-cloak' 65 | 'RENDER_MODIFIERS', // 'v-once', 'v-pre' 66 | 'BINDING', // 'v-model', 'v-bind', ':property="foo"' 67 | 'CONTENT', // 'v-text', 'v-html' 68 | 'DEFINITION', // 'is' 69 | 'GLOBAL', // 'id' 70 | 'OTHER_ATTR', // 'customProp="foo"', 'class', 'type', 'value' etc 71 | 'EVENTS', // '@click="functionCall"', 'v-on="event"' 72 | 'UNIQUE' // 'slot', 'key', 'ref' 73 | ] 74 | }], 75 | 'vue/html-closing-bracket-newline': 76 | ['error', { 77 | 'singleline': 'never', 78 | 'multiline': 'always' 79 | }], 80 | 'vue/html-closing-bracket-spacing': 81 | ['error', { 82 | 'startTag': 'never', 83 | 'endTag': 'never', 84 | 'selfClosingTag': 'always' 85 | }], 86 | 'vue/html-indent': ['error', 2, { 87 | 'attribute': 1, 88 | 'closeBracket': 0 89 | }], 90 | 'vue/html-self-closing': ['error', { 91 | 'html': { 92 | 'void': 'always', 93 | 'normal': 'never', 94 | 'component': 'always' 95 | } 96 | }], 97 | 'vue/max-attributes-per-line': ['error', { 98 | 'singleline': 3, 99 | 'multiline': { 100 | 'max': 1, 101 | 'allowFirstLine': false 102 | } 103 | }], 104 | 'vue/name-property-casing': ['error', 'PascalCase'], 105 | 'vue/order-in-components': ['error', { 'order': [ 106 | 'el', 107 | 'name', 108 | ['template', 'render'], 109 | 'parent', 110 | 'functional', 111 | ['delimiters', 'comments'], 112 | ['components', 'directives'], 113 | 'extends', 114 | 'mixins', 115 | 'inheritAttrs', 116 | 'model', 117 | ['props', 'propsData'], 118 | 'data', 119 | 'methods', 120 | 'computed', 121 | 'filters', 122 | 'watch', 123 | 'LIFECYCLE_HOOKS', 124 | 'renderError' 125 | ]}], 126 | 'vue/prop-name-casing': ['error', 'camelCase'] 127 | } 128 | }; 129 | --------------------------------------------------------------------------------