File tree 3 files changed +13
-3
lines changed
tests/fixtures/rules/sort-attributes
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ import fs from "fs"
6
6
import path from "path"
7
7
import { createCache } from "./cache"
8
8
9
- type PackageJson = Record < string , any > & { filePath : string }
9
+ type PackageJson = {
10
+ name ?: unknown
11
+ dependencies ?: { [ key in string ] ?: unknown }
12
+ devDependencies ?: { [ key in string ] ?: unknown }
13
+ filePath : string
14
+ }
10
15
11
16
const isRunOnBrowser = ! fs . readFileSync
12
17
const cache = createCache < PackageJson | null > ( )
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ function hasSvelteKit(filePath: string): boolean {
50
50
// So always it returns true if it runs on the package.
51
51
return true
52
52
return Boolean (
53
- packageJson . dependencies [ "@sveltejs/kit" ] ??
54
- packageJson . devDependencies [ "@sveltejs/kit" ] ,
53
+ packageJson . dependencies ?. [ "@sveltejs/kit" ] ??
54
+ packageJson . devDependencies ?. [ "@sveltejs/kit" ] ,
55
55
)
56
56
} catch ( _e ) {
57
57
return false
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ rules : {
3
+ "no-use-before-define" : "off" ,
4
+ } ,
5
+ }
You can’t perform that action at this time.
0 commit comments