diff --git a/scripts/eslint_rules/tests/prefer-url-string.test.js b/scripts/eslint_rules/tests/prefer-url-string.test.js index ba987102506..7b04070d09e 100644 --- a/scripts/eslint_rules/tests/prefer-url-string.test.js +++ b/scripts/eslint_rules/tests/prefer-url-string.test.js @@ -4,9 +4,13 @@ 'use strict'; const rule = require('../lib/prefer-url-string.js'); +const tsParser = require('@typescript-eslint/parser'); const ruleTester = new (require('eslint').RuleTester)({ - parserOptions: {ecmaVersion: 9, sourceType: 'module'}, - parser: require.resolve('@typescript-eslint/parser'), + languageOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + parser: tsParser, + }, }); ruleTester.run('prefer-url-string', rule, { diff --git a/scripts/stylelint_rules/tests/use_theme_colors_test.js b/scripts/stylelint_rules/tests/use_theme_colors_test.js index ec4ec814a19..fb7a3d65774 100644 --- a/scripts/stylelint_rules/tests/use_theme_colors_test.js +++ b/scripts/stylelint_rules/tests/use_theme_colors_test.js @@ -44,6 +44,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -60,6 +61,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -78,6 +80,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -96,6 +99,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -112,6 +116,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -130,6 +135,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -212,6 +218,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -230,6 +237,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); }); @@ -286,6 +294,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: 'All CSS color declarations should use a variable defined in ui/legacy/themeColors.css', + url: undefined, }, { line: 2, @@ -295,6 +304,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: 'All CSS color declarations should use a variable defined in ui/legacy/themeColors.css', + url: undefined, }, ]); }); @@ -333,6 +343,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: 'All CSS color declarations should use a variable defined in ui/legacy/themeColors.css', + url: undefined, }, ]); }); @@ -417,6 +428,7 @@ describe('use_theme_colors', () => { rule: 'plugin/use_theme_colors', severity: 'error', text: EXPECTED_ERROR_MESSAGE, + url: undefined, }, ]); });