Commit 4d234fc358190a0ac20f6cecc7b77abff74b16ba

Authored by liuqimichale
1 parent 00a57799

关闭esl

.eslintrc.js 0 → 100644
  1 +module.exports = {
  2 + root: true,
  3 + parserOptions: {
  4 + parser: 'babel-eslint',
  5 + sourceType: 'module'
  6 + },
  7 + env: {
  8 + browser: true,
  9 + node: true,
  10 + es6: true,
  11 + },
  12 + extends: ['plugin:vue/recommended', 'eslint:recommended'],
  13 +
  14 + // add your custom rules here
  15 + //it is base on https://github.com/vuejs/eslint-config-vue
  16 + rules: {
  17 + "vue/max-attributes-per-line": [2, {
  18 + "singleline": 10,
  19 + "multiline": {
  20 + "max": 1,
  21 + "allowFirstLine": false
  22 + }
  23 + }],
  24 + "vue/name-property-casing": ["error", "PascalCase"],
  25 + 'accessor-pairs': 2,
  26 + 'arrow-spacing': [2, {
  27 + 'before': true,
  28 + 'after': true
  29 + }],
  30 + 'block-spacing': [2, 'always'],
  31 + 'brace-style': [2, '1tbs', {
  32 + 'allowSingleLine': true
  33 + }],
  34 + 'camelcase': [0, {
  35 + 'properties': 'always'
  36 + }],
  37 + 'comma-dangle': [2, 'never'],
  38 + 'comma-spacing': [2, {
  39 + 'before': false,
  40 + 'after': true
  41 + }],
  42 + 'comma-style': [2, 'last'],
  43 + 'constructor-super': 2,
  44 + 'curly': [2, 'multi-line'],
  45 + 'dot-location': [2, 'property'],
  46 + 'eol-last': 2,
  47 + 'eqeqeq': [2, 'allow-null'],
  48 + 'generator-star-spacing': [2, {
  49 + 'before': true,
  50 + 'after': true
  51 + }],
  52 + 'handle-callback-err': [2, '^(err|error)$'],
  53 + 'indent': [2, 2, {
  54 + 'SwitchCase': 1
  55 + }],
  56 + 'jsx-quotes': [2, 'prefer-single'],
  57 + 'key-spacing': [2, {
  58 + 'beforeColon': false,
  59 + 'afterColon': true
  60 + }],
  61 + 'keyword-spacing': [2, {
  62 + 'before': true,
  63 + 'after': true
  64 + }],
  65 + 'new-cap': [2, {
  66 + 'newIsCap': true,
  67 + 'capIsNew': false
  68 + }],
  69 + 'new-parens': 2,
  70 + 'no-array-constructor': 2,
  71 + 'no-caller': 2,
  72 + 'no-console': 'off',
  73 + 'no-class-assign': 2,
  74 + 'no-cond-assign': 2,
  75 + 'no-const-assign': 2,
  76 + 'no-control-regex': 0,
  77 + 'no-delete-var': 2,
  78 + 'no-dupe-args': 2,
  79 + 'no-dupe-class-members': 2,
  80 + 'no-dupe-keys': 2,
  81 + 'no-duplicate-case': 2,
  82 + 'no-empty-character-class': 2,
  83 + 'no-empty-pattern': 2,
  84 + 'no-eval': 2,
  85 + 'no-ex-assign': 2,
  86 + 'no-extend-native': 2,
  87 + 'no-extra-bind': 2,
  88 + 'no-extra-boolean-cast': 2,
  89 + 'no-extra-parens': [2, 'functions'],
  90 + 'no-fallthrough': 2,
  91 + 'no-floating-decimal': 2,
  92 + 'no-func-assign': 2,
  93 + 'no-implied-eval': 2,
  94 + 'no-inner-declarations': [2, 'functions'],
  95 + 'no-invalid-regexp': 2,
  96 + 'no-irregular-whitespace': 2,
  97 + 'no-iterator': 2,
  98 + 'no-label-var': 2,
  99 + 'no-labels': [2, {
  100 + 'allowLoop': false,
  101 + 'allowSwitch': false
  102 + }],
  103 + 'no-lone-blocks': 2,
  104 + 'no-mixed-spaces-and-tabs': 2,
  105 + 'no-multi-spaces': 2,
  106 + 'no-multi-str': 2,
  107 + 'no-multiple-empty-lines': [2, {
  108 + 'max': 1
  109 + }],
  110 + 'no-native-reassign': 2,
  111 + 'no-negated-in-lhs': 2,
  112 + 'no-new-object': 2,
  113 + 'no-new-require': 2,
  114 + 'no-new-symbol': 2,
  115 + 'no-new-wrappers': 2,
  116 + 'no-obj-calls': 2,
  117 + 'no-octal': 2,
  118 + 'no-octal-escape': 2,
  119 + 'no-path-concat': 2,
  120 + 'no-proto': 2,
  121 + 'no-redeclare': 2,
  122 + 'no-regex-spaces': 2,
  123 + 'no-return-assign': [2, 'except-parens'],
  124 + 'no-self-assign': 2,
  125 + 'no-self-compare': 2,
  126 + 'no-sequences': 2,
  127 + 'no-shadow-restricted-names': 2,
  128 + 'no-spaced-func': 2,
  129 + 'no-sparse-arrays': 2,
  130 + 'no-this-before-super': 2,
  131 + 'no-throw-literal': 2,
  132 + 'no-trailing-spaces': 2,
  133 + 'no-undef': 2,
  134 + 'no-undef-init': 2,
  135 + 'no-unexpected-multiline': 2,
  136 + 'no-unmodified-loop-condition': 2,
  137 + 'no-unneeded-ternary': [2, {
  138 + 'defaultAssignment': false
  139 + }],
  140 + 'no-unreachable': 2,
  141 + 'no-unsafe-finally': 2,
  142 + 'no-unused-vars': [2, {
  143 + 'vars': 'all',
  144 + 'args': 'none'
  145 + }],
  146 + 'no-useless-call': 2,
  147 + 'no-useless-computed-key': 2,
  148 + 'no-useless-constructor': 2,
  149 + 'no-useless-escape': 0,
  150 + 'no-whitespace-before-property': 2,
  151 + 'no-with': 2,
  152 + 'one-var': [2, {
  153 + 'initialized': 'never'
  154 + }],
  155 + 'operator-linebreak': [2, 'after', {
  156 + 'overrides': {
  157 + '?': 'before',
  158 + ':': 'before'
  159 + }
  160 + }],
  161 + 'padded-blocks': [2, 'never'],
  162 + 'quotes': [2, 'single', {
  163 + 'avoidEscape': true,
  164 + 'allowTemplateLiterals': true
  165 + }],
  166 + 'semi': [2, 'never'],
  167 + 'semi-spacing': [2, {
  168 + 'before': false,
  169 + 'after': true
  170 + }],
  171 + 'space-before-blocks': [2, 'always'],
  172 + 'space-before-function-paren': [2, 'never'],
  173 + 'space-in-parens': [2, 'never'],
  174 + 'space-infix-ops': 2,
  175 + 'space-unary-ops': [2, {
  176 + 'words': true,
  177 + 'nonwords': false
  178 + }],
  179 + 'spaced-comment': [2, 'always', {
  180 + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
  181 + }],
  182 + 'template-curly-spacing': [2, 'never'],
  183 + 'use-isnan': 2,
  184 + 'valid-typeof': 2,
  185 + 'wrap-iife': [2, 'any'],
  186 + 'yield-star-spacing': [2, 'both'],
  187 + 'yoda': [2, 'never'],
  188 + 'prefer-const': 2,
  189 + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  190 + 'object-curly-spacing': [2, 'always', {
  191 + objectsInObjects: false
  192 + }],
  193 + 'array-bracket-spacing': [2, 'never']
  194 + }
  195 +}
... ...
.idea/vcs.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project version="4">
  3 + <component name="VcsDirectoryMappings">
  4 + <mapping directory="$PROJECT_DIR$" vcs="Git" />
  5 + </component>
  6 +</project>
0 7 \ No newline at end of file
... ...
build/webpack.base.conf.js
... ... @@ -40,7 +40,7 @@ module.exports = {
40 40 },
41 41 module: {
42 42 rules: [
43   - ...(config.dev.useEslint ? [createLintingRule()] : []),
  43 + ...(config.dev.useEslint ? [] : []),
44 44 {
45 45 test: /\.vue$/,
46 46 loader: 'vue-loader',
... ...
index.html
... ... @@ -5,7 +5,7 @@
5 5 <meta name="viewport" content="width=device-width,initial-scale=1.0">
6 6 <title>兰州沙盘</title>
7 7 <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
8   - <link rel="stylesheet" href="src/style/reset.css">
  8 + <link rel="stylesheet" href="src/style/reset.css" type="text/css">
9 9 </head>
10 10 <body>
11 11 <div id="app"></div>
... ...
src/App.vue
1 1 <template>
2 2 <div id="app">
3 3 <img src="./assets/logo.png">
4   - <HelloWorld/>
  4 + <v-home/>
5 5 </div>
6 6 </template>
7 7  
8 8 <script>
9   -import HelloWorld from './components/HelloWorld'
  9 +import VHome from './view/VHome'
10 10  
11 11 export default {
12 12 name: 'App',
13 13 components: {
14   - HelloWorld
  14 + VHome
15 15 }
16 16 }
17 17 </script>
... ...
src/main.js
... ... @@ -3,8 +3,6 @@
3 3 import Vue from 'vue'
4 4 import App from './App'
5 5  
6   -import './style/reset.css'
7   -
8 6 Vue.config.productionTip = false
9 7  
10 8 /* eslint-disable no-new */
... ...
src/style/reset.css
... ... @@ -2,6 +2,9 @@ html {
2 2 overflow: hidden;
3 3 background: #f00;
4 4 }
  5 +#app{
  6 + background: #ff0000;
  7 +}
5 8 body,
6 9 dl,
7 10 dt,
... ...
src/view/VHome.vue 0 → 100644
  1 +<template>
  2 + <div>shouye</div>
  3 +</template>
  4 +
  5 +<script>
  6 +export default {
  7 + name: 'VHome'
  8 +}
  9 +</script>
  10 +
  11 +<style scoped>
  12 +
  13 +</style>
... ...