@infinitetoken/eslint-config 0.1.6 → 0.1.8

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
@@ -6,7 +6,7 @@ Shared ESLint (flat config) and Prettier rules for InfiniteToken TypeScript pack
6
6
 
7
7
  | Export | Use for |
8
8
  | --- | --- |
9
- | `@infinitetoken/eslint-config` | Universal core (TS recommended, prettier, import sort); rarely used directly. Always ignores `dist/**`, `node_modules/**`, `lib/**`, `coverage/**`, `**/*.js`, `**/*.mjs`, and `.claude/worktrees/**` (a Claude Code artifact directory present across the whole fleet) |
9
+ | `@infinitetoken/eslint-config` | Universal core (TS recommended, prettier, import sort); rarely used directly. Always ignores `dist/**`, `node_modules/**`, `lib/**`, `coverage/**`, `**/*.js`, `**/*.mjs`, `.claude/worktrees/**` (a Claude Code artifact directory present across the whole fleet), and `.yalc/**` (yalc-linked packages snapshot their `.d.ts`/`.d.mts` output too, not just compiled JS — those crash the type-aware parser the same as any other out-of-project `.ts` file if not ignored) |
10
10
  | `@infinitetoken/eslint-config/npm-package` | Any published npm package with no React Native or server specifics (kits, Node plugins). Also ignores `tsup.config.ts` (a no-op if the package doesn't have one — it sits outside the rootDir-scoped tsconfig most kit packages use, which trips the type-aware parser if linted) and turns off `no-explicit-any` under `**/__tests__/**` and `**/__mocks__/**` — those directories are linted like anywhere else (formatting, import sort, unused vars), not excluded; `any` is just a reasonable choice there for casting fixtures and mocking modules |
11
11
  | `@infinitetoken/eslint-config/react-native` | React Native packages; adds `eslint-plugin-react-hooks` and `eslint-plugin-react-native` |
12
12
  | `@infinitetoken/eslint-config/server` | Express/server apps; relaxed `no-unused-vars` (`^_` ignore pattern), `no-explicit-any: warn`, skips the `package.json` plugin since these aren't published |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitetoken/eslint-config",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Shared ESLint and Prettier configuration for InfiniteToken TypeScript packages",
5
5
  "keywords": [
6
6
  "config",
@@ -21,20 +21,15 @@
21
21
  "sideEffects": false,
22
22
  "type": "commonjs",
23
23
  "exports": {
24
- ".": "./index.cjs",
25
- "./npm-package": "./npm-package.cjs",
26
- "./prettier": "./prettier.cjs",
27
- "./react-native": "./react-native.cjs",
28
- "./server": "./server.cjs",
29
- "./vue": "./vue.cjs"
24
+ ".": "./src/index.cjs",
25
+ "./npm-package": "./src/npm-package.cjs",
26
+ "./prettier": "./src/prettier.cjs",
27
+ "./react-native": "./src/react-native.cjs",
28
+ "./server": "./src/server.cjs",
29
+ "./vue": "./src/vue.cjs"
30
30
  },
31
31
  "files": [
32
- "index.cjs",
33
- "npm-package.cjs",
34
- "react-native.cjs",
35
- "server.cjs",
36
- "vue.cjs",
37
- "prettier.cjs"
32
+ "src"
38
33
  ],
39
34
  "scripts": {
40
35
  "fix": "eslint . --fix",
@@ -47,7 +42,7 @@
47
42
  "verify": "npm run lint && npm test",
48
43
  "preversion": "npm run verify"
49
44
  },
50
- "prettier": "./prettier.cjs",
45
+ "prettier": "./src/prettier.cjs",
51
46
  "dependencies": {
52
47
  "@infinitetoken/eslint-config": "^0.1.5",
53
48
  "@typescript-eslint/parser": "^8.59.3",
@@ -15,7 +15,7 @@ module.exports = defineConfig([
15
15
  }
16
16
  },
17
17
  {
18
- ignores: ['dist/**', 'node_modules/**', 'lib/**', 'coverage/**', '**/*.js', '**/*.mjs', '.claude/worktrees/**']
18
+ ignores: ['dist/**', 'node_modules/**', 'lib/**', 'coverage/**', '**/*.js', '**/*.mjs', '.claude/worktrees/**', '.yalc/**']
19
19
  },
20
20
  ...tsEslint.configs.recommended,
21
21
  prettierRecommended,
@@ -28,7 +28,13 @@ module.exports = defineConfig([
28
28
  'simple-import-sort/imports': 'warn',
29
29
  'simple-import-sort/exports': 'warn',
30
30
  'no-console': 'warn',
31
- '@typescript-eslint/no-unused-vars': 'warn',
31
+ // '_'-prefixed unused var/arg/caught-error bindings are a deliberate "I need this position,
32
+ // not this value" signal (most commonly an object-destructure used only to omit a key, e.g.
33
+ // `const { id: _id, ...rest } = obj` — unlike array destructuring, an object key binding can't
34
+ // be elided) and shouldn't warn. Universal fleet-wide: a grep across every repo in the fleet
35
+ // found zero consumers of this bare `.` export, so there's no real "wants the plain warn
36
+ // instead" consumer to preserve by scoping this to individual presets instead.
37
+ '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
32
38
  '@typescript-eslint/no-require-imports': 'off'
33
39
  }
34
40
  }
@@ -5,7 +5,6 @@ module.exports = defineConfig([
5
5
  ...base,
6
6
  {
7
7
  rules: {
8
- '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
9
8
  '@typescript-eslint/no-explicit-any': 'warn'
10
9
  }
11
10
  },
File without changes
File without changes
File without changes
File without changes