|
1 | 1 | { |
2 | 2 | "name": "@tailscale/tailscale-ui-components", |
3 | | - "version": "0.0.3", |
| 3 | + "version": "0.0.4", |
4 | 4 | "author": "Tailscale", |
5 | 5 | "license": "BSD-3-Clause", |
6 | 6 | "main": "dist/tailscale-ui-components.umd.js", |
7 | 7 | "module": "dist/tailscale-ui-components.es.js", |
8 | 8 | "types": "dist/index.d.ts", |
9 | 9 | "type": "module", |
10 | 10 | "files": [ |
11 | | - "dist" |
| 11 | + "dist", |
| 12 | + "tailwind.preset.js" |
12 | 13 | ], |
13 | 14 | "exports": { |
14 | 15 | ".": { |
15 | 16 | "types": "./dist/index.d.ts", |
16 | 17 | "import": "./dist/tailscale-ui-components.es.js", |
17 | 18 | "require": "./dist/tailscale-ui-components.umd.js" |
| 19 | + }, |
| 20 | + "./tailwind.preset": { |
| 21 | + "import": "./tailwind.preset.cjs", |
| 22 | + "require": "./tailwind.preset.cjs", |
| 23 | + "default": "./tailwind.preset.cjs" |
18 | 24 | } |
19 | 25 | }, |
20 | 26 | "publishConfig": { |
|
33 | 39 | "@radix-ui/react-popover": "^1.1.14", |
34 | 40 | "@radix-ui/react-select": "^2.2.5", |
35 | 41 | "@radix-ui/react-tabs": "^1.1.12", |
| 42 | + "@radix-ui/react-toast": "^1.2.15", |
36 | 43 | "@radix-ui/react-toggle-group": "^1.1.10", |
37 | 44 | "@radix-ui/react-tooltip": "^1.2.7", |
38 | 45 | "classnames": "^2.5.1", |
39 | | - "date-fns": "^4.1.0", |
| 46 | + "date-fns": "^2.28.0", |
40 | 47 | "date-fns-tz": "^2.0.1", |
41 | 48 | "downshift": "^9.0.10", |
42 | 49 | "lucide-react": "^0.536.0" |
|
51 | 58 | "@types/node": "^24.2.0", |
52 | 59 | "@types/react": "^18.2.0", |
53 | 60 | "@types/react-dom": "^18.2.0", |
| 61 | + "@typescript-eslint/eslint-plugin": "^6.2.1", |
| 62 | + "@typescript-eslint/parser": "^6.2.1", |
54 | 63 | "@vitejs/plugin-react-swc": "^3.11.0", |
55 | 64 | "@vitest/browser": "^3.2.4", |
56 | 65 | "@vitest/coverage-v8": "^3.2.4", |
57 | 66 | "autoprefixer": "^10.4.21", |
| 67 | + "eslint": "^8.23.1", |
| 68 | + "eslint-config-react-app": "^7.0.1", |
| 69 | + "eslint-plugin-curly-quotes": "^1.0.4", |
| 70 | + "eslint-plugin-unicorn": "^41.0.0", |
58 | 71 | "playwright": "^1.54.2", |
59 | 72 | "postcss": "^8.5.6", |
| 73 | + "prettier": "^2.5.1", |
| 74 | + "prettier-plugin-organize-imports": "^3.2.2", |
60 | 75 | "react": "^18.2.0", |
61 | 76 | "react-dom": "^18.2.0", |
62 | 77 | "storybook": "^9.1.1", |
|
70 | 85 | "scripts": { |
71 | 86 | "build": "vite build && tsc --emitDeclarationOnly", |
72 | 87 | "storybook": "storybook dev -p 6006", |
73 | | - "build-storybook": "storybook build" |
| 88 | + "build-storybook": "storybook build", |
| 89 | + "format": "prettier --write 'src/**/*.{ts,tsx}'", |
| 90 | + "format-check": "prettier --check 'src/**/*.{ts,tsx}'", |
| 91 | + "lint": "tsc --noEmit && eslint 'src/**/*.{ts,tsx,js,jsx}' --fix --max-warnings=0" |
| 92 | + }, |
| 93 | + "eslintConfig": { |
| 94 | + "extends": [ |
| 95 | + "react-app", |
| 96 | + "plugin:unicorn/recommended" |
| 97 | + ], |
| 98 | + "plugins": [ |
| 99 | + "curly-quotes", |
| 100 | + "react-hooks" |
| 101 | + ], |
| 102 | + "rules": { |
| 103 | + "unicorn/catch-error-name": "off", |
| 104 | + "unicorn/consistent-function-scoping": "off", |
| 105 | + "unicorn/consistent-destructuring": "off", |
| 106 | + "unicorn/expiring-todo-comments": "off", |
| 107 | + "unicorn/prefer-json-parse-buffer": "off", |
| 108 | + "unicorn/prefer-object-from-entries": "off", |
| 109 | + "unicorn/prefer-spread": "off", |
| 110 | + "unicorn/prevent-abbreviations": "off", |
| 111 | + "unicorn/no-array-callback-reference": "off", |
| 112 | + "unicorn/no-array-for-each": "off", |
| 113 | + "unicorn/no-array-reduce": "off", |
| 114 | + "unicorn/no-nested-ternary": "off", |
| 115 | + "unicorn/no-null": "off", |
| 116 | + "unicorn/no-useless-undefined": [ |
| 117 | + "error", |
| 118 | + { |
| 119 | + "checkArguments": false |
| 120 | + } |
| 121 | + ], |
| 122 | + "unicorn/numeric-separators-style": "off", |
| 123 | + "curly-quotes/no-straight-quotes": "warn", |
| 124 | + "react-hooks/rules-of-hooks": "error", |
| 125 | + "react-hooks/exhaustive-deps": "error", |
| 126 | + "@typescript-eslint/no-restricted-imports": [ |
| 127 | + "error", |
| 128 | + { |
| 129 | + "paths": [ |
| 130 | + { |
| 131 | + "name": "lucide-react", |
| 132 | + "message": "Use `src/ui/icons` instead of `lucide-react`" |
| 133 | + } |
| 134 | + ] |
| 135 | + } |
| 136 | + ], |
| 137 | + "no-restricted-imports": [ |
| 138 | + "error", |
| 139 | + { |
| 140 | + "paths": [ |
| 141 | + { |
| 142 | + "name": "lucide-react", |
| 143 | + "importNames": [ |
| 144 | + "*" |
| 145 | + ], |
| 146 | + "message": "Please import only the specific icons you need from 'lucide-react' to enable tree-shaking." |
| 147 | + } |
| 148 | + ] |
| 149 | + } |
| 150 | + ] |
| 151 | + } |
| 152 | + }, |
| 153 | + "prettier": { |
| 154 | + "semi": false, |
| 155 | + "printWidth": 80 |
74 | 156 | } |
75 | 157 | } |
0 commit comments