@infinitetoken/eslint-config 0.1.4 → 0.1.6

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,8 +6,8 @@ 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 |
10
- | `@infinitetoken/eslint-config/npm-package` | Any published npm package with no React Native or server specifics (kits, Node plugins) |
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) |
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 |
13
13
  | `@infinitetoken/eslint-config/vue` | Vue/Nuxt apps; adds `vue-eslint-parser` + `eslint-plugin-vue`'s `flat/recommended`, no type-aware TS parsing (Nuxt's generated tsconfig makes that awkward) |
package/index.cjs CHANGED
@@ -15,7 +15,7 @@ module.exports = defineConfig([
15
15
  }
16
16
  },
17
17
  {
18
- ignores: ['dist/**', 'node_modules/**', 'lib/**', 'coverage/**', '**/*.js', '**/*.mjs']
18
+ ignores: ['dist/**', 'node_modules/**', 'lib/**', 'coverage/**', '**/*.js', '**/*.mjs', '.claude/worktrees/**']
19
19
  },
20
20
  ...tsEslint.configs.recommended,
21
21
  prettierRecommended,
package/npm-package.cjs CHANGED
@@ -4,6 +4,13 @@ const base = require('./index.cjs')
4
4
 
5
5
  module.exports = defineConfig([
6
6
  ...base,
7
+ {
8
+ // tsup.config.ts (used by packages that build via a config file rather than tsup CLI args)
9
+ // sits outside the package's own tsconfig `include` (scoped to src/ for a flat dist/
10
+ // declaration layout), which trips the type-aware parser's "file not found in project"
11
+ // error if linted. A no-op ignore for packages that don't have this file.
12
+ ignores: ['tsup.config.ts']
13
+ },
7
14
  packageJson.configs.recommended,
8
15
  {
9
16
  extends: [packageJson.configs.recommended],
@@ -12,5 +19,14 @@ module.exports = defineConfig([
12
19
  'package-json/order-properties': 'warn',
13
20
  'package-json/sort-collections': 'warn'
14
21
  }
22
+ },
23
+ {
24
+ // Test/mock files reasonably use `any` for casting fixtures and mocking modules — this
25
+ // should not be a reason to exclude them from linting altogether (formatting, import
26
+ // sorting, and every other rule still apply).
27
+ files: ['**/__tests__/**/*.ts', '**/__tests__/**/*.tsx', '**/__mocks__/**/*.ts', '**/__mocks__/**/*.tsx'],
28
+ rules: {
29
+ '@typescript-eslint/no-explicit-any': 'off'
30
+ }
15
31
  }
16
32
  ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitetoken/eslint-config",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Shared ESLint and Prettier configuration for InfiniteToken TypeScript packages",
5
5
  "keywords": [
6
6
  "config",
@@ -37,7 +37,6 @@
37
37
  "prettier.cjs"
38
38
  ],
39
39
  "scripts": {
40
- "ci": "npm run lint && npm test",
41
40
  "fix": "eslint . --fix",
42
41
  "lint": "eslint .",
43
42
  "release": "git push --follow-tags",
@@ -45,10 +44,12 @@
45
44
  "release:minor": "npm version minor && npm run release",
46
45
  "release:patch": "npm version patch && npm run release",
47
46
  "test": "node scripts/verify-exports.cjs",
48
- "preversion": "npm run ci"
47
+ "verify": "npm run lint && npm test",
48
+ "preversion": "npm run verify"
49
49
  },
50
50
  "prettier": "./prettier.cjs",
51
51
  "dependencies": {
52
+ "@infinitetoken/eslint-config": "^0.1.5",
52
53
  "@typescript-eslint/parser": "^8.59.3",
53
54
  "eslint-config-prettier": "^10.1.8",
54
55
  "eslint-plugin-package-json": "^1.0.0",