We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.24.0
eslint-plugin-svelte
3.5.1
import prettier from 'eslint-config-prettier'; import js from '@eslint/js'; import { includeIgnoreFile } from '@eslint/compat'; import svelte from 'eslint-plugin-svelte'; import globals from 'globals'; import { fileURLToPath } from 'node:url'; import ts from 'typescript-eslint'; const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); import svelteConfig from './svelte.config.js'; import { parser as tsEslintParser } from 'typescript-eslint'; export default ts.config( includeIgnoreFile(gitignorePath), js.configs.recommended, ...ts.configs.recommended, ...svelte.configs['flat/recommended'], prettier, ...svelte.configs['flat/prettier'], { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, { files: ['**/*.ts', '**/*.svelte'], languageOptions: { parserOptions: { extraFileExtensions: ['.svelte'], parser: tsEslintParser, svelteConfig } }, rules: { ...ts.configs.recommended.rules, ...ts.configs.recommendedTypeChecked[0].rules, '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/explicit-module-boundary-types': 'error' } } );
<script lang="ts"> import '../../styles/index.css'; import AddComment from '$lib/components/AddComment.svelte'; import Comments from '$lib/components/Comments.svelte'; import type { PageProps } from '../[slug]/$types'; import { showAddComment } from '$lib/stores/commentState'; let { data }: PageProps = $props(); const x: number = 'not a number'; const organiseComments = (comments) => { const commentMap = new Map(); const y: number = 'not a number'; comments.forEach((comment) => { comment.replies = []; commentMap.set(comment.id, comment); }); const topLevelComments = []; comments.forEach((comment) => { if (comment.parentId) { const parent = commentMap.get(comment.parentId); if (parent) { parent.replies.push(comment); } } else { topLevelComments.push(comment); } }); return topLevelComments; }; </script>
Eslint should add errors for 'Parameter 'comments' implicitly has an 'any' type.' (and similar issues).
It does not error on such issues.
It will error on const x: number = 'not a number';
const x: number = 'not a number';
https://github.com/jamesthemullet/readingweather
Possibly an issue with my set-up? Have tried a few different examples from other issues posted.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
9.24.0
What version of
eslint-plugin-svelte
are you using?3.5.1
What did you do?
Configuration
What did you expect to happen?
Eslint should add errors for 'Parameter 'comments' implicitly has an 'any' type.' (and similar issues).
What actually happened?
It does not error on such issues.
It will error on
const x: number = 'not a number';
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/jamesthemullet/readingweather
Additional comments
Possibly an issue with my set-up? Have tried a few different examples from other issues posted.
The text was updated successfully, but these errors were encountered: