RuoYi před 11 měsíci
rodič
revize
a0ce1cf33b

+ 0 - 10
ruoyi-ui/.eslintignore

@@ -1,10 +0,0 @@
1
-# 忽略build目录下类型为js的文件的语法检查
2
-build/*.js
3
-# 忽略src/assets目录下文件的语法检查
4
-src/assets
5
-# 忽略public目录下文件的语法检查
6
-public
7
-# 忽略当前目录下为js的文件的语法检查
8
-*.js
9
-# 忽略当前目录下为vue的文件的语法检查
10
-*.vue

+ 0 - 199
ruoyi-ui/.eslintrc.js

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

+ 1 - 18
ruoyi-ui/package.json

@@ -8,19 +8,7 @@
8 8
     "dev": "vue-cli-service serve",
9 9
     "build:prod": "vue-cli-service build",
10 10
     "build:stage": "vue-cli-service build --mode staging",
11
-    "preview": "node build/index.js --preview",
12
-    "lint": "eslint --ext .js,.vue src"
13
-  },
14
-  "husky": {
15
-    "hooks": {
16
-      "pre-commit": "lint-staged"
17
-    }
18
-  },
19
-  "lint-staged": {
20
-    "src/**/*.{js,vue}": [
21
-      "eslint --fix",
22
-      "git add"
23
-    ]
11
+    "preview": "node build/index.js --preview"
24 12
   },
25 13
   "keywords": [
26 14
     "vue",
@@ -63,16 +51,11 @@
63 51
   },
64 52
   "devDependencies": {
65 53
     "@vue/cli-plugin-babel": "4.4.6",
66
-    "@vue/cli-plugin-eslint": "4.4.6",
67 54
     "@vue/cli-service": "4.4.6",
68
-    "babel-eslint": "10.1.0",
69 55
     "babel-plugin-dynamic-import-node": "2.3.3",
70 56
     "chalk": "4.1.0",
71 57
     "compression-webpack-plugin": "6.1.2",
72 58
     "connect": "3.6.6",
73
-    "eslint": "7.15.0",
74
-    "eslint-plugin-vue": "7.2.0",
75
-    "lint-staged": "10.5.3",
76 59
     "sass": "1.32.13",
77 60
     "sass-loader": "10.1.1",
78 61
     "script-ext-html-webpack-plugin": "2.1.5",

+ 0 - 1
ruoyi-ui/src/components/PanThumb/index.vue

@@ -5,7 +5,6 @@
5 5
         <slot />
6 6
       </div>
7 7
     </div>
8
-    <!-- eslint-disable-next-line -->
9 8
     <div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div>
10 9
   </div>
11 10
 </template>

+ 1 - 1
ruoyi-ui/src/directive/index.js

@@ -17,7 +17,7 @@ const install = function(Vue) {
17 17
 if (window.Vue) {
18 18
   window['hasRole'] = hasRole
19 19
   window['hasPermi'] = hasPermi
20
-  Vue.use(install) // eslint-disable-line
20
+  Vue.use(install)
21 21
 }
22 22
 
23 23
 export default install

+ 0 - 1
ruoyi-ui/src/utils/generator/html.js

@@ -1,4 +1,3 @@
1
-/* eslint-disable max-len */
2 1
 import { trigger } from './config'
3 2
 
4 3
 let confGlobal

+ 0 - 1
ruoyi-ui/src/views/tool/build/TreeNodeDialog.vue

@@ -115,7 +115,6 @@ export default {
115 115
   },
116 116
   computed: {},
117 117
   watch: {
118
-    // eslint-disable-next-line func-names
119 118
     'formData.value': function (val) {
120 119
       this.dataType = isNumberStr(val) ? 'number' : 'string'
121 120
     }

+ 0 - 1
ruoyi-ui/src/views/tool/build/index.vue

@@ -190,7 +190,6 @@ export default {
190 190
     }
191 191
   },
192 192
   watch: {
193
-    // eslint-disable-next-line func-names
194 193
     'activeData.label': function (val, oldVal) {
195 194
       if (
196 195
         this.activeData.placeholder === undefined

+ 0 - 2
ruoyi-ui/vue.config.js

@@ -23,8 +23,6 @@ module.exports = {
23 23
   outputDir: 'dist',
24 24
   // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
25 25
   assetsDir: 'static',
26
-  // 是否开启eslint保存检测,有效值:ture | false | 'error'
27
-  lintOnSave: process.env.NODE_ENV === 'development',
28 26
   // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
29 27
   productionSourceMap: false,
30 28
   transpileDependencies: ['quill'],