A11Y Lint & Update Dependencies

This commit is contained in:
The Jared Wilcurt 2019-12-27 00:57:14 -05:00 committed by GitHub
commit 714c585f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3333 additions and 1280 deletions

View File

@ -1 +1 @@
chrome 78 chrome 79

View File

@ -26,6 +26,7 @@ module.exports = {
extends: [ extends: [
'eslint:recommended', 'eslint:recommended',
'plugin:jest/recommended', 'plugin:jest/recommended',
'plugin:vue-a11y/recommended',
'tjw-base', 'tjw-base',
'tjw-vue' 'tjw-vue'
], ],
@ -33,6 +34,8 @@ module.exports = {
'no-restricted-syntax': [ 'no-restricted-syntax': [
'error', 'error',
'Property[method="true"]' 'Property[method="true"]'
] ],
// https://github.com/maranran/eslint-plugin-vue-a11y/issues/10
'vue-a11y/click-events-have-key-events': 'off'
} }
}; };

View File

@ -12,19 +12,21 @@ NW.js + Vue-CLI 4 example
* Vue-DevTools (latest) * Vue-DevTools (latest)
* Babel * Babel
* ESLint * ESLint
* Vue Linting
* A11Y Linting
* Jest Linting
* Jest (100% test coverage) * Jest (100% test coverage)
*Why not include Vue-Router or Vuex?* *Why not include Vue-Router or Vuex?*
Those are both very easily added from the Vue-CLI. There is also no custom styling libraries (Bulma, Bootstrap, etc), or meta-languages (Sass, TS, Pug, etc), or component libraries (Vuetify, Inkline, etc). This is repo is meant to be the "go to" option for building all desktop apps with Vue. So it avoids pushing any particular choices on to you. With the exception of testing being set up for Jest, and Linting being set up to ensure minumum quality of this boilerplate repo itself. Both of which can be easily modified, ignored, or removed. Those are both very easily added from the Vue-CLI. There is also no custom styling libraries (Bulma, Bootstrap, etc), or meta-languages (Sass, TS, Pug, etc), or component libraries (Vuetify, Inkline, etc). This repo is meant to be the "go to" option for building all desktop apps with Vue. So it avoids pushing any particular choices on to you. With the exception of testing being set up for Jest, and Linting being set up to ensure minumum quality of this boilerplate repo itself. Both of which can be easily modified, ignored, or removed.
## Running Locally for development ## Running Locally for development
1. `npm install` 1. `npm install`
1. `npm start` 1. `npm start`
1. An empty window will pop up while Webpack warm ups 1. Once Webpack finishes starting up your app will appear in a window
1. Once Webpack is running, refresh the window and you're golden
## Building for distribution ## Building for distribution

