Skip to content

Commit a8d1c6e

Browse files
authored
Setup linting (#41)
1 parent 74f2a3f commit a8d1c6e

File tree

7 files changed

+29
-18
lines changed

7 files changed

+29
-18
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/workflows/premerge.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ jobs:
55
build:
66
runs-on: ubuntu-latest
77
steps:
8-
- name: Checkout source
9-
uses: actions/checkout@v2
8+
- name: Checkout source
9+
uses: actions/checkout@v2
1010

11-
- name: Install NPM dependencies
12-
run: npm install
13-
14-
- name: Build
15-
run: npm run build
11+
- name: Install NPM dependencies
12+
run: npm install
1613

17-
- name: Test
18-
run: npm run test
14+
- name: Lint
15+
run: npm run lint
16+
17+
- name: Build
18+
run: npm run build
19+
20+
- name: Test
21+
run: npm run test

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"endOfLine": "auto"
3+
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"main": "src/index.js",
66
"scripts": {
77
"build": "svelte-check && rollup -c",
8-
"test": "mocha -r ts-node/register tests/*.ts"
8+
"test": "mocha -r ts-node/register tests/*.ts",
9+
"format": "prettier --write src/**/*",
10+
"lint": "prettier --check src/**/*"
911
},
1012
"author": "Jamie Brynes",
1113
"license": "ISC",
@@ -25,9 +27,11 @@
2527
"@types/mocha": "^8.0.3",
2628
"chai": "^4.2.0",
2729
"mocha": "^8.1.3",
30+
"prettier": "^2.1.1",
31+
"prettier-plugin-svelte": "^1.2.1",
2832
"svelte-check": "^1.0.31",
2933
"svelte-preprocess": "^4.2.0",
3034
"ts-node": "^9.0.0",
3135
"typescript": "^4.0.2"
3236
}
33-
}
37+
}

src/TodoistQuery.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@
8888
</svg>
8989
</button>
9090
<br />
91-
<TaskList {tasks} {settings} {api} sorting={query.sorting ?? []}/>
91+
<TaskList {tasks} {settings} {api} sorting={query.sorting ?? []} />

src/obsidian.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class PluginInstance<TData = {}> {
5656
}
5757

5858
export interface IObsidianCommand {
59-
id: string,
60-
name: string,
61-
callback: () => void
59+
id: string;
60+
name: string;
61+
callback: () => void;
6262
}

0 commit comments

Comments
 (0)