consolidated prettier configuration in root package.json file (#429)

also fixed linting and consolidated .gitignore and moved .editorconfig
This commit is contained in:
Riccardo
2021-01-03 18:35:33 +01:00
committed by GitHub
parent f9331ad327
commit 36a632f218
11 changed files with 10 additions and 18 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ node_modules
*.tsbuildinfo
*.vsix
*.log
out
dist
docs/_site
docs/.sass-cache

View File

@@ -17,5 +17,8 @@
"**/_layouts/**/*",
"**/_site/**/*",
"**/node_modules/**/*"
]
],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.requireConfig": true
}

View File

@@ -36,7 +36,7 @@ export const bootstrap = async (config: FoamConfig, services: Services) => {
const content = await services.dataStore.read(uri);
graph.setNote(await parser.parse(uri, content));
});
services.dataStore.onDidDelete(async uri => {
services.dataStore.onDidDelete(uri => {
graph.deleteNote(uri);
});

View File

@@ -105,7 +105,7 @@ export class FileDataStore implements IDataStore, IDisposable {
if (isSome(watcher)) {
this._disposables.push(
watcher.onDidCreate(async uri => {
watcher.onDidCreate(uri => {
if (this.isMatch(uri)) {
Logger.info(`Created: ${uri.path}`);
this.onDidCreateEmitter.fire(uri);

View File

@@ -308,7 +308,7 @@ describe('graph events', () => {
const graph = new NoteGraph();
const callback = jest.fn();
const listener = graph.onDidDeleteNote(callback);
const note = graph.setNote(
graph.setNote(
createTestNote({ uri: '/dir1/page-a.md', title: 'My Title' })
);
graph.deleteNote(strToUri('non-existing-note'));
@@ -357,7 +357,7 @@ describe('graph events', () => {
});
describe('graph middleware', () => {
it('can intercept calls to the graph', async () => {
it('can intercept calls to the graph', () => {
const graph = createGraph([
next => ({
setNote: note => {

View File

@@ -306,7 +306,7 @@ describe('parser plugins', () => {
};
const parser = createMarkdownParser([testPlugin]);
it('can augment the parsing of the file', async () => {
it('can augment the parsing of the file', () => {
const note1 = parser.parse(
URI.file('/path/to/a'),
`

View File

@@ -1,3 +0,0 @@
out
.vscode-test/
*.vsix

View File

@@ -1,3 +0,0 @@
{
"tabWidth": 2
}

View File

@@ -1,6 +0,0 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: true,
singleQuote: true,
};