Skip to content

Commit f82e4e6

Browse files
committed
style: fix linter issues
1 parent 6936e17 commit f82e4e6

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"singleQuote": true,
44
"arrowParens": "always",
55
"printWidth": 80,
6-
"endOfLine": "lf"
6+
"endOfLine": "lf",
7+
"trailingComma": "none"
78
}

src/mixins/Query.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ export default function Query(
116116

117117
if (entity && entity !== this.entity && this.model.hasPivotFields()) {
118118
const fields = this.model.pivotFields().reduce((fields, field) => {
119-
Object.keys(field).filter((entity) => loadables.includes(entity)).forEach((entity) => {
120-
fields.push(field[entity].pivot.entity)
121-
})
119+
Object.keys(field)
120+
.filter((entity) => loadables.includes(entity))
121+
.forEach((entity) => {
122+
fields.push(field[entity].pivot.entity)
123+
})
122124
return fields
123125
}, [] as string[])
124126

test/feature/relations/MorphedByMany.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('Feature - Relations - Morphed By Many', () => {
7979
await Video.softDelete(1)
8080

8181
const tag = Tag.query()
82-
.with(['posts','videos'])
82+
.with(['posts', 'videos'])
8383
.find(1) as Tag
8484

8585
expect(tag.posts.length).toBe(1)
@@ -95,7 +95,7 @@ describe('Feature - Relations - Morphed By Many', () => {
9595

9696
const tag = Tag.query()
9797
.withTrashed()
98-
.with(['posts','videos'])
98+
.with(['posts', 'videos'])
9999
.find(1) as Tag
100100

101101
expect(tag.posts.length).toBe(2)
@@ -112,7 +112,7 @@ describe('Feature - Relations - Morphed By Many', () => {
112112

113113
const tag = Tag.query()
114114
.onlyTrashed()
115-
.with(['posts','videos'])
115+
.with(['posts', 'videos'])
116116
.find(1) as Tag
117117

118118
expect(tag.posts.length).toBe(1)

0 commit comments

Comments
 (0)