feat: 修改eslint验证规则

This commit is contained in:
fit2cloud-chenyw 2021-06-24 14:43:52 +08:00
parent 9bd75d6a41
commit a5c7458904
7 changed files with 22 additions and 8 deletions

View File

@ -195,6 +195,9 @@ module.exports = {
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
'array-bracket-spacing': [2, 'never'],
"vue/no-use-v-if-with-v-for": ["error", {
"allowUsingIterationVar": true
}]
}
}

View File

@ -20,14 +20,14 @@
@mouseleave="leave"
>
<div
v-for="(handle, index) in actualHandles"
:key="index"
:class="[classNameHandle, classNameHandle + '-' + handle]"
:style="handleStyle(handle, index)"
@mousedown.stop.prevent="handleDown(handle, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)"
v-for="(handlei, indexi) in actualHandles"
:key="indexi"
:class="[classNameHandle, classNameHandle + '-' + handlei]"
:style="handleStyle(handlei, indexi)"
@mousedown.stop.prevent="handleDown(handlei, $event)"
@touchstart.stop.prevent="handleTouchDown(handlei, $event)"
>
<slot :name="handle" />
<slot :name="handlei" />
</div>
<slot />
</div>
@ -282,14 +282,17 @@ export default {
type: String,
default: 'mouseOn'
},
// eslint-disable-next-line vue/require-default-prop
element: {
require: true,
type: Object
},
// eslint-disable-next-line vue/require-default-prop
defaultStyle: {
require: true,
type: Object
},
// eslint-disable-next-line vue/require-default-prop
index: {
require: true,
type: [Number, String]
@ -299,6 +302,7 @@ export default {
type: Boolean,
default: true
},
// eslint-disable-next-line vue/require-default-prop
changeStyle: {
require: true,
type: Object

View File

@ -17,6 +17,7 @@
</template>
<script>
// eslint-disable-next-line no-unused-vars
import { DEFAULT_PANEL_STYLE } from '@/views/panel/panel'
import { mapState } from 'vuex'
import { deepCopy } from '@/components/canvas/utils/utils'

View File

@ -1,3 +1,5 @@
// eslint-disable-next-line no-unused-vars
import { BASE_CHART, BASE_CHART_STRING } from '@/views/chart/chart/chart'
import { deepCopy } from '@/components/canvas/utils/utils'
@ -48,6 +50,7 @@ export function chartTransStr2Object(targetIn, copy) {
}
export function chartTransObject2Str(targetIn, deepCopy) {
// eslint-disable-next-line no-undef
const target = copy === 'Y' ? deepCopy(targetIn) : targetIn
if (target.chart) {
if (target.chart.xaxis && typeof target.chart.xaxis !== 'string') {

View File

@ -11,6 +11,7 @@
</template>
<script>
// eslint-disable-next-line no-unused-vars
import { get, post } from '@/api/panel/panel'
export default {
name: 'TemplateItem',

View File

@ -52,6 +52,7 @@ import LazyTree from './components/LazyTree'
export default {
name: 'Authority',
// eslint-disable-next-line vue/no-unused-components
components: { LazyTree, DeMainContainer, DeAsideContainer, DeContainer },
props: {
resourceId: {

View File

@ -20,6 +20,7 @@ import AuthQuickConfig from './authQuickConfig'
export default {
name: 'Authority',
// eslint-disable-next-line vue/no-unused-components
components: { DeContainer, DeMainContainer, AuthConfig, AuthQuickConfig },
data() {
return {