Skip to content

Commit 9511faa

Browse files
sgammonclaude
andcommitted
chore(brand): lint the new package
@elide/brand shipped without a lint config while the repo lints its other TS package, so its source and build scripts were unchecked. Mirrors the packages/ui flat config, splitting environments: src is environment-neutral (it has to run in a browser, in Node, and in a build script) while scripts is Node-only tooling that never ships. Clean on the first run — no code changes needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent c92543b commit 9511faa

3 files changed

Lines changed: 43 additions & 4 deletions

File tree

bun.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/brand/eslint.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import tseslint from "typescript-eslint";
4+
5+
/**
6+
* Flat config (ESLint 10), mirroring packages/ui. Type-aware linting is left
7+
* off intentionally — `tsc` is the type gate; this pass catches lint-level
8+
* issues only.
9+
*
10+
* Two environments here: `src` is environment-neutral (it must run in a
11+
* browser, in Node, and in a build script), while `scripts` is Node-only
12+
* tooling that never ships.
13+
*/
14+
export default tseslint.config(
15+
{ ignores: ["dist/**", "assets/**"] },
16+
js.configs.recommended,
17+
...tseslint.configs.recommended,
18+
{
19+
files: ["src/**/*.ts"],
20+
languageOptions: {
21+
globals: { ...globals.browser, ...globals.node },
22+
},
23+
},
24+
{
25+
files: ["scripts/**/*.mjs"],
26+
languageOptions: {
27+
globals: { ...globals.node },
28+
},
29+
},
30+
);

packages/brand/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@elide/brand",
33
"version": "0.1.0",
4-
"description": "Elide's brand artwork logo geometry, generated SVG, and png/webp/avif renditions. No framework dependency; safe to consume from any repo.",
4+
"description": "Elide's brand artwork \u2014 logo geometry, generated SVG, and png/webp/avif renditions. No framework dependency; safe to consume from any repo.",
55
"license": "UNLICENSED",
66
"type": "module",
77
"exports": {
@@ -18,14 +18,19 @@
1818
],
1919
"scripts": {
2020
"build": "tsc -p tsconfig.json",
21-
"dev": "tsc -p tsconfig.json --watch",
2221
"build:assets": "bun scripts/build-assets.mjs",
23-
"verify:assets": "bun scripts/verify-fidelity.mjs",
24-
"test": "vitest run"
22+
"dev": "tsc -p tsconfig.json --watch",
23+
"lint": "eslint src scripts",
24+
"test": "vitest run",
25+
"verify:assets": "bun scripts/verify-fidelity.mjs"
2526
},
2627
"devDependencies": {
28+
"@eslint/js": "^10.0.1",
29+
"eslint": "^10.8.0",
30+
"globals": "^17.9.0",
2731
"sharp": "^0.34.5",
2832
"typescript": "^6.0.3",
33+
"typescript-eslint": "^8.66.0",
2934
"vitest": "^4.1.10"
3035
}
3136
}

0 commit comments

Comments
 (0)