Skip to content

no-navigation-without-resolve should accept bare string-typed variables as external URLs #1416

@edwloef

Description

@edwloef

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

9.39.1

What version of eslint-plugin-svelte are you using?

3.13.0

What did you do?

Configuration
import prettier from "eslint-config-prettier";
import { includeIgnoreFile } from "@eslint/compat";
import js from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import { fileURLToPath } from "node:url";
import ts from "typescript-eslint";
import svelteConfig from "./svelte.config.js";

const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));

export default ts.config(
	includeIgnoreFile(gitignorePath),
	js.configs.recommended,
	...ts.configs.recommended,
	...svelte.configs.recommended,
	prettier,
	...svelte.configs.prettier,
	{
		languageOptions: {
			globals: { ...globals.browser, ...globals.node },
		},
		rules: {
			"no-undef": "off",
		},
	},
	{
		files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
		languageOptions: {
			parserOptions: {
				projectService: true,
				extraFileExtensions: [".svelte"],
				parser: ts.parser,
				svelteConfig,
			},
		},
		rules: {
			"svelte/prefer-const": "error",
		},
	},
	{
		rules: {
			"array-callback-return": "error",
			camelcase: "error",
			curly: "error",
			eqeqeq: ["error", "always", { null: "ignore" }],
			"no-console": "error",
			"no-duplicate-imports": "error",
			"no-nested-ternary": "error",
			"no-unneeded-ternary": "error",
			"no-var": "error",
			"object-shorthand": "error",
		},
	},
);

Image

What did you expect to happen?

no warning

What actually happened?

Unexpected href link without resolve().

Link to GitHub Repo with Minimal Reproducible Example

not currently public :(

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions