mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-12 17:25:56 +00:00
21 lines
490 B
JavaScript
21 lines
490 B
JavaScript
import { readFileSync } from "fs";
|
|
let localPrettierConfig = {};
|
|
|
|
try {
|
|
const localConfig = readFileSync(".prettierrc.local", "utf-8");
|
|
localPrettierConfig = JSON.parse(localConfig);
|
|
console.log("Using local Prettier config from .prettierrc.local");
|
|
} catch (e) {
|
|
// no local config
|
|
}
|
|
const prettierConfig = {
|
|
trailingComma: "es5",
|
|
tabWidth: 4,
|
|
printWidth: 120,
|
|
semi: true,
|
|
endOfLine: "cr",
|
|
...localPrettierConfig,
|
|
};
|
|
|
|
export default prettierConfig;
|