From 6b0a03cfb4d3b226bb8cbadcb5112dd5218de4ad Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sun, 7 May 2023 08:14:17 +0900 Subject: [PATCH] Fixed rules incompatible with ESLint v8.40. --- .eslintrc.js | 6 +++++- lib/utils/index.js | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6792d0296..8c4c791b0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -133,7 +133,11 @@ module.exports = { 'unicorn/prefer-module': 'off', 'unicorn/prevent-abbreviations': 'off', - 'require-eslint-community': ['error'] + 'require-eslint-community': ['error'], + + // FIXME: The version we are currently using is not compatible. + // May be removed in #2146. https://github.com/vuejs/eslint-plugin-vue/pull/2146 + 'unicorn/expiring-todo-comments': 'off' }, overrides: [ { diff --git a/lib/utils/index.js b/lib/utils/index.js index 249097418..1698b23ba 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -248,6 +248,10 @@ function wrapContextToOverrideTokenMethods(context, tokenStore, options) { getSourceCode() { return sourceCode }, + // @ts-expect-error -- Added in ESLint v8.40 + get sourceCode() { + return sourceCode + }, getDeclaredVariables })