@martinrun/frontend-config 0.2.6 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,6 +17,8 @@ Start here: [SETUP.md](./SETUP.md). The rules themselves: [docs/DESIGN.md](./doc
17
17
  Bringing an existing repo onto this: [docs/MIGRATION.md](./docs/MIGRATION.md)
18
18
  (includes ready-to-paste agent prompts for incremental adoption and full UI migration).
19
19
  Ongoing upkeep once a project is on it: [docs/MAINTENANCE.md](./docs/MAINTENANCE.md).
20
+ The current maintenance review, cross-repo, with its live status:
21
+ [docs/PLAN.md](./docs/PLAN.md).
20
22
 
21
23
  ## Preset
22
24
 
@@ -1,9 +1,7 @@
1
- // Shared ESLint flat config.
1
+ // Shared ESLint flat preset (the machine-enforceable half of DESIGN.md).
2
2
  //
3
- // This file is the machine-enforceable half of DESIGN.md. Rules that can be
4
- // linted live here; rules that need judgement live in the prose doc.
5
- //
6
- // Usage in a project's eslint.config.js:
3
+ // Exports the `config(options)` factory that consuming projects call from
4
+ // their own `eslint.config.js`:
7
5
  //
8
6
  // import config from "@martinrun/frontend-config/eslint";
9
7
  // export default config();
@@ -11,6 +9,14 @@
11
9
  // To relax a rule for one project, spread and override:
12
10
  //
13
11
  // export default [...config(), { rules: { "no-restricted-syntax": "off" } }];
12
+ //
13
+ // The factory lives in its own file (not `eslint.config.js`) because ESLint
14
+ // v10 requires the config file it loads to export an array — it dropped
15
+ // function-export config files, which threw "Unexpected function." on every
16
+ // `eslint .` run. The repo's root `eslint.config.js` is a thin
17
+ // `export default config()` wrapper for ESLint itself; the package export
18
+ // `@martinrun/frontend-config/eslint` points here so consumers keep the
19
+ // parameterized call.
14
20
 
15
21
  import js from "@eslint/js";
16
22
  import globals from "globals";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@martinrun/frontend-config",
3
- "version": "0.2.6",
3
+ "version": "0.2.11",
4
4
  "description": "Shared frontend conventions: ESLint, TypeScript and Prettier config for React + shadcn/ui projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,21 +11,13 @@
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
14
- "scripts": {
15
- "test": "node --test \"test/**/*.test.mjs\"",
16
- "lint": "eslint . --max-warnings 0",
17
- "format": "prettier --write .",
18
- "format:check": "prettier --check .",
19
- "format-check": "prettier --check .",
20
- "prepare": "lefthook install"
21
- },
22
14
  "exports": {
23
- "./eslint": "./eslint.config.js",
15
+ "./eslint": "./eslint-preset.js",
24
16
  "./prettier": "./prettier.config.js",
25
17
  "./tsconfig": "./tsconfig.base.json"
26
18
  },
27
19
  "files": [
28
- "eslint.config.js",
20
+ "eslint-preset.js",
29
21
  "prettier.config.js",
30
22
  "tsconfig.base.json",
31
23
  "LICENSE"
@@ -46,10 +38,17 @@
46
38
  "typescript-eslint": "^8.0.0"
47
39
  },
48
40
  "devDependencies": {
49
- "eslint": "10.9.1",
50
- "lefthook": "2.1.12",
41
+ "eslint": "10.10.0",
42
+ "lefthook": "2.1.14",
51
43
  "prettier": "3.9.6",
52
44
  "prettier-plugin-tailwindcss": "0.8.1",
53
45
  "typescript": "6.0.3"
46
+ },
47
+ "scripts": {
48
+ "test": "node --test \"test/**/*.test.mjs\"",
49
+ "lint": "eslint . --max-warnings 0",
50
+ "format": "prettier --write .",
51
+ "format:check": "prettier --check .",
52
+ "format-check": "prettier --check ."
54
53
  }
55
- }
54
+ }