Skip to content

Commit 660813d

Browse files
committed
Update GH actions for deployment and linting
Squashed commit of the following: commit c27bd83 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 16:23:28 2023 +0200 Revert "Add linting error for testing" This reverts commit 8fff727. commit 8fff727 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 16:20:57 2023 +0200 Add linting error for testing commit e9acea5 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 16:19:18 2023 +0200 Disable auto fixing linting errors in GH action commit f285662 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 16:17:51 2023 +0200 Update eslint settings commit 2065f88 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 16:09:31 2023 +0200 Add linting workflow commit 31ed805 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 15:58:32 2023 +0200 Update versions of other workflow actions commit bfdffa2 Author: Scriptim <me@scriptim.dev> Date: Sat May 27 15:54:56 2023 +0200 Update GH Pages Deploy action to v4
1 parent 026e5f3 commit 660813d

File tree

6 files changed

+26
-5
lines changed

6 files changed

+26
-5
lines changed

.eslintrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module.exports = {
2020
comments: 120,
2121
}],
2222
'import/extensions': ['error', 'never'],
23+
'semi': ['error', 'always'],
24+
'quotes': ['error', 'single'],
2325
},
2426
overrides: [
2527
{

.github/workflows/lint.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: lint
2+
run-name: Lint Code
3+
on: [push, pull_request]
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
- name: Setup Node.js
11+
uses: actions/setup-node@v3
12+
with:
13+
node-version: 18
14+
- name: Install dependencies
15+
run: npm ci
16+
- name: Lint
17+
run: npm run lint -- --no-fix

.github/workflows/vuedeploy.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
- name: Setup Node.js
15-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v3
1616
with:
17-
node-version: 17.x
17+
node-version: 18
1818
- name: Install dependencies
1919
run: npm ci
2020
- name: Build
2121
run: npm run build
2222
- name: Deploy
23-
uses: JamesIves/github-pages-deploy-action@releases/v3
23+
uses: JamesIves/github-pages-deploy-action@releases/v4
2424
with:
2525
folder: dist
2626
git-config-name: GitHub Actions Deploy

src/components/output/PS1Variable.vue

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ function generatePS1(elements: PromptElement[]): string {
198198
// we cannot escape single quotes inside single-quoted strings
199199
// therefore we have to split the string and insert a double-quoted single quote in between:
200200
// 'prefix' "'" 'suffix'
201+
// eslint-disable-next-line quotes
201202
return `PS1='${outputElements.join('').replace(/'/g, "'\"'\"'")}${endReset}'`;
202203
}
203204

src/components/prompteditor/PromptElements.vue

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export default defineComponent({
9595
prompt.state().push(element);
9696
});
9797
} catch (err) {
98-
console.error('ERROR CAUGHT', err);
9998
if (err instanceof PromptParserError) {
10099
this.ps1inputError = err.message;
101100
} else {

src/lib/enum/promptElementType.ts

+2
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ export const PROMPT_ELEMENT_TYPES = [
170170
new PromptElementType('Exit Status', '$?', [], true, 'Exit status ($?).', '0'),
171171
new PromptElementType(
172172
'Git branch',
173+
// eslint-disable-next-line quotes
173174
"$(git branch 2>/dev/null | grep ' ^* ' | colrm 1 2)",
174175
[],
175176
true,
@@ -221,6 +222,7 @@ export const PROMPT_ELEMENT_TYPES = [
221222
new PromptElementType(':', ':', [], true, 'Colon.', ':'),
222223
new PromptElementType(';', ';', [], true, 'Semicolon.', ';'),
223224
new PromptElementType('"', '"', [], true, 'Quotation mark.', '"'),
225+
// eslint-disable-next-line quotes
224226
new PromptElementType("'", "'", [], true, 'Single quote.', "'"),
225227
new PromptElementType('<', '<', [], true, 'Less than.', '<'),
226228
new PromptElementType('>', '>', [], true, 'Greater than.', '>'),

0 commit comments

Comments
 (0)