mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 05:07:52 +00:00
* cherry-pick(#6910): chore: add vue3 to eslint, fix errors, and modify lint script * refactor: lint:fix --------- Co-authored-by: John Hill <john.c.hill@nasa.gov>
This commit is contained in:
parent
f5433c0d3b
commit
5b7b722ae8
@ -13,7 +13,7 @@ module.exports = {
|
|||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:compat/recommended',
|
'plugin:compat/recommended',
|
||||||
'plugin:vue/recommended',
|
'plugin:vue/vue3-recommended',
|
||||||
'plugin:you-dont-need-lodash-underscore/compatible',
|
'plugin:you-dont-need-lodash-underscore/compatible',
|
||||||
'plugin:prettier/recommended'
|
'plugin:prettier/recommended'
|
||||||
],
|
],
|
||||||
@ -28,6 +28,8 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
'vue/no-deprecated-dollar-listeners-api': 'warn',
|
||||||
|
'vue/no-deprecated-events-api': 'warn',
|
||||||
'vue/no-v-for-template-key': 'off',
|
'vue/no-v-for-template-key': 'off',
|
||||||
'vue/no-v-for-template-key-on-child': 'error',
|
'vue/no-v-for-template-key-on-child': 'error',
|
||||||
'prettier/prettier': 'error',
|
'prettier/prettier': 'error',
|
||||||
|
@ -81,7 +81,8 @@
|
|||||||
"clean-test-lint": "npm run clean; npm install; npm run test; npm run lint",
|
"clean-test-lint": "npm run clean; npm install; npm run test; npm run lint",
|
||||||
"start": "npx webpack serve --config ./.webpack/webpack.dev.js",
|
"start": "npx webpack serve --config ./.webpack/webpack.dev.js",
|
||||||
"start:coverage": "npx webpack serve --config ./.webpack/webpack.coverage.js",
|
"start:coverage": "npx webpack serve --config ./.webpack/webpack.coverage.js",
|
||||||
"lint": "eslint example src e2e --ext .js,.vue openmct.js --max-warnings=0",
|
"lint": "eslint example src e2e --ext .js openmct.js --max-warnings=0 && eslint example src --ext .vue",
|
||||||
|
"lint:spelling": "cspell \"**/*.{js,md,vue}\" --show-context --gitignore",
|
||||||
"lint:fix": "eslint example src e2e --ext .js,.vue openmct.js --fix",
|
"lint:fix": "eslint example src e2e --ext .js,.vue openmct.js --fix",
|
||||||
"build:prod": "webpack --config ./.webpack/webpack.prod.js",
|
"build:prod": "webpack --config ./.webpack/webpack.prod.js",
|
||||||
"build:dev": "webpack --config ./.webpack/webpack.dev.js",
|
"build:dev": "webpack --config ./.webpack/webpack.dev.js",
|
||||||
|
@ -92,7 +92,7 @@ export default {
|
|||||||
this.openmct.time.on(TIME_CONTEXT_EVENTS.timeSystemChanged, this.setViewFromTimeSystem);
|
this.openmct.time.on(TIME_CONTEXT_EVENTS.timeSystemChanged, this.setViewFromTimeSystem);
|
||||||
this.resizeTimer = setInterval(this.resize, RESIZE_POLL_INTERVAL);
|
this.resizeTimer = setInterval(this.resize, RESIZE_POLL_INTERVAL);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
clearInterval(this.resizeTimer);
|
clearInterval(this.resizeTimer);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function () {
|
data() {
|
||||||
const activeClock = this.getActiveClock();
|
const activeClock = this.getActiveClock();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -66,11 +66,11 @@ export default {
|
|||||||
clocks: []
|
clocks: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted() {
|
||||||
this.loadClocks(this.configuration.menuOptions);
|
this.loadClocks(this.configuration.menuOptions);
|
||||||
this.openmct.time.on(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock);
|
this.openmct.time.on(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock);
|
||||||
},
|
},
|
||||||
destroyed: function () {
|
unmounted() {
|
||||||
this.openmct.time.off(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock);
|
this.openmct.time.off(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -102,7 +102,7 @@ export default {
|
|||||||
this.openmct.time.on(TIME_CONTEXT_EVENTS.timeSystemChanged, this.updateTimeSystem);
|
this.openmct.time.on(TIME_CONTEXT_EVENTS.timeSystemChanged, this.updateTimeSystem);
|
||||||
this.openmct.time.on(TIME_CONTEXT_EVENTS.modeChanged, this.updateMode);
|
this.openmct.time.on(TIME_CONTEXT_EVENTS.modeChanged, this.updateMode);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.openmct.time.off(TIME_CONTEXT_EVENTS.boundsChanged, this.addTimespan);
|
this.openmct.time.off(TIME_CONTEXT_EVENTS.boundsChanged, this.addTimespan);
|
||||||
this.openmct.time.off(TIME_CONTEXT_EVENTS.clockOffsetsChanged, this.addTimespan);
|
this.openmct.time.off(TIME_CONTEXT_EVENTS.clockOffsetsChanged, this.addTimespan);
|
||||||
this.openmct.time.off(TIME_CONTEXT_EVENTS.timeSystemChanged, this.updateTimeSystem);
|
this.openmct.time.off(TIME_CONTEXT_EVENTS.timeSystemChanged, this.updateTimeSystem);
|
||||||
|
@ -184,7 +184,7 @@ export default {
|
|||||||
this.$emit('popupLoaded');
|
this.$emit('popupLoaded');
|
||||||
this.setTimeContext();
|
this.setTimeContext();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.stopFollowingTimeContext();
|
this.stopFollowingTimeContext();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -75,7 +75,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.openmct.time.off(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock);
|
this.openmct.time.off(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock);
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
@ -36,7 +36,7 @@ export default {
|
|||||||
this.timeConductorOptionsHolder = this.$el;
|
this.timeConductorOptionsHolder = this.$el;
|
||||||
this.timeConductorOptionsHolder.addEventListener('click', this.showPopup);
|
this.timeConductorOptionsHolder.addEventListener('click', this.showPopup);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearPopup();
|
this.clearPopup();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -157,7 +157,7 @@ export default {
|
|||||||
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
||||||
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.getTimeSystem())));
|
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.getTimeSystem())));
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearAllValidation();
|
this.clearAllValidation();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -173,7 +173,7 @@ export default {
|
|||||||
this.setOffsets();
|
this.setOffsets();
|
||||||
document.addEventListener('click', this.hide);
|
document.addEventListener('click', this.hide);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
document.removeEventListener('click', this.hide);
|
document.removeEventListener('click', this.hide);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user