Replace with vue/no-setup-props-reactivity-loss
rule (#14062)
This commit is contained in:
parent
a9012d3d0c
commit
4d2eddec2e
@ -56,7 +56,7 @@ module.exports = {
|
||||
'vue/no-dupe-keys': 'warn',
|
||||
'vue/valid-v-for': 'warn',
|
||||
'vue/return-in-computed-property': 'warn',
|
||||
'vue/no-setup-props-destructure': 'warn',
|
||||
'vue/no-setup-props-reactivity-loss': 'warn',
|
||||
'vue/max-attributes-per-line': 'off',
|
||||
'vue/html-self-closing': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
|
@ -114,7 +114,7 @@ const getColor = (i) => {
|
||||
return colorSets[i % colorSets.length];
|
||||
};
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const now = props.nowForChromatic != null ? new Date(props.nowForChromatic) : new Date();
|
||||
let chartInstance: Chart | null = null;
|
||||
let chartData: {
|
||||
|
@ -130,7 +130,7 @@ export default defineComponent({
|
||||
el.style.left = '';
|
||||
}
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const classes = {
|
||||
[$style['date-separated-list']]: true,
|
||||
[$style['date-separated-list-nogap']]: props.noGap,
|
||||
|
@ -126,7 +126,7 @@ function hasFocus() {
|
||||
const playerEl = shallowRef<HTMLDivElement>();
|
||||
const audioEl = shallowRef<HTMLAudioElement>();
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.dataSaver.media) ? true : (props.audio.isSensitive && defaultStore.state.nsfw !== 'ignore'));
|
||||
|
||||
// Menu
|
||||
|
@ -160,7 +160,7 @@ function hasFocus() {
|
||||
return playerEl.value === document.activeElement || playerEl.value.contains(document.activeElement);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.dataSaver.media) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore'));
|
||||
|
||||
// Menu
|
||||
|
@ -172,7 +172,7 @@ const emit = defineEmits<{
|
||||
|
||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const page = ref(props.initialPage ?? 0);
|
||||
|
||||
watch(page, (to) => {
|
||||
|
@ -148,7 +148,7 @@ const emit = defineEmits<{
|
||||
|
||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const page = ref(defaultStore.state.accountSetupWizard);
|
||||
|
||||
watch(page, () => {
|
||||
|
@ -41,12 +41,12 @@ function getDateSafe(n: Date | string | number) {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const _time = props.time == null ? NaN : getDateSafe(props.time).getTime();
|
||||
const invalid = Number.isNaN(_time);
|
||||
const absolute = !invalid ? dateTimeFormat.format(_time) : i18n.ts._ago.invalid;
|
||||
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const now = ref(props.origin?.getTime() ?? Date.now());
|
||||
const ago = computed(() => (now.value - _time) / 1000/*ms*/);
|
||||
|
||||
|
@ -169,7 +169,7 @@ const props = defineProps<{
|
||||
const showBoardLabels = ref<boolean>(false);
|
||||
const useAvatarAsStone = ref<boolean>(true);
|
||||
const autoplaying = ref<boolean>(false);
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||
const game = ref<Misskey.entities.ReversiGameDetailed & { logs: Reversi.Serializer.SerializedLog[] }>(deepClone(props.game));
|
||||
const logPos = ref<number>(game.value.logs.length);
|
||||
const engine = shallowRef<Reversi.Game>(Reversi.Serializer.restoreGame({
|
||||
|
Loading…
Reference in New Issue
Block a user