Skip to content

Commit 36a632f

Browse files
consolidated prettier configuration in root package.json file (foambubble#429)
also fixed linting and consolidated .gitignore and moved .editorconfig
1 parent f9331ad commit 36a632f

11 files changed

+10
-18
lines changed
File renamed without changes.
File renamed without changes.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules
44
*.tsbuildinfo
55
*.vsix
66
*.log
7+
out
78
dist
89
docs/_site
910
docs/.sass-cache

.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"**/_layouts/**/*",
1818
"**/_site/**/*",
1919
"**/node_modules/**/*"
20-
]
20+
],
21+
"editor.defaultFormatter": "esbenp.prettier-vscode",
22+
"editor.formatOnSave": true,
23+
"prettier.requireConfig": true
2124
}

packages/foam-core/src/bootstrap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const bootstrap = async (config: FoamConfig, services: Services) => {
3636
const content = await services.dataStore.read(uri);
3737
graph.setNote(await parser.parse(uri, content));
3838
});
39-
services.dataStore.onDidDelete(async uri => {
39+
services.dataStore.onDidDelete(uri => {
4040
graph.deleteNote(uri);
4141
});
4242

packages/foam-core/src/services/datastore.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class FileDataStore implements IDataStore, IDisposable {
105105

106106
if (isSome(watcher)) {
107107
this._disposables.push(
108-
watcher.onDidCreate(async uri => {
108+
watcher.onDidCreate(uri => {
109109
if (this.isMatch(uri)) {
110110
Logger.info(`Created: ${uri.path}`);
111111
this.onDidCreateEmitter.fire(uri);

packages/foam-core/test/core.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ describe('graph events', () => {
308308
const graph = new NoteGraph();
309309
const callback = jest.fn();
310310
const listener = graph.onDidDeleteNote(callback);
311-
const note = graph.setNote(
311+
graph.setNote(
312312
createTestNote({ uri: '/dir1/page-a.md', title: 'My Title' })
313313
);
314314
graph.deleteNote(strToUri('non-existing-note'));
@@ -357,7 +357,7 @@ describe('graph events', () => {
357357
});
358358

359359
describe('graph middleware', () => {
360-
it('can intercept calls to the graph', async () => {
360+
it('can intercept calls to the graph', () => {
361361
const graph = createGraph([
362362
next => ({
363363
setNote: note => {

packages/foam-core/test/markdown-provider.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ describe('parser plugins', () => {
306306
};
307307
const parser = createMarkdownParser([testPlugin]);
308308

309-
it('can augment the parsing of the file', async () => {
309+
it('can augment the parsing of the file', () => {
310310
const note1 = parser.parse(
311311
URI.file('/path/to/a'),
312312
`

packages/foam-vscode/.gitignore

-3
This file was deleted.

packages/foam-vscode/.prettierrc

-3
This file was deleted.

prettier.config.js

-6
This file was deleted.

0 commit comments

Comments
 (0)