Showing
4 changed files
with
64 additions
and
7 deletions
| ... | @@ -2,7 +2,9 @@ module.exports = { | ... | @@ -2,7 +2,9 @@ module.exports = { |
| 2 | root: true, | 2 | root: true, |
| 3 | env: { | 3 | env: { |
| 4 | node: true, | 4 | node: true, |
| 5 | - browser: true | 5 | + browser: true, |
| 6 | + commonjs: true, | ||
| 7 | + es6: true | ||
| 6 | }, | 8 | }, |
| 7 | globals: { | 9 | globals: { |
| 8 | $: true, | 10 | $: true, |
| ... | @@ -10,8 +12,12 @@ module.exports = { | ... | @@ -10,8 +12,12 @@ module.exports = { |
| 10 | moment: true, | 12 | moment: true, |
| 11 | _: true | 13 | _: true |
| 12 | }, | 14 | }, |
| 13 | - extends: 'standard', | 15 | + extends: [ |
| 14 | - 'rules': { | 16 | + 'plugin:vue/essential', |
| 17 | + '@vue/standard' | ||
| 18 | + ], | ||
| 19 | + // extends: 'standard', | ||
| 20 | + rules: { | ||
| 15 | // allow paren-less arrow functions | 21 | // allow paren-less arrow functions |
| 16 | 'arrow-parens': 0, | 22 | 'arrow-parens': 0, |
| 17 | // allow async-await | 23 | // allow async-await |
| ... | @@ -23,7 +29,7 @@ module.exports = { | ... | @@ -23,7 +29,7 @@ module.exports = { |
| 23 | // allow semi | 29 | // allow semi |
| 24 | 'semi': 0, | 30 | 'semi': 0, |
| 25 | // allow indent | 31 | // allow indent |
| 26 | - 'indent': ["error", 2], | 32 | + 'indent': ['error', 2], |
| 27 | // 'indent': 0, | 33 | // 'indent': 0, |
| 28 | // allow no-tabs | 34 | // allow no-tabs |
| 29 | 'no-tabs': 0, | 35 | 'no-tabs': 0, |
| ... | @@ -31,7 +37,13 @@ module.exports = { | ... | @@ -31,7 +37,13 @@ module.exports = { |
| 31 | 'camelcase': 0, | 37 | 'camelcase': 0, |
| 32 | 'eqeqeq': 0, | 38 | 'eqeqeq': 0, |
| 33 | 'no-undef': 0, | 39 | 'no-undef': 0, |
| 34 | - 'no-console': ["error", { allow: ["warn", "error"] }] | 40 | + 'no-console': ['error', { allow: ['warn', 'error'] }] |
| 35 | }, | 41 | }, |
| 36 | - parser: 'babel-eslint' | 42 | + parserOptions: { |
| 43 | + parser: 'babel-eslint' | ||
| 44 | + }, | ||
| 45 | + plugins: ['html', 'vue'], | ||
| 46 | + settings: { | ||
| 47 | + 'html/html-extensions': ['.html'] | ||
| 48 | + } | ||
| 37 | }; | 49 | }; | ... | ... |
| ... | @@ -4846,6 +4846,51 @@ | ... | @@ -4846,6 +4846,51 @@ |
| 4846 | } | 4846 | } |
| 4847 | } | 4847 | } |
| 4848 | }, | 4848 | }, |
| 4849 | + "eslint-plugin-html": { | ||
| 4850 | + "version": "5.0.0", | ||
| 4851 | + "resolved": "http://registry.npm.taobao.org/eslint-plugin-html/download/eslint-plugin-html-5.0.0.tgz", | ||
| 4852 | + "integrity": "sha1-OW4wpg3t7gEi/gjxHRPFqyLyDTI=", | ||
| 4853 | + "dev": true, | ||
| 4854 | + "requires": { | ||
| 4855 | + "htmlparser2": "^3.10.0" | ||
| 4856 | + }, | ||
| 4857 | + "dependencies": { | ||
| 4858 | + "domhandler": { | ||
| 4859 | + "version": "2.4.2", | ||
| 4860 | + "resolved": "http://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz", | ||
| 4861 | + "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", | ||
| 4862 | + "dev": true, | ||
| 4863 | + "requires": { | ||
| 4864 | + "domelementtype": "1" | ||
| 4865 | + } | ||
| 4866 | + }, | ||
| 4867 | + "htmlparser2": { | ||
| 4868 | + "version": "3.10.0", | ||
| 4869 | + "resolved": "http://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.0.tgz", | ||
| 4870 | + "integrity": "sha1-X15CLc9hGcDZg+02Jgzp3tC+5GQ=", | ||
| 4871 | + "dev": true, | ||
| 4872 | + "requires": { | ||
| 4873 | + "domelementtype": "^1.3.0", | ||
| 4874 | + "domhandler": "^2.3.0", | ||
| 4875 | + "domutils": "^1.5.1", | ||
| 4876 | + "entities": "^1.1.1", | ||
| 4877 | + "inherits": "^2.0.1", | ||
| 4878 | + "readable-stream": "^3.0.6" | ||
| 4879 | + } | ||
| 4880 | + }, | ||
| 4881 | + "readable-stream": { | ||
| 4882 | + "version": "3.1.1", | ||
| 4883 | + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-3.1.1.tgz", | ||
| 4884 | + "integrity": "sha1-7Wu8bFuliwkAOf8YzmcFFXla6wY=", | ||
| 4885 | + "dev": true, | ||
| 4886 | + "requires": { | ||
| 4887 | + "inherits": "^2.0.3", | ||
| 4888 | + "string_decoder": "^1.1.1", | ||
| 4889 | + "util-deprecate": "^1.0.1" | ||
| 4890 | + } | ||
| 4891 | + } | ||
| 4892 | + } | ||
| 4893 | + }, | ||
| 4849 | "eslint-plugin-import": { | 4894 | "eslint-plugin-import": { |
| 4850 | "version": "2.14.0", | 4895 | "version": "2.14.0", |
| 4851 | "resolved": "http://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.14.0.tgz", | 4896 | "resolved": "http://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.14.0.tgz", | ... | ... |
| ... | @@ -30,6 +30,7 @@ | ... | @@ -30,6 +30,7 @@ |
| 30 | "@vue/eslint-config-standard": "^4.0.0", | 30 | "@vue/eslint-config-standard": "^4.0.0", |
| 31 | "babel-eslint": "^10.0.1", | 31 | "babel-eslint": "^10.0.1", |
| 32 | "eslint": "^5.8.0", | 32 | "eslint": "^5.8.0", |
| 33 | + "eslint-plugin-html": "^5.0.0", | ||
| 33 | "eslint-plugin-vue": "^5.0.0", | 34 | "eslint-plugin-vue": "^5.0.0", |
| 34 | "less": "^3.0.4", | 35 | "less": "^3.0.4", |
| 35 | "less-loader": "^4.1.0", | 36 | "less-loader": "^4.1.0", | ... | ... |
| ... | @@ -4,7 +4,6 @@ | ... | @@ -4,7 +4,6 @@ |
| 4 | <router-link to="/">Home</router-link> | | 4 | <router-link to="/">Home</router-link> | |
| 5 | <router-link to="/about">About</router-link> | 5 | <router-link to="/about">About</router-link> |
| 6 | </div> | 6 | </div> |
| 7 | - <router-view/> | ||
| 8 | </div> | 7 | </div> |
| 9 | </template> | 8 | </template> |
| 10 | 9 | ... | ... |
-
Please register or login to post a comment