Skip to content

Commit 44ccb1d

Browse files
committed
chore: fix prettier check, run fmt
1 parent 0729dad commit 44ccb1d

4 files changed

Lines changed: 20 additions & 21 deletions

File tree

‎.github/workflows/pipeline.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Pipeline
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
check:
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: macos-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
18-
with:
19-
node-version: 16.x
20-
- run: npm install
21-
- run: npm run lint
22-
- run: npm run build
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: 16.x
20+
- run: npm install
21+
- run: npm run lint -- --exitOnError
22+
- run: npm run build

‎.prettierrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"printWidth": 120,
33
"singleQuote": false
4-
}
4+
}

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,15 @@
9999
"@typescript-eslint/parser": "^5.0.0",
100100
"eslint": "^7.32.0",
101101
"eslint-config-prettier": "^8.3.0",
102+
"prettier": "^2.5.1",
102103
"react-devtools": "~4.13.0",
103104
"typescript": "^4.4.3"
104105
},
105106
"scripts": {
106107
"build": "ray build -e dist",
107108
"dev": "ray develop",
108109
"lint": "ray lint",
109-
"fmt": "prettier -w ./",
110+
"fmt": "prettier --config .prettierrc -w ./",
110111
"raycast-publish": ".scripts/raycast-publish.sh"
111112
}
112113
}

‎src/sourcegraph/stream-search/index.ts‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,15 @@ export async function performSearch(
8181
};
8282

8383
handlers.onResults(
84-
event.data.map(
85-
(match): SearchResult => {
86-
const url = `${src.instance}${getMatchUrl(match)}`;
87-
if (match.type === "commit") {
88-
// Commit stuff comes already markdown-formatted?? so strip formatting
89-
match.label = stripMarkdown.processSync(match.label)?.value.toString().split(`› `).pop() || "";
90-
match.detail = stripMarkdown.processSync(match.detail)?.value.toString();
91-
}
92-
return { url, match };
84+
event.data.map((match): SearchResult => {
85+
const url = `${src.instance}${getMatchUrl(match)}`;
86+
if (match.type === "commit") {
87+
// Commit stuff comes already markdown-formatted?? so strip formatting
88+
match.label = stripMarkdown.processSync(match.label)?.value.toString().split(`› `).pop() || "";
89+
match.detail = stripMarkdown.processSync(match.detail)?.value.toString();
9390
}
94-
)
91+
return { url, match };
92+
})
9593
);
9694
});
9795

0 commit comments

Comments
 (0)