@tractorbeam/eslint-config 0.1.0

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 ADDED
@@ -0,0 +1,194 @@
1
+ # @tractorbeam/eslint-config
2
+
3
+ Shared ESLint configuration for Tractorbeam projects using modern flat config format.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add -D @tractorbeam/eslint-config eslint typescript-eslint
9
+ ```
10
+
11
+ ## TypeScript config files (`eslint.config.ts`)
12
+
13
+ If you use an `eslint.config.ts` file under Node.js, ESLint requires the optional dev dependency `jiti` (v2+):
14
+
15
+ ```bash
16
+ pnpm add -D jiti
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```typescript
22
+ // eslint.config.ts
23
+ import { defineConfig } from "eslint/config";
24
+
25
+ import { base, react, typescript } from "@tractorbeam/eslint-config";
26
+
27
+ export default defineConfig([
28
+ base,
29
+ {
30
+ extends: [typescript],
31
+ languageOptions: {
32
+ parserOptions: {
33
+ tsconfigRootDir: import.meta.dirname,
34
+ },
35
+ },
36
+ },
37
+ react,
38
+ ]);
39
+ ```
40
+
41
+ ## Available Configs
42
+
43
+ | Config | Description | File Patterns |
44
+ | ---------------- | ---------------------------------------- | ------------------------------- |
45
+ | `base` | ESLint recommended rules | All files |
46
+ | `typescript` | TypeScript, unicorn, regexp, import-lite | `**/*.ts`, `**/*.tsx` |
47
+ | `react` | React, hooks, a11y, react-compiler | `**/*.tsx`, `**/*.jsx` |
48
+ | `tanstackRouter` | TanStack Router plugin | `**/*.tsx`, `**/*.jsx` |
49
+ | `node` | Node.js globals | All files |
50
+ | `playwright` | Playwright testing rules | No default (use with `extends`) |
51
+
52
+ ## Customization
53
+
54
+ ### Setting `tsconfigRootDir` (Required)
55
+
56
+ The `typescript` config uses type-checked linting, which requires `tsconfigRootDir` to be set in your config:
57
+
58
+ ```typescript
59
+ import { defineConfig } from "eslint/config";
60
+
61
+ import { base, typescript } from "@tractorbeam/eslint-config";
62
+
63
+ export default defineConfig([
64
+ base,
65
+ {
66
+ extends: [typescript],
67
+ languageOptions: {
68
+ parserOptions: {
69
+ tsconfigRootDir: import.meta.dirname,
70
+ },
71
+ },
72
+ },
73
+ ]);
74
+ ```
75
+
76
+ ### Disabling Type Checking for JS Files
77
+
78
+ If you have JavaScript files alongside TypeScript, disable type checking for them:
79
+
80
+ ```typescript
81
+ import { defineConfig } from "eslint/config";
82
+ import tseslint from "typescript-eslint";
83
+
84
+ import { base, typescript } from "@tractorbeam/eslint-config";
85
+
86
+ export default defineConfig([
87
+ base,
88
+ {
89
+ extends: [typescript],
90
+ languageOptions: {
91
+ parserOptions: { tsconfigRootDir: import.meta.dirname },
92
+ },
93
+ },
94
+ { files: ["**/*.js"], extends: [tseslint.configs.disableTypeChecked] },
95
+ ]);
96
+ ```
97
+
98
+ ### Custom File Patterns
99
+
100
+ Use `extends` to apply configs to specific file patterns:
101
+
102
+ ```typescript
103
+ import { defineConfig } from "eslint/config";
104
+
105
+ import { base, playwright, typescript } from "@tractorbeam/eslint-config";
106
+
107
+ export default defineConfig([
108
+ base,
109
+ {
110
+ extends: [typescript],
111
+ languageOptions: {
112
+ parserOptions: { tsconfigRootDir: import.meta.dirname },
113
+ },
114
+ },
115
+ { files: ["**/e2e/**/*.ts"], extends: [playwright] },
116
+ ]);
117
+ ```
118
+
119
+ ### Overriding Rules
120
+
121
+ Override any rules by adding them after `extends`:
122
+
123
+ ```typescript
124
+ import { defineConfig } from "eslint/config";
125
+
126
+ import { base, react, typescript } from "@tractorbeam/eslint-config";
127
+
128
+ export default defineConfig([
129
+ base,
130
+ {
131
+ extends: [typescript],
132
+ languageOptions: {
133
+ parserOptions: { tsconfigRootDir: import.meta.dirname },
134
+ },
135
+ },
136
+ {
137
+ extends: [react],
138
+ rules: {
139
+ "react-hooks/exhaustive-deps": "error",
140
+ },
141
+ },
142
+ ]);
143
+ ```
144
+
145
+ ### Adding Ignores
146
+
147
+ Use ESLint's built-in ignore utilities:
148
+
149
+ ```typescript
150
+ import { includeIgnoreFile } from "@eslint/compat";
151
+ import { defineConfig, globalIgnores } from "eslint/config";
152
+
153
+ import { base, typescript } from "@tractorbeam/eslint-config";
154
+
155
+ export default defineConfig([
156
+ base,
157
+ {
158
+ extends: [typescript],
159
+ languageOptions: {
160
+ parserOptions: { tsconfigRootDir: import.meta.dirname },
161
+ },
162
+ },
163
+ includeIgnoreFile(".gitignore"),
164
+ globalIgnores(["dist/**", "*.gen.ts"]),
165
+ ]);
166
+ ```
167
+
168
+ ## Monorepo Setup
169
+
170
+ For monorepos with multiple `tsconfig.json` files, configure the `project` array:
171
+
172
+ ```typescript
173
+ import { defineConfig } from "eslint/config";
174
+
175
+ import { base, typescript } from "@tractorbeam/eslint-config";
176
+
177
+ export default defineConfig([
178
+ base,
179
+ {
180
+ extends: [typescript],
181
+ languageOptions: {
182
+ parserOptions: {
183
+ project: ["./tsconfig.eslint.json", "./packages/*/tsconfig.json"],
184
+ tsconfigRootDir: import.meta.dirname,
185
+ },
186
+ },
187
+ },
188
+ ]);
189
+ ```
190
+
191
+ ## Peer Dependencies
192
+
193
+ - `eslint >= 9`
194
+ - `typescript-eslint >= 8`
package/dist/base.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const base: Linter.Config[];
3
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAO9B,CAAC"}
package/dist/base.js ADDED
@@ -0,0 +1,11 @@
1
+ import eslint from "@eslint/js";
2
+ import { defineConfig } from "eslint/config";
3
+ export const base = defineConfig([
4
+ eslint.configs.recommended,
5
+ {
6
+ rules: {
7
+ "no-nested-ternary": "error",
8
+ },
9
+ },
10
+ ]);
11
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,MAAM,IAAI,GAAoB,YAAY,CAAC;IAChD,MAAM,CAAC,OAAO,CAAC,WAAW;IAC1B;QACE,KAAK,EAAE;YACL,mBAAmB,EAAE,OAAO;SAC7B;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { base } from "./base.js";
2
+ export { typescript } from "./typescript.js";
3
+ export { react } from "./react.js";
4
+ export { tanstackRouter } from "./tanstack-router.js";
5
+ export { node } from "./node.js";
6
+ export { playwright } from "./playwright.js";
7
+ export { prettier } from "./prettier.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export { base } from "./base.js";
2
+ export { typescript } from "./typescript.js";
3
+ export { react } from "./react.js";
4
+ export { tanstackRouter } from "./tanstack-router.js";
5
+ export { node } from "./node.js";
6
+ export { playwright } from "./playwright.js";
7
+ export { prettier } from "./prettier.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
package/dist/node.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const node: Linter.Config[];
3
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAS9B,CAAC"}
package/dist/node.js ADDED
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from "eslint/config";
2
+ import globals from "globals";
3
+ export const node = defineConfig([
4
+ {
5
+ languageOptions: {
6
+ globals: { ...globals.node },
7
+ },
8
+ rules: {
9
+ "no-console": "off",
10
+ },
11
+ },
12
+ ]);
13
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAoB,YAAY,CAAC;IAChD;QACE,eAAe,EAAE;YACf,OAAO,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE;SAC7B;QACD,KAAK,EAAE;YACL,YAAY,EAAE,KAAK;SACpB;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const playwright: Linter.Config[];
3
+ //# sourceMappingURL=playwright.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAEpC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import pluginPlaywright from "eslint-plugin-playwright";
2
+ import { defineConfig } from "eslint/config";
3
+ export const playwright = defineConfig([
4
+ pluginPlaywright.configs["flat/recommended"],
5
+ ]);
6
+ //# sourceMappingURL=playwright.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.js","sourceRoot":"","sources":["../src/playwright.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAoB,YAAY,CAAC;IACtD,gBAAgB,CAAC,OAAO,CAAC,kBAAkB,CAAC;CAC7C,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const prettier: Linter.Config[];
3
+ //# sourceMappingURL=prettier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../src/prettier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import prettierConfig from "eslint-config-prettier";
2
+ export const prettier = [prettierConfig];
3
+ //# sourceMappingURL=prettier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.js","sourceRoot":"","sources":["../src/prettier.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,wBAAwB,CAAC;AAEpD,MAAM,CAAC,MAAM,QAAQ,GAAoB,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const react: Linter.Config[];
3
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAS7C,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EA4B/B,CAAC"}
package/dist/react.js ADDED
@@ -0,0 +1,37 @@
1
+ import pluginJsxA11y from "eslint-plugin-jsx-a11y";
2
+ import pluginReact from "eslint-plugin-react";
3
+ import pluginReactCompiler from "eslint-plugin-react-compiler";
4
+ import pluginReactHooks from "eslint-plugin-react-hooks";
5
+ import pluginReactRefresh from "eslint-plugin-react-refresh";
6
+ import { defineConfig } from "eslint/config";
7
+ import globals from "globals";
8
+ export const react = defineConfig([
9
+ {
10
+ files: ["**/*.tsx", "**/*.jsx"],
11
+ extends: [
12
+ pluginReact.configs.flat.recommended,
13
+ pluginReact.configs.flat["jsx-runtime"],
14
+ pluginReactHooks.configs.flat.recommended,
15
+ pluginJsxA11y.flatConfigs.recommended,
16
+ pluginReactCompiler.configs.recommended,
17
+ ],
18
+ languageOptions: {
19
+ globals: { ...globals.browser },
20
+ },
21
+ plugins: {
22
+ "react-hooks": pluginReactHooks,
23
+ "react-refresh": pluginReactRefresh,
24
+ },
25
+ rules: {
26
+ "react-hooks/exhaustive-deps": "off",
27
+ "react-refresh/only-export-components": "warn",
28
+ "react/no-children-prop": "off",
29
+ "react/react-in-jsx-scope": "off",
30
+ "react/no-unescaped-entities": "off",
31
+ },
32
+ settings: {
33
+ react: { version: "detect" },
34
+ },
35
+ },
36
+ ]);
37
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,kBAAkB,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,CAAC,MAAM,KAAK,GAAoB,YAAY,CAAC;IACjD;QACE,KAAK,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;QAC/B,OAAO,EAAE;YACP,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW;YACpC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;YACvC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW;YACzC,aAAa,CAAC,WAAW,CAAC,WAAW;YACrC,mBAAmB,CAAC,OAAO,CAAC,WAAW;SACxC;QACD,eAAe,EAAE;YACf,OAAO,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE;SAChC;QACD,OAAO,EAAE;YACP,aAAa,EAAE,gBAA4C;YAC3D,eAAe,EAAE,kBAAkB;SACpC;QACD,KAAK,EAAE;YACL,6BAA6B,EAAE,KAAK;YACpC,sCAAsC,EAAE,MAAM;YAC9C,wBAAwB,EAAE,KAAK;YAC/B,0BAA0B,EAAE,KAAK;YACjC,6BAA6B,EAAE,KAAK;SACrC;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;SAC7B;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const tanstackRouter: Linter.Config[];
3
+ //# sourceMappingURL=tanstack-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstack-router.d.ts","sourceRoot":"","sources":["../src/tanstack-router.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAYxC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import pluginTanStackRouter from "@tanstack/eslint-plugin-router";
2
+ import { defineConfig } from "eslint/config";
3
+ import tseslint from "typescript-eslint";
4
+ export const tanstackRouter = defineConfig([
5
+ {
6
+ files: ["**/*.tsx", "**/*.jsx"],
7
+ extends: [pluginTanStackRouter.configs["flat/recommended"]],
8
+ plugins: {
9
+ "@typescript-eslint": tseslint,
10
+ },
11
+ rules: {
12
+ // tanstack throws notFound and similar to redirect immediately
13
+ "@typescript-eslint/only-throw-error": "off",
14
+ },
15
+ },
16
+ ]);
17
+ //# sourceMappingURL=tanstack-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstack-router.js","sourceRoot":"","sources":["../src/tanstack-router.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAoB,YAAY,CAAC;IAC1D;QACE,KAAK,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;QAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC3D,OAAO,EAAE;YACP,oBAAoB,EAAE,QAAQ;SAC/B;QACD,KAAK,EAAE;YACL,+DAA+D;YAC/D,qCAAqC,EAAE,KAAK;SAC7C;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ export declare const typescript: Linter.Config[];
3
+ //# sourceMappingURL=typescript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../src/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOrC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAoCpC,CAAC"}
@@ -0,0 +1,43 @@
1
+ import pluginImportLite from "eslint-plugin-import-lite";
2
+ import pluginRegexp from "eslint-plugin-regexp";
3
+ import pluginUnicorn from "eslint-plugin-unicorn";
4
+ import { defineConfig } from "eslint/config";
5
+ import tseslint from "typescript-eslint";
6
+ export const typescript = defineConfig([
7
+ {
8
+ files: ["**/*.ts", "**/*.tsx"],
9
+ extends: [
10
+ tseslint.configs.strictTypeChecked,
11
+ tseslint.configs.stylisticTypeChecked,
12
+ pluginUnicorn.configs.recommended,
13
+ pluginRegexp.configs["flat/recommended"],
14
+ pluginImportLite.configs.recommended,
15
+ ],
16
+ languageOptions: {
17
+ parserOptions: {
18
+ projectService: true,
19
+ },
20
+ },
21
+ rules: {
22
+ "@typescript-eslint/no-floating-promises": "off",
23
+ "@typescript-eslint/restrict-template-expressions": "off",
24
+ "@typescript-eslint/ban-ts-comment": "warn",
25
+ "@typescript-eslint/consistent-type-imports": "error",
26
+ "@typescript-eslint/no-empty-object-type": "warn",
27
+ "@typescript-eslint/no-explicit-any": "warn",
28
+ "@typescript-eslint/no-unused-vars": [
29
+ "error",
30
+ {
31
+ argsIgnorePattern: "^_",
32
+ varsIgnorePattern: "^_",
33
+ destructuredArrayIgnorePattern: "^_",
34
+ },
35
+ ],
36
+ "unicorn/no-nested-ternary": "off",
37
+ "unicorn/no-null": "off",
38
+ "unicorn/prevent-abbreviations": "off",
39
+ "unicorn/no-abusive-eslint-disable": "off",
40
+ },
41
+ },
42
+ ]);
43
+ //# sourceMappingURL=typescript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.js","sourceRoot":"","sources":["../src/typescript.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAoB,YAAY,CAAC;IACtD;QACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;QAC9B,OAAO,EAAE;YACP,QAAQ,CAAC,OAAO,CAAC,iBAAiB;YAClC,QAAQ,CAAC,OAAO,CAAC,oBAAoB;YACrC,aAAa,CAAC,OAAO,CAAC,WAAW;YACjC,YAAY,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,gBAAgB,CAAC,OAAO,CAAC,WAAW;SACrC;QACD,eAAe,EAAE;YACf,aAAa,EAAE;gBACb,cAAc,EAAE,IAAI;aACrB;SACF;QACD,KAAK,EAAE;YACL,yCAAyC,EAAE,KAAK;YAChD,kDAAkD,EAAE,KAAK;YACzD,mCAAmC,EAAE,MAAM;YAC3C,4CAA4C,EAAE,OAAO;YACrD,yCAAyC,EAAE,MAAM;YACjD,oCAAoC,EAAE,MAAM;YAC5C,mCAAmC,EAAE;gBACnC,OAAO;gBACP;oBACE,iBAAiB,EAAE,IAAI;oBACvB,iBAAiB,EAAE,IAAI;oBACvB,8BAA8B,EAAE,IAAI;iBACrC;aACF;YACD,2BAA2B,EAAE,KAAK;YAClC,iBAAiB,EAAE,KAAK;YACxB,+BAA+B,EAAE,KAAK;YACtC,mCAAmC,EAAE,KAAK;SAC3C;KACF;CACF,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@tractorbeam/eslint-config",
3
+ "version": "0.1.0",
4
+ "description": "Shared ESLint configuration for Tractorbeam projects",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "default": "./dist/index.js"
10
+ },
11
+ "./base": {
12
+ "types": "./dist/base.d.ts",
13
+ "default": "./dist/base.js"
14
+ },
15
+ "./typescript": {
16
+ "types": "./dist/typescript.d.ts",
17
+ "default": "./dist/typescript.js"
18
+ },
19
+ "./react": {
20
+ "types": "./dist/react.d.ts",
21
+ "default": "./dist/react.js"
22
+ },
23
+ "./tanstack-router": {
24
+ "types": "./dist/tanstack-router.d.ts",
25
+ "default": "./dist/tanstack-router.js"
26
+ },
27
+ "./node": {
28
+ "types": "./dist/node.d.ts",
29
+ "default": "./dist/node.js"
30
+ },
31
+ "./playwright": {
32
+ "types": "./dist/playwright.d.ts",
33
+ "default": "./dist/playwright.js"
34
+ },
35
+ "./prettier": {
36
+ "types": "./dist/prettier.d.ts",
37
+ "default": "./dist/prettier.js"
38
+ }
39
+ },
40
+ "files": [
41
+ "dist/**",
42
+ "README.md"
43
+ ],
44
+ "dependencies": {
45
+ "@eslint/js": "^9.39.2",
46
+ "@tanstack/eslint-plugin-router": "^1.141.0",
47
+ "eslint-config-prettier": "^10.1.5",
48
+ "eslint-plugin-import-lite": "^0.3.0",
49
+ "eslint-plugin-jsx-a11y": "^6.10.2",
50
+ "eslint-plugin-playwright": "^2.4.0",
51
+ "eslint-plugin-react": "^7.37.5",
52
+ "eslint-plugin-react-compiler": "^19.1.0-rc.2",
53
+ "eslint-plugin-react-hooks": "^7.0.1",
54
+ "eslint-plugin-react-refresh": "^0.4.25",
55
+ "eslint-plugin-regexp": "^2.10.0",
56
+ "eslint-plugin-unicorn": "^62.0.0",
57
+ "globals": "^16.5.0",
58
+ "typescript-eslint": "^8.49.0"
59
+ },
60
+ "devDependencies": {
61
+ "@types/eslint": "^9.6.1",
62
+ "@types/eslint-plugin-jsx-a11y": "^6.10.1",
63
+ "@types/node": "^22.19.3",
64
+ "typescript": "^5.9.3",
65
+ "@tractorbeam/typescript-config": "0.1.0"
66
+ },
67
+ "peerDependencies": {
68
+ "eslint": ">= 9",
69
+ "typescript-eslint": ">= 8"
70
+ },
71
+ "scripts": {
72
+ "build": "tsc -p tsconfig.build.json",
73
+ "clean": "rm -rf dist *.tsbuildinfo",
74
+ "lint:eslint": "eslint src --max-warnings=0",
75
+ "lint:types": "tsc --noEmit"
76
+ }
77
+ }