From 2d4c49c961c83f05f593fcdbb1d1afe8d79a5443 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Sat, 3 Jul 2021 00:04:18 +0900 Subject: [PATCH] Update `vue/no-async-in-computed-properties` rule to support ` + `, + parser, + parserOptions, + errors: [ + { + message: + 'Unexpected async function declaration in computed function.', + line: 4 + }, + { + message: 'Unexpected await operator in computed function.', + line: 5 + }, + { + message: + 'Unexpected async function declaration in computed function.', + line: 7 + }, + { + message: 'Unexpected await operator in computed function.', + line: 7 + }, + { + message: + 'Unexpected async function declaration in computed function.', + line: 8 + }, + { + message: 'Unexpected await operator in computed function.', + line: 9 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + parser, + parserOptions, + errors: [ + { + message: + 'Unexpected async function declaration in computed function.', + line: 4 + }, + { + message: 'Unexpected Promise object in computed function.', + line: 5 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + parser, + parserOptions, + errors: [ + { + message: 'Unexpected asynchronous action in computed function.', + line: 5 + }, + { + message: 'Unexpected asynchronous action in computed function.', + line: 8 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + parser, + parserOptions, + errors: [ + { + message: 'Unexpected asynchronous action in computed function.', + line: 6 + }, + { + message: 'Unexpected asynchronous action in computed function.', + line: 11 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + parser, + parserOptions, + errors: [ + { + message: 'Unexpected timed function in computed function.', + line: 5 + }, + { + message: 'Unexpected timed function in computed function.', + line: 6 + }, + { + message: 'Unexpected timed function in computed function.', + line: 7 + }, + { + message: 'Unexpected timed function in computed function.', + line: 8 + }, + { + message: 'Unexpected timed function in computed function.', + line: 9 + }, + { + message: 'Unexpected timed function in computed function.', + line: 10 + }, + { + message: 'Unexpected timed function in computed function.', + line: 11 + }, + { + message: 'Unexpected timed function in computed function.', + line: 12 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + parser, + parserOptions, + errors: [ + { + message: + 'Unexpected async function declaration in computed function.', + line: 4 + } + ] } ] })