4524
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,11 @@
"ManifestComments": [ "ManifestComments": [
"Only add dependencies that you want shipped to the end user, for everything else, use devDependencies, including things that will be bundled by webpack.", "Only add dependencies that you want shipped to the end user, for everything else, use devDependencies, including things that will be bundled by webpack.",
"NW.js requires a name and a main, everything else is optional.", "NW.js requires a name and a main, everything else is optional.",
"The build section is used by nwjs-builder-phoenix, see it's documentation for more info", "The build section is used by nwjs-builder-phoenix, see its documentation for more info",
"To turn spell checking off, remove it from the chromium-args in this file" "To turn spell checking off, remove it from the chromium-args in this file"
], ],
"name": "nw-vue", "name": "nw-vue",
"version": "1.2.0", "version": "1.3.0",
"main": "http://localhost:8964", "main": "http://localhost:8964",
"node-remote": "http://localhost:8964", "node-remote": "http://localhost:8964",
"node-main": "", "node-main": "",
@ -27,10 +27,10 @@
"build:nw": "build --concurrent --tasks win-x86,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ .", "build:nw": "build --concurrent --tasks win-x86,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ .",
"build:win": "npm run build:win:clean && npm run build:vue && build --tasks win-x86 --mirror https://dl.nwjs.io/ .", "build:win": "npm run build:win:clean && npm run build:vue && build --tasks win-x86 --mirror https://dl.nwjs.io/ .",
"build:lin": "npm run build:lin:clean && npm run build:vue && build --tasks linux-x64 --mirror https://dl.nwjs.io/ .", "build:lin": "npm run build:lin:clean && npm run build:vue && build --tasks linux-x64 --mirror https://dl.nwjs.io/ .",
"build:win:clean": "rimraf ./dist-vue ./dist/nw-vue-1.1.0-win-x86 ./dist/nw-vue-1.1.0-win-x86.zip ./dist/nw-vue-1.1.0-win-x86.7z ./dist/nw-vue-1.1.0-win-x86-Setup.exe", "build:win:clean": "rimraf ./dist-vue ./dist/nw-vue-1.3.0-win-x86 ./dist/nw-vue-1.3.0-win-x86.zip ./dist/nw-vue-1.3.0-win-x86.7z ./dist/nw-vue-1.3.0-win-x86-Setup.exe",
"build:lin:clean": "rimraf ./dist-vue ./dist/nw-vue-1.1.0-linux-x64 ./dist/nw-vue-1.1.0-linux-x64.zip", "build:lin:clean": "rimraf ./dist-vue ./dist/nw-vue-1.3.0-linux-x64 ./dist/nw-vue-1.3.0-linux-x64.zip",
"run:win": "dist\\nw-vue-1.1.0-win-x86\\nw-vue.exe", "run:win": "dist\\nw-vue-1.3.0-win-x86\\nw-vue.exe",
"run:lin": "./dist/nw-vue-1.1.0-linux-x64/nw-vue", "run:lin": "./dist/nw-vue-1.3.0-linux-x64/nw-vue",
"regression": "rd /s /q node_modules & rd /s /q node_modules & rd /s /q node_modules & npm install && npm run lint && npm test && npm run build:win && npm run run:win", "regression": "rd /s /q node_modules & rd /s /q node_modules & rd /s /q node_modules & npm install && npm run lint && npm test && npm run build:win && npm run run:win",
"lint": "vue-cli-service lint --no-fix", "lint": "vue-cli-service lint --no-fix",
"fix": "vue-cli-service lint --fix", "fix": "vue-cli-service lint --fix",
@ -44,11 +44,11 @@
"express": "^4.17.1" "express": "^4.17.1"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.0.5", "@vue/cli-plugin-babel": "^4.1.1",
"@vue/cli-plugin-e2e-nightwatch": "^4.0.5", "@vue/cli-plugin-e2e-nightwatch": "^4.1.1",
"@vue/cli-plugin-eslint": "^4.0.5", "@vue/cli-plugin-eslint": "^4.1.1",
"@vue/cli-plugin-unit-jest": "^4.0.5", "@vue/cli-plugin-unit-jest": "^4.1.1",
"@vue/cli-service": "^4.0.5", "@vue/cli-service": "^4.1.1",
"@vue/test-utils": "1.0.0-beta.29", "@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0", "babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.3", "babel-eslint": "^10.0.3",
@ -58,30 +58,31 @@
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.24.1", "babel-preset-stage-2": "^6.24.1",
"babel-preset-vue-app": "^2.0.0", "babel-preset-vue-app": "^2.0.0",
"concurrently": "^5.0.0", "concurrently": "^5.0.2",
"core-js": "^3.4.0", "core-js": "^3.6.1",
"eslint": "^6.6.0", "eslint": "^6.8.0",
"eslint-config-tjw-base": "^1.0.0", "eslint-config-tjw-base": "^1.0.0",
"eslint-config-tjw-vue": "^1.0.0", "eslint-config-tjw-vue": "^1.0.0",
"eslint-plugin-jest": "^23.0.3", "eslint-plugin-jest": "^23.1.1",
"eslint-plugin-vue": "^6.0.0", "eslint-plugin-vue": "^6.0.2",
"eslint-plugin-vue-a11y": "^0.0.31",
"jest": "^24.9.0", "jest": "^24.9.0",
"jest-environment-jsdom": "^24.9.0", "jest-environment-jsdom": "^24.9.0",
"jest-environment-jsdom-global": "^1.2.0", "jest-environment-jsdom-global": "^1.2.0",
"jest-transform-stub": "^2.0.0", "jest-transform-stub": "^2.0.0",
"nw": "0.42.3-sdk", "nw": "0.43.2-sdk",
"nw-vue-devtools-prebuilt": "^0.0.10", "nw-vue-devtools-prebuilt": "^0.0.10",
"nwjs-builder-phoenix": "^1.15.0", "nwjs-builder-phoenix": "^1.15.0",
"nwjs-types": "^1.0.0", "nwjs-types": "^1.0.0",
"rimraf": "^3.0.0", "rimraf": "^3.0.0",
"vue": "^2.6.10", "vue": "^2.6.11",
"vue-jest": "^3.0.5", "vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.10", "vue-template-compiler": "^2.6.11",
"wait-on": "^3.3.0" "wait-on": "^3.3.0"
}, },
"chromium-args": "--enable-spell-checking --load-extension='./node_modules/nw-vue-devtools-prebuilt/extension'", "chromium-args": "--enable-spell-checking --load-extension='./node_modules/nw-vue-devtools-prebuilt/extension'",
"build": { "build": {
"nwVersion": "v0.42.3", "nwVersion": "v0.43.2",
"nwFlavor": "normal", "nwFlavor": "normal",
"targets": [ "targets": [
"zip", "zip",
@ -103,6 +104,7 @@
".gitignore", ".gitignore",
".editorconfig", ".editorconfig",
"babel.config.js", "babel.config.js",
"CODE_OF_CONDUCT.md",
"cypress.json", "cypress.json",
"jest.config.js", "jest.config.js",
"nightwatch.conf.js", "nightwatch.conf.js",
@ -114,6 +116,7 @@
"vue.config.js" "vue.config.js"
], ],
"strippedProperties": [ "strippedProperties": [
"ManifestComments",
"scripts", "scripts",
"devDependencies", "devDependencies",
"build" "build"
@ -122,7 +125,14 @@
"main": "http://localhost:8965", "main": "http://localhost:8965",
"node-remote": "http://localhost:8965", "node-remote": "http://localhost:8965",
"node-main": "server.js", "node-main": "server.js",
"chromium-args": "--enable-spell-checking" "chromium-args": "--enable-spell-checking",
"window": {
"width": 960,
"height": 600,
"min_width": 700,
"min_height": 500,
"icon": "dist-vue/vue.png"
}
}, },
"win": { "win": {
"icon": "public/icon-256.ico" "icon": "public/icon-256.ico"

View File

@ -23,11 +23,11 @@ exports[`HelloWorld.vue Render default contents 1`] = `
</h1> </h1>
<h3> <h3>
You are using You are using
Vue.js (v2.6.10), Vue.js (v2.6.11),
NW.js (v0.42.3-sdk), NW.js (v0.43.2-sdk),
Node.js (v13.1.0), Node.js (v13.5.0),
and and
Chromium (v78.0.3904.97). Chromium (v79.0.3945.88).
</h3> </h3>
<button> <button>
Show Show

View File

@ -26,10 +26,10 @@ global.beforeEach(() => {
NODE_ENV: 'development' NODE_ENV: 'development'
}, },
versions: { versions: {
chromium: '78.0.3904.97', chromium: '79.0.3945.88',
nw: '0.42.3', nw: '0.43.2',
'nw-flavor': 'sdk', 'nw-flavor': 'sdk',
node: '13.1.0' node: '13.5.0'
} }
}; };
window.nw = { window.nw = {