mirror of
https://github.com/foambubble/foam.git
synced 2026-01-10 06:28:12 -05:00
consolidated prettier configuration in root package.json file (#429)
also fixed linting and consolidated .gitignore and moved .editorconfig
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ node_modules
|
||||
*.tsbuildinfo
|
||||
*.vsix
|
||||
*.log
|
||||
out
|
||||
dist
|
||||
docs/_site
|
||||
docs/.sass-cache
|
||||
|
||||
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -17,5 +17,8 @@
|
||||
"**/_layouts/**/*",
|
||||
"**/_site/**/*",
|
||||
"**/node_modules/**/*"
|
||||
]
|
||||
],
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"prettier.requireConfig": true
|
||||
}
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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'),
|
||||
`
|
||||
|
||||
3
packages/foam-vscode/.gitignore
vendored
3
packages/foam-vscode/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
out
|
||||
.vscode-test/
|
||||
*.vsix
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"tabWidth": 2
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
trailingComma: 'es5',
|
||||
tabWidth: 2,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
};
|
||||
Reference in New Issue
Block a user