feat: add quality gate tools and Node 22 setup

- Add type-coverage, knip, and dependency-cruiser for code quality
- Set up Node 22 (LTS) with .nvmrc file
- Configure knip for dead code detection across monorepo
- Configure dependency-cruiser with sensible architecture rules
- Add ts-reset for better TypeScript built-in types
- Fix Tabs component type exports for Storybook
- Recreate eslint react.js config that was missing
- Add quality gates documentation

All quality checks pass with 0 errors (only informational warnings).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-11-26 17:33:45 +10:00
parent 54f2c1a2d1
commit 378b068e38
11 changed files with 1292 additions and 141 deletions

View file

@ -1,28 +1,28 @@
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import baseConfig from './base.js';
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
import reactPlugin from "eslint-plugin-react";
import hooksPlugin from "eslint-plugin-react-hooks";
import baseConfig from "./base.js";
export default [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
react: reactPlugin,
'react-hooks': reactHooksPlugin,
'jsx-a11y': jsxA11y,
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
...jsxA11y.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
},
settings: {
react: {
version: 'detect',
},
},
},
...baseConfig,
{
files: ["**/*.{js,jsx,ts,tsx}"],
plugins: {
react: reactPlugin,
"react-hooks": hooksPlugin,
"jsx-a11y": jsxA11yPlugin,
},
rules: {
...reactPlugin.configs.recommended.rules,
...hooksPlugin.configs.recommended.rules,
...jsxA11yPlugin.configs.recommended.rules,
"react/react-in-jsx-scope": "off", // Not needed in Next.js/React 17+
"react/prop-types": "off", // Using TypeScript
},
settings: {
react: {
version: "detect",
},
},
},
];

View file

@ -1,6 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Tabs } from "@tpmjs/ui/Tabs/Tabs";
import type { Tab } from "@tpmjs/ui/Tabs/types";
import { type Tab, Tabs } from "@tpmjs/ui/Tabs/Tabs";
import { createElement } from "react";
const meta = {

View file

@ -1,12 +1,15 @@
import { cn } from "@tpmjs/utils/cn";
import { forwardRef } from "react";
import type { TabsProps } from "./types";
import type { Tab, TabsProps } from "./types";
import {
tabButtonVariants,
tabCountVariants,
tabsContainerVariants,
} from "./variants";
// Re-export types for consumers
export type { Tab, TabsProps };
/**
* Tabs component
*