generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from watsonbox/biome
Add biomejs
- Loading branch information
Showing
33 changed files
with
1,011 additions
and
1,071 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# yarn biome format --write | ||
4bef05bf8735e1d915950fe22662fbafbe2f0b49 | ||
|
||
# yarn biome lint --write | ||
94ab7ee3d8d3c09e71e2ad6b817c5be2bdfb82fc | ||
|
||
# yarn biome check --write | ||
0985e650948d8b73667f929dca82bcfb73d6850c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", | ||
"vcs": { | ||
"enabled": false, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
}, | ||
"files": { | ||
"ignoreUnknown": false, | ||
"ignore": [] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space", | ||
"ignore": ["main.js", "package.json"] | ||
}, | ||
"organizeImports": { | ||
"ignore": ["main.js"], | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"ignore": ["main.js"], | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"suspicious": { | ||
"noExplicitAny": "warn", | ||
"noControlCharactersInRegex": "warn" | ||
}, | ||
"style": { | ||
"noNonNullAssertion": "warn" | ||
}, | ||
"complexity": { | ||
"useLiteralKeys": "off", | ||
"noForEach": "off" | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "double" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
import esbuild from "esbuild"; | ||
import process from "process"; | ||
import process from "node:process"; | ||
import builtins from "builtin-modules"; | ||
import esbuild from "esbuild"; | ||
|
||
const banner = | ||
`/* | ||
const banner = `/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD | ||
if you want to view the source, please visit the github repository of this plugin | ||
*/ | ||
`; | ||
|
||
const prod = (process.argv[2] === "production"); | ||
const prod = process.argv[2] === "production"; | ||
|
||
const context = await esbuild.context({ | ||
banner: { | ||
js: banner, | ||
}, | ||
entryPoints: ["src/StravaSync.ts"], | ||
bundle: true, | ||
external: [ | ||
"obsidian", | ||
"electron", | ||
"@codemirror/autocomplete", | ||
"@codemirror/collab", | ||
"@codemirror/commands", | ||
"@codemirror/language", | ||
"@codemirror/lint", | ||
"@codemirror/search", | ||
"@codemirror/state", | ||
"@codemirror/view", | ||
"@lezer/common", | ||
"@lezer/highlight", | ||
"@lezer/lr", | ||
...builtins], | ||
format: "cjs", | ||
target: "es2018", | ||
logLevel: "info", | ||
sourcemap: prod ? false : "inline", | ||
treeShaking: true, | ||
outfile: "main.js", | ||
minify: prod, | ||
banner: { | ||
js: banner, | ||
}, | ||
entryPoints: ["src/StravaSync.ts"], | ||
bundle: true, | ||
external: [ | ||
"obsidian", | ||
"electron", | ||
"@codemirror/autocomplete", | ||
"@codemirror/collab", | ||
"@codemirror/commands", | ||
"@codemirror/language", | ||
"@codemirror/lint", | ||
"@codemirror/search", | ||
"@codemirror/state", | ||
"@codemirror/view", | ||
"@lezer/common", | ||
"@lezer/highlight", | ||
"@lezer/lr", | ||
...builtins, | ||
], | ||
format: "cjs", | ||
target: "es2018", | ||
logLevel: "info", | ||
sourcemap: prod ? false : "inline", | ||
treeShaking: true, | ||
outfile: "main.js", | ||
minify: prod, | ||
}); | ||
|
||
if (prod) { | ||
await context.rebuild(); | ||
process.exit(0); | ||
await context.rebuild(); | ||
process.exit(0); | ||
} else { | ||
await context.watch(); | ||
await context.watch(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
moduleFileExtensions: ['ts', 'js'], | ||
testMatch: ['**/__tests__/**/*.test.ts'], | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
moduleFileExtensions: ["ts", "js"], | ||
testMatch: ["**/__tests__/**/*.test.ts"], | ||
transform: { | ||
'^.+\\.ts$': 'ts-jest', | ||
"^.+\\.ts$": "ts-jest", | ||
}, | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
transformIgnorePatterns: [ | ||
'node_modules/(?!(csv-parse)/)' | ||
], | ||
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"], | ||
transformIgnorePatterns: ["node_modules/(?!(csv-parse)/)"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
jest.mock('csv-parse/browser/esm/sync', () => { | ||
jest.mock("csv-parse/browser/esm/sync", () => { | ||
return { | ||
parse: require('csv-parse/sync').parse | ||
parse: require("csv-parse/sync").parse, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"id": "strava-sync", | ||
"name": "Strava Sync", | ||
"version": "0.2.0", | ||
"minAppVersion": "0.15.0", | ||
"description": "Sync activities from Strava.", | ||
"author": "Obsidian", | ||
"authorUrl": "https://github.com/watsonbox", | ||
"isDesktopOnly": false | ||
"id": "strava-sync", | ||
"name": "Strava Sync", | ||
"version": "0.2.0", | ||
"minAppVersion": "0.15.0", | ||
"description": "Sync activities from Strava.", | ||
"author": "Obsidian", | ||
"authorUrl": "https://github.com/watsonbox", | ||
"isDesktopOnly": false | ||
} |
Oops, something went wrong.