File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/eslint-plugin-svelte/src/rules Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { TSESTree } from '@typescript-eslint/types';
4
4
import type ts from 'typescript' ;
5
5
import { findVariable } from '../utils/ast-utils.js' ;
6
6
import { toRegExp } from '../utils/regexp.js' ;
7
+ import { normalize } from 'path' ;
7
8
8
9
type PropertyPathArray = string [ ] ;
9
10
type DeclaredPropertyNames = Set < { originalName : string ; aliasName : string } > ;
@@ -122,7 +123,7 @@ export default createRule('no-unused-props', {
122
123
const declarations = symbol . getDeclarations ( ) ;
123
124
if ( ! declarations || declarations . length === 0 ) return false ;
124
125
125
- return declarations . every ( ( decl ) => decl . getSourceFile ( ) . fileName === fileName ) ;
126
+ return declarations . every ( ( decl ) => normalize ( decl . getSourceFile ( ) . fileName ) === fileName ) ;
126
127
}
127
128
128
129
/**
You can’t perform that action at this time.
0 commit comments