Skip to content

Commit 9d0665e

Browse files
committed
Clean up CSS lint issues
1 parent 2538f5b commit 9d0665e

33 files changed

Lines changed: 1909 additions & 688 deletions

docs-builder/src/styles/main.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,7 @@ body {
565565

566566
.prose a {
567567
color: var(--amber);
568-
text-decoration-line: underline;
569-
text-decoration-thickness: 1px;
568+
text-decoration: underline;
570569
text-underline-offset: 2px;
571570
transition: opacity 0.1s;
572571
}
@@ -602,6 +601,7 @@ body {
602601
border-left: 3px solid var(--amber);
603602
border-radius: 0 4px 4px 0;
604603
overflow-x: auto;
604+
position: relative;
605605
font-family: var(--font-mono);
606606
font-size: 0.84rem;
607607
line-height: 1.65;
@@ -631,10 +631,6 @@ body {
631631
Copy button
632632
============================================================ */
633633

634-
.prose pre {
635-
position: relative;
636-
}
637-
638634
.copy-btn {
639635
position: absolute;
640636
top: 0.6rem;

docs/releases/unreleased.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ Example:
2323
```
2424
2525
-->
26+
27+
## Changed
28+
29+
- Improved local lint checks so package and CSS issues reported by Obsidian's online review can be caught before submission.
30+
- Cleaned up stylesheet compatibility issues reported by Obsidian's online review without changing the intended TaskNotes appearance.

esbuild.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import esbuild from "esbuild";
22
import process from "process";
3-
import builtins from "builtin-modules";
3+
import { builtinModules } from "node:module";
44
import { readFileSync, existsSync, copyFileSync, mkdirSync } from "fs";
55
import { resolve, join } from "path";
66
import { homedir } from "os";
@@ -83,7 +83,8 @@ const context = await esbuild.context({
8383
"@lezer/common",
8484
"@lezer/highlight",
8585
"@lezer/lr",
86-
...builtins],
86+
...builtinModules,
87+
],
8788
format: "cjs",
8889
target: "es2018",
8990
logLevel: "info",

eslint.config.mjs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,30 @@ const pluginReviewRules = {
127127
},
128128
};
129129

130+
const sourceFilePatterns = [
131+
"src/**/*.ts",
132+
"src/**/*.tsx",
133+
"src/**/*.js",
134+
"src/**/*.jsx",
135+
];
136+
137+
const obsidianRecommendedConfig = obsidianmd.configs.recommended.map((config) => {
138+
const hasUnscopedObsidianRules =
139+
config.files === undefined &&
140+
Object.keys(config.rules ?? {}).some((ruleName) =>
141+
ruleName.startsWith("obsidianmd/")
142+
);
143+
144+
if (!hasUnscopedObsidianRules) {
145+
return config;
146+
}
147+
148+
return {
149+
...config,
150+
files: sourceFilePatterns,
151+
};
152+
});
153+
130154
export default [
131155
{
132156
ignores: [
@@ -149,7 +173,7 @@ export default [
149173

150174
js.configs.recommended,
151175

152-
...obsidianmd.configs.recommended,
176+
...obsidianRecommendedConfig,
153177

154178
{
155179
files: ["src/**/*.ts"],

0 commit comments

Comments
 (0)