knip 2.0.0-beta.2 → 2.0.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 CHANGED
@@ -63,7 +63,7 @@ file. Let's say you are using `.ts` files excusively and have all source files o
63
63
 
64
64
  ```json
65
65
  {
66
- "$schema": "https://unpkg.com/knip@next/schema.json",
66
+ "$schema": "https://unpkg.com/knip@2/schema.json",
67
67
  "entry": ["src/index.ts"],
68
68
  "project": ["src/**/*.ts"]
69
69
  }
@@ -332,6 +332,7 @@ Knip contains a growing list of plugins:
332
332
  - [Storybook][plugin-storybook]
333
333
  - [Stryker][plugin-stryker]
334
334
  - [Svelte][plugin-svelte]
335
+ - [Tailwind][plugin-tailwind]
335
336
  - [TypeDoc][plugin-typedoc]
336
337
  - [TypeScript][plugin-typescript]
337
338
  - [Vitest][plugin-vitest]
@@ -464,7 +465,7 @@ aliases. They can be configured manually:
464
465
 
465
466
  ```json
466
467
  {
467
- "$schema": "https://unpkg.com/knip@next/schema.json",
468
+ "$schema": "https://unpkg.com/knip@2/schema.json",
468
469
  "paths": {
469
470
  "@lib": ["./lib/index.ts"],
470
471
  "@lib/*": ["./lib/*"]
@@ -698,6 +699,7 @@ for the job. I'm motivated to make knip perfectly suited for the job of cutting
698
699
  [plugin-storybook]: ./src/plugins/storybook
699
700
  [plugin-stryker]: ./src/plugins/stryker
700
701
  [plugin-svelte]: ./src/plugins/svelte
702
+ [plugin-tailwind]: ./src/plugins/tailwind
701
703
  [plugin-typedoc]: ./src/plugins/typedoc
702
704
  [plugin-typescript]: ./src/plugins/typescript
703
705
  [plugin-vitest]: ./src/plugins/vitest
@@ -31,6 +31,7 @@ export * as sentry from './sentry/index.js';
31
31
  export * as storybook from './storybook/index.js';
32
32
  export * as stryker from './stryker/index.js';
33
33
  export * as svelte from './svelte/index.js';
34
+ export * as tailwind from './tailwind/index.js';
34
35
  export * as typedoc from './typedoc/index.js';
35
36
  export * as typescript from './typescript/index.js';
36
37
  export * as vitest from './vitest/index.js';
@@ -31,6 +31,7 @@ export * as sentry from './sentry/index.js';
31
31
  export * as storybook from './storybook/index.js';
32
32
  export * as stryker from './stryker/index.js';
33
33
  export * as svelte from './svelte/index.js';
34
+ export * as tailwind from './tailwind/index.js';
34
35
  export * as typedoc from './typedoc/index.js';
35
36
  export * as typescript from './typescript/index.js';
36
37
  export * as vitest from './vitest/index.js';
@@ -0,0 +1,5 @@
1
+ import type { IsPluginEnabledCallback } from '../../types/plugins.js';
2
+ export declare const NAME = "Tailwind";
3
+ export declare const ENABLERS: string[];
4
+ export declare const isEnabled: IsPluginEnabledCallback;
5
+ export declare const CONFIG_FILE_PATTERNS: string[];
@@ -0,0 +1,5 @@
1
+ import { hasDependency } from '../../util/plugin.js';
2
+ export const NAME = 'Tailwind';
3
+ export const ENABLERS = ['tailwindcss'];
4
+ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
5
+ export const CONFIG_FILE_PATTERNS = ['tailwind.config.js'];
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.0.0-beta.2";
1
+ export declare const version = "2.0.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '2.0.0-beta.2';
1
+ export const version = '2.0.0';
@@ -50,7 +50,7 @@ export declare class WorkspaceWorker {
50
50
  peerDependencies: PeerDependencies;
51
51
  installedBinaries: InstalledBinaries;
52
52
  referencedDependencies: ReferencedDependencies;
53
- enabledPlugins: ("typescript" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "typedoc" | "vitest" | "webpack" | "githubActions" | "lintStaged" | "npmPackageJsonLint" | "releaseIt" | "semanticRelease" | "svelte")[];
53
+ enabledPlugins: ("typescript" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "tailwind" | "typedoc" | "vitest" | "webpack" | "githubActions" | "lintStaged" | "npmPackageJsonLint" | "releaseIt" | "semanticRelease" | "svelte")[];
54
54
  }>;
55
55
  }
56
56
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://github.com/webpro/knip",
6
6
  "repository": "github:webpro/knip",
@@ -62,25 +62,25 @@
62
62
  "@jest/types": "29.5.0",
63
63
  "@npmcli/package-json": "3.0.0",
64
64
  "@release-it/bumper": "4.0.2",
65
- "@types/eslint": "8.21.2",
65
+ "@types/eslint": "8.21.3",
66
66
  "@types/js-yaml": "4.0.5",
67
67
  "@types/micromatch": "4.0.2",
68
68
  "@types/minimist": "1.2.2",
69
- "@types/node": "18.15.3",
69
+ "@types/node": "18.15.5",
70
70
  "@types/npmcli__map-workspaces": "3.0.0",
71
71
  "@types/webpack": "5.28.0",
72
- "@typescript-eslint/eslint-plugin": "5.55.0",
73
- "@typescript-eslint/parser": "5.55.0",
72
+ "@typescript-eslint/eslint-plugin": "5.56.0",
73
+ "@typescript-eslint/parser": "5.56.0",
74
74
  "c8": "7.13.0",
75
75
  "eslint": "8.36.0",
76
76
  "eslint-import-resolver-typescript": "3.5.3",
77
77
  "eslint-plugin-import": "2.27.5",
78
78
  "globstar": "1.0.0",
79
- "prettier": "2.8.4",
80
- "release-it": "15.9.0",
79
+ "prettier": "2.8.6",
80
+ "release-it": "15.9.1",
81
81
  "remark-cli": "11.0.0",
82
82
  "remark-preset-webpro": "0.0.2",
83
- "tsx": "3.12.5",
83
+ "tsx": "3.12.6",
84
84
  "type-fest": "3.6.1"
85
85
  },
86
86
  "engines": {
package/schema.json CHANGED
@@ -308,6 +308,10 @@
308
308
  "title": "svelte plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/svelte/README.md)",
309
309
  "$ref": "#/definitions/plugin"
310
310
  },
311
+ "tailwind": {
312
+ "title": "tailwind plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/tailwind/README.md)",
313
+ "$ref": "#/definitions/plugin"
314
+ },
311
315
  "typedoc": {
312
316
  "title": "typedoc plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/typedoc/README.md)",
313
317
  "$ref": "#/definitions/plugin"