diff --git a/README.md b/README.md index 7389884..442d4ec 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ Install the meta package for all configs: bun add -D @lobehub/lint ``` +`@lobehub/lint`, `@lobehub/eslint-config`, and `create-lobe-lint` now require Node.js `>=22`. The other standalone config packages still support Node.js `>=18`. + Or install individual packages as needed: ```bash @@ -113,6 +115,8 @@ The fastest way to set up LobeHub lint configs in your project is using the CLI npx create-lobe-lint ``` +If you generate ESLint-related configs, use Node.js `>=22`. + This will start an interactive setup that auto-detects your project configuration (package manager, TypeScript, React framework) and generates the appropriate config files. ```bash @@ -223,7 +227,7 @@ export default semanticRelease; - **ESM only** - CommonJS is no longer supported - **ESLint 9** - Requires ESLint 9+ with Flat Config -- **Node.js 18** - Requires Node.js 18+ +- **Node.js 22 for ESLint** - `@lobehub/eslint-config`, `@lobehub/lint`, and `create-lobe-lint` now require Node.js 22+ ### Migration Steps diff --git a/package.json b/package.json index 112700f..b71702b 100644 --- a/package.json +++ b/package.json @@ -45,28 +45,28 @@ "*.{ts,tsx}": [ "prettier --parser=typescript --write", "stylelint --fix", - "eslint --fix" + "eslint --fix --no-warn-ignored" ] }, "devDependencies": { - "@commitlint/cli": "^19.6.1", - "@types/node": "^22.10.5", - "bumpp": "^10.4.1", - "commitlint": "^19.6.1", - "eslint": "^9.18.0", - "eslint-typegen": "^2.3.0", + "@commitlint/cli": "^20.5.0", + "@types/node": "^25.6.0", + "bumpp": "^11.0.1", + "commitlint": "^20.5.0", + "eslint": "^10.2.0", + "eslint-typegen": "^2.3.1", "husky": "^9.1.7", - "lint-staged": "^15.3.0", - "prettier": "^3.4.2", + "lint-staged": "^16.4.0", + "prettier": "^3.8.3", "remark-cli": "^12.0.1", - "stylelint": "^16.12.0", - "tsdown": "^0.9.2", - "typescript": "^5.7.3", - "vitest": "^3.0.4" + "stylelint": "^17.7.0", + "tsdown": "^0.21.8", + "typescript": "^6.0.2", + "vitest": "^4.1.4" }, - "packageManager": "pnpm@9.15.4", + "packageManager": "pnpm@10.33.0", "engines": { - "node": ">=18" + "node": ">=22" }, "pnpm": { "patchedDependencies": { diff --git a/packages/commitlint-config/package.json b/packages/commitlint-config/package.json index 080faca..91a1ca0 100644 --- a/packages/commitlint-config/package.json +++ b/packages/commitlint-config/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], diff --git a/packages/create-lint/README.md b/packages/create-lint/README.md index 6ffb2e6..7595376 100644 --- a/packages/create-lint/README.md +++ b/packages/create-lint/README.md @@ -10,7 +10,7 @@ CLI tool to setup LobeHub lint configurations -[Changelog](./CHANGELOG.md) · [Report Bug][issues-link] · [Request Feature][issues-link] +[Changelog](./CHANGELOG.md) · \[Report Bug]\[issues-link] · \[Request Feature]\[issues-link] @@ -46,6 +46,8 @@ Run the CLI with npx: npx create-lobe-lint ``` +If you generate ESLint-related configs, use Node.js `>=22`. The generated setup depends on `@lobehub/eslint-config`, which now requires Node.js `>=22`. + This will start an interactive setup process that: 1. Detects your project configuration diff --git a/packages/create-lint/package.json b/packages/create-lint/package.json index 45ee337..c89e28b 100644 --- a/packages/create-lint/package.json +++ b/packages/create-lint/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs" } }, - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./dist/index.mjs", + "types": "./dist/index.d.mts", "bin": { - "create-lobe-lint": "./dist/index.js" + "create-lobe-lint": "./dist/index.mjs" }, "files": [ "dist" @@ -35,13 +35,16 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@clack/prompts": "^0.8.0", + "@clack/prompts": "^1.2.0", "mri": "^1.2.0", "package-manager-detector": "^1.6.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" + }, + "devDependencies": { + "@types/node": "^25.6.0" }, "engines": { - "node": ">=18" + "node": ">=22" }, "publishConfig": { "access": "public", diff --git a/packages/create-lint/src/cli.ts b/packages/create-lint/src/cli.ts index 85e4a86..85e85d9 100644 --- a/packages/create-lint/src/cli.ts +++ b/packages/create-lint/src/cli.ts @@ -95,6 +95,13 @@ export async function run(options: CliOptions): Promise { process.exit(0); } + if (selections.tools.includes('eslint')) { + p.note( + 'Generated ESLint configs depend on @lobehub/eslint-config, which now requires Node.js >=22.', + 'Node Requirement', + ); + } + // Ask about ignore files generation selections.configureIgnoreFiles = await askIgnoreFilesConfiguration(options, selections); @@ -313,9 +320,11 @@ async function getManualSelections( process.exit(0); } + const tools = selectedTools as ConfigTool[]; + let reactFramework = detectedFramework; - if (selectedTools.includes('eslint')) { + if (tools.includes('eslint')) { if (options.react !== undefined) { reactFramework = parseReactFramework(options.react); } else if (!options.yes) { @@ -333,7 +342,7 @@ async function getManualSelections( excludeUnusedImportsAutofix: false, installDeps: options.install ?? true, reactFramework, - tools: selectedTools as ConfigTool[], + tools, }; } @@ -551,12 +560,15 @@ function getInstallCommandHint(pm: string, deps: string[]): string { } function printHelp(): void { - console.log(` + console.info(` ${pc.bold('create-lobe-lint')} - Setup LobeHub lint configurations ${pc.bold('Usage:')} npx create-lobe-lint [options] +${pc.bold('Note:')} + ESLint and @lobehub/lint configs require Node.js >=22 + ${pc.bold('Options:')} -p, --preset Quick setup with preset tools (ESLint, Prettier, Stylelint, Commitlint) -m, --manual Manually select tools to configure diff --git a/packages/create-lint/tests/e2e.test.ts b/packages/create-lint/tests/e2e.test.ts index de0ac59..4d8cac1 100644 --- a/packages/create-lint/tests/e2e.test.ts +++ b/packages/create-lint/tests/e2e.test.ts @@ -10,7 +10,7 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const packageRoot = path.resolve(__dirname, '..'); -const distEntry = path.join(packageRoot, 'dist', 'index.js'); +const distEntry = path.join(packageRoot, 'dist', 'index.mjs'); describe('create-lobe-lint E2E', () => { let tmpDir: string; diff --git a/packages/create-lint/tsconfig.json b/packages/create-lint/tsconfig.json index c364eab..5c1c976 100644 --- a/packages/create-lint/tsconfig.json +++ b/packages/create-lint/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "outDir": "dist", "rootDir": "src", - "lib": ["ES2023"] + "lib": ["ES2023"], + "types": ["node"] }, "extends": "../../tsconfig.base.json", "include": ["src"] diff --git a/packages/create-lint/tsdown.config.ts b/packages/create-lint/tsdown.config.ts index 8ac8b68..647b701 100644 --- a/packages/create-lint/tsdown.config.ts +++ b/packages/create-lint/tsdown.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ format: ['esm'], dts: true, clean: true, - target: 'node18', + target: 'node22', sourcemap: false, outputOptions: { banner: '#!/usr/bin/env node', diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index 69ef1f1..0618d78 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -35,6 +35,8 @@ ESLint Flat Config configuration for LobeHub projects pnpm add -D @lobehub/eslint-config eslint typescript ``` +Node.js `>=22` is required. + ## Usage Create `eslint.config.js` (or `eslint.config.mjs`) in your project root: @@ -261,7 +263,7 @@ function defineConfig(options?: Options, ...configs: FlatConfig[]): FlatConfigAr ## Requirements -- Node.js >= 18 +- Node.js >= 22 - ESLint >= 9.0.0 - TypeScript >= 5.0.0 (optional) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 58d9636..56af928 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], @@ -36,33 +36,33 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0", - "@eslint-react/eslint-plugin": "^2.12.4", + "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1", + "@eslint-react/eslint-plugin": "^4.2.3", "@eslint/js": "^10.0.1", - "@next/eslint-plugin-next": "^16.1.6", + "@next/eslint-plugin-next": "^16.2.3", "eslint-config-prettier": "^9.1.2", "eslint-import-resolver-typescript": "^4.4.4", - "eslint-mdx": "^3.6.2", - "eslint-plugin-import-x": "^4.16.1", + "eslint-mdx": "^3.7.0", + "eslint-plugin-import-x": "^4.16.2", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-mdx": "^3.6.2", - "eslint-plugin-perfectionist": "^5.5.0", + "eslint-plugin-perfectionist": "^5.8.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-compiler": "^19.1.0-rc.2", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-native": "^5.0.0", - "eslint-plugin-react-refresh": "^0.5.0", - "eslint-plugin-regexp": "^3.0.0", - "eslint-plugin-simple-import-sort": "^12.1.1", - "eslint-plugin-unicorn": "^63.0.0", + "eslint-plugin-react-refresh": "^0.5.2", + "eslint-plugin-regexp": "^3.1.0", + "eslint-plugin-simple-import-sort": "^13.0.0", + "eslint-plugin-unicorn": "^64.0.0", "eslint-plugin-unused-imports": "^4.4.1", - "eslint-plugin-yml": "^3.1.2", - "globals": "^17.3.0", - "typescript-eslint": "^8.55.0" + "eslint-plugin-yml": "^3.3.1", + "globals": "^17.5.0", + "typescript-eslint": "^8.58.2" }, "devDependencies": { - "eslint-typegen": "^2.3.0", - "glob": "^13.0.2" + "eslint-typegen": "^2.3.1", + "glob": "^13.0.6" }, "peerDependencies": { "eslint": "^10.0.0", @@ -74,7 +74,7 @@ } }, "engines": { - "node": ">=18" + "node": ">=22" }, "publishConfig": { "access": "public", diff --git a/packages/eslint-config/scripts/generate-eslint-typegen.mjs b/packages/eslint-config/scripts/generate-eslint-typegen.mjs index 9a24073..1b5d84e 100644 --- a/packages/eslint-config/scripts/generate-eslint-typegen.mjs +++ b/packages/eslint-config/scripts/generate-eslint-typegen.mjs @@ -21,8 +21,6 @@ import tseslint from 'typescript-eslint'; const outFile = path.resolve('src/eslint-typegen.d.ts'); -const eslintReactPlugins = eslintReact.configs['recommended-typescript']?.plugins ?? {}; - const dts = await pluginsToRulesDTS({ // ESLint plugins used by this package '@typescript-eslint': tseslint.plugin, @@ -39,13 +37,7 @@ const dts = await pluginsToRulesDTS({ 'jsx-a11y': jsxA11y, '@next/next': nextPlugin, '@eslint-community/eslint-comments': eslintComments, - - // @eslint-react registers multiple plugin namespaces - '@eslint-react': eslintReactPlugins['@eslint-react'], - '@eslint-react/dom': eslintReactPlugins['@eslint-react/dom'], - '@eslint-react/web-api': eslintReactPlugins['@eslint-react/web-api'], - '@eslint-react/hooks-extra': eslintReactPlugins['@eslint-react/hooks-extra'], - '@eslint-react/naming-convention': eslintReactPlugins['@eslint-react/naming-convention'], + '@eslint-react': eslintReact, }); const banner = `// This file is generated by scripts/generate-eslint-typegen.mjs\n// Do not edit manually.\n\n`; diff --git a/packages/eslint-config/src/configs/react.ts b/packages/eslint-config/src/configs/react.ts index 76a5de0..6103e40 100644 --- a/packages/eslint-config/src/configs/react.ts +++ b/packages/eslint-config/src/configs/react.ts @@ -2,7 +2,6 @@ import eslintReact from '@eslint-react/eslint-plugin'; import { defineConfig } from 'eslint/config'; import reactPlugin from 'eslint-plugin-react'; import reactCompiler from 'eslint-plugin-react-compiler'; -import reactHooksPlugin from 'eslint-plugin-react-hooks'; import reactRefresh from 'eslint-plugin-react-refresh'; import { GLOB_JSX, GLOB_TSX } from '../globs'; @@ -24,13 +23,10 @@ export function react(options: Options) { files, plugins: { 'react': reactPlugin, - 'react-hooks': reactHooksPlugin, 'react-refresh': reactRefresh, }, rules: { - ...reactHooksPlugin.configs.recommended.rules, - - '@eslint-react/dom/no-dangerously-set-innerhtml': 'off', + '@eslint-react/dom-no-dangerously-set-innerhtml': 'off', '@eslint-react/no-array-index-key': 'warn', '@eslint-react/no-leaked-conditional-rendering': 'off', diff --git a/packages/eslint-config/tests/fixtures/react/valid/dangerous-html.tsx b/packages/eslint-config/tests/fixtures/react/valid/dangerous-html.tsx new file mode 100644 index 0000000..8da30dc --- /dev/null +++ b/packages/eslint-config/tests/fixtures/react/valid/dangerous-html.tsx @@ -0,0 +1,9 @@ +// @ts-nocheck + +interface HtmlBlockProps { + html: string; +} + +export function HtmlBlock({ html }: HtmlBlockProps) { + return
; +} diff --git a/packages/eslint-config/tests/run-fixtures.test.ts b/packages/eslint-config/tests/run-fixtures.test.ts index 80c9afd..efe1928 100644 --- a/packages/eslint-config/tests/run-fixtures.test.ts +++ b/packages/eslint-config/tests/run-fixtures.test.ts @@ -29,6 +29,7 @@ describe('ESLint Config Fixtures', () => { ['typescript/valid/types.ts'], ['typescript/valid/type-imports.ts'], ['react/valid/component.tsx'], + ['react/valid/dangerous-html.tsx'], ['react/valid/sorted-props.tsx'], ['sorting/valid/sorted-keys.ts'], ['sorting/valid/sorted-enum.ts'], @@ -110,4 +111,13 @@ describe('ESLint Config Fixtures', () => { expect(hasExpectedError).toBe(true); }); }); + + it('react hooks violations should use @eslint-react rule ids', async () => { + const filePath = path.join(fixturesDir, 'react/invalid/hooks-order.tsx'); + const results = await eslint.lintFiles(filePath); + const ruleIds = results[0]?.messages.map((message) => message.ruleId) ?? []; + + expect(ruleIds).toContain('@eslint-react/rules-of-hooks'); + expect(ruleIds).not.toContain('react-hooks/rules-of-hooks'); + }); }); diff --git a/packages/lint/README.md b/packages/lint/README.md index c6ec0d9..b5f52d9 100644 --- a/packages/lint/README.md +++ b/packages/lint/README.md @@ -26,6 +26,8 @@ This is a convenience package that re-exports all LobeHub lint configurations. I pnpm add -D @lobehub/lint ``` +Node.js `>=22` is required because this meta package includes `@lobehub/eslint-config`. + You'll also need to install the peer dependencies: ```bash @@ -133,7 +135,7 @@ If you only need specific configurations, you can install them individually: ## Requirements -- Node.js >= 18 +- Node.js >= 22 ## License diff --git a/packages/lint/package.json b/packages/lint/package.json index 2cebe97..dbc56c9 100644 --- a/packages/lint/package.json +++ b/packages/lint/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], @@ -41,7 +41,7 @@ "@lobehub/stylelint-config": "workspace:*" }, "engines": { - "node": ">=18" + "node": ">=22" }, "publishConfig": { "access": "public", diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index 65422fb..1e6a7d3 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], @@ -33,9 +33,9 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "prettier-plugin-packagejson": "^2.5.6", - "prettier-plugin-sh": "^0.14.0", - "prettier-plugin-sort-json": "^4.1.0" + "prettier-plugin-packagejson": "^3.0.2", + "prettier-plugin-sh": "^0.18.1", + "prettier-plugin-sort-json": "^4.2.0" }, "peerDependencies": { "prettier": ">=3.0.0" diff --git a/packages/remarklint-config/package.json b/packages/remarklint-config/package.json index c148e94..7b67c50 100644 --- a/packages/remarklint-config/package.json +++ b/packages/remarklint-config/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], @@ -34,37 +34,37 @@ }, "dependencies": { "remark-frontmatter": "^5.0.0", - "remark-gfm": "^4.0.0", - "remark-lint": "^10.0.0", - "remark-lint-checkbox-content-indent": "^5.0.0", + "remark-gfm": "^4.0.1", + "remark-lint": "^10.0.1", + "remark-lint-checkbox-content-indent": "^5.0.1", "remark-lint-frontmatter-schema": "^3.15.4", "remark-lint-heading-whitespace": "^1.0.0", - "remark-lint-linebreak-style": "^4.0.0", - "remark-lint-list-item-indent": "^4.0.0", - "remark-lint-list-item-spacing": "^5.0.0", - "remark-lint-no-duplicate-headings-in-section": "^4.0.0", + "remark-lint-linebreak-style": "^4.0.1", + "remark-lint-list-item-indent": "^4.0.1", + "remark-lint-list-item-spacing": "^5.0.1", + "remark-lint-no-duplicate-headings-in-section": "^4.0.1", "remark-lint-no-empty-sections": "^4.0.0", - "remark-lint-no-empty-url": "^4.0.0", - "remark-lint-no-file-name-irregular-characters": "^3.0.0", - "remark-lint-no-heading-indent": "^5.0.0", - "remark-lint-no-heading-like-paragraph": "^4.0.0", - "remark-lint-no-paragraph-content-indent": "^5.0.0", - "remark-lint-no-reference-like-url": "^4.0.0", - "remark-lint-no-shell-dollars": "^4.0.0", - "remark-lint-no-tabs": "^4.0.0", - "remark-lint-no-unneeded-full-reference-image": "^4.0.0", - "remark-lint-no-unneeded-full-reference-link": "^4.0.0", - "remark-lint-ordered-list-marker-value": "^4.0.0", + "remark-lint-no-empty-url": "^4.0.1", + "remark-lint-no-file-name-irregular-characters": "^3.0.1", + "remark-lint-no-heading-indent": "^5.0.1", + "remark-lint-no-heading-like-paragraph": "^4.0.1", + "remark-lint-no-paragraph-content-indent": "^5.0.1", + "remark-lint-no-reference-like-url": "^4.0.1", + "remark-lint-no-shell-dollars": "^4.0.1", + "remark-lint-no-tabs": "^4.0.1", + "remark-lint-no-unneeded-full-reference-image": "^4.0.1", + "remark-lint-no-unneeded-full-reference-link": "^4.0.1", + "remark-lint-ordered-list-marker-value": "^4.0.1", "remark-lint-write-good": "^1.2.0", "remark-pangu": "^2.2.0", - "remark-preset-lint-consistent": "^6.0.0", - "remark-preset-lint-markdown-style-guide": "^6.0.0", - "remark-preset-lint-recommended": "^7.0.0", - "remark-remove-unused-definitions": "^2.0.0", - "remark-sort-definitions": "^2.0.0", + "remark-preset-lint-consistent": "^6.0.1", + "remark-preset-lint-markdown-style-guide": "^6.0.1", + "remark-preset-lint-recommended": "^7.0.1", + "remark-remove-unused-definitions": "^3.0.0", + "remark-sort-definitions": "^3.0.0", "remark-textr": "^6.1.0", "remark-toc": "^9.0.0", - "unist-util-visit": "^5.0.0" + "unist-util-visit": "^5.1.0" }, "peerDependencies": { "remark": ">=15.0.0", diff --git a/packages/semantic-release-config/package.json b/packages/semantic-release-config/package.json index 3d82c31..e8f1b07 100644 --- a/packages/semantic-release-config/package.json +++ b/packages/semantic-release-config/package.json @@ -16,24 +16,24 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" }, "./monorepo": { - "types": "./dist/monorepo.d.ts", - "import": "./dist/monorepo.js", + "types": "./dist/monorepo.d.mts", + "import": "./dist/monorepo.mjs", "require": "./dist/monorepo.cjs" }, "./changelog": { - "types": "./dist/changelog.d.ts", - "import": "./dist/changelog.js", + "types": "./dist/changelog.d.mts", + "import": "./dist/changelog.mjs", "require": "./dist/changelog.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], diff --git a/packages/semantic-release-config/src/index.ts b/packages/semantic-release-config/src/index.ts index 87b05df..0d24c82 100644 --- a/packages/semantic-release-config/src/index.ts +++ b/packages/semantic-release-config/src/index.ts @@ -1,3 +1,4 @@ +import type { Options as SemanticReleaseOptions } from 'semantic-release'; import { type Options } from 'semantic-release-config-gitmoji/lib/createConfig.js'; import { createConfig } from 'semantic-release-config-gitmoji/lib/createConfig.js'; @@ -69,8 +70,9 @@ export const options: Options = { ], } as Options; -const config = { +const config: SemanticReleaseOptions = { ...createConfig(options), }; +// eslint-disable-next-line no-restricted-syntax -- shareable semantic-release config entry export default config; diff --git a/packages/semantic-release-config/src/monorepo.ts b/packages/semantic-release-config/src/monorepo.ts index 2ee47e0..9d47bfd 100644 --- a/packages/semantic-release-config/src/monorepo.ts +++ b/packages/semantic-release-config/src/monorepo.ts @@ -1,9 +1,11 @@ +import type { Options as SemanticReleaseOptions } from 'semantic-release'; import { createConfig } from 'semantic-release-config-gitmoji/lib/createConfig.js'; import { options } from './index.js'; -const config = { +const config: SemanticReleaseOptions = { ...createConfig({ ...options, monorepo: true }), }; +// eslint-disable-next-line no-restricted-syntax -- shareable semantic-release config entry export default config; diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 846726b..b850753 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -16,14 +16,14 @@ "type": "module", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", "files": [ "dist" ], @@ -34,12 +34,12 @@ }, "dependencies": { "postcss-less": "^6.0.0", - "postcss-styled-syntax": "^0.7.0", - "stylelint-config-clean-order": "^7.0.0", - "stylelint-config-recommended": "^14.0.1", - "stylelint-config-standard": "^37.0.0", - "stylelint-less": "^3.0.1", - "stylelint-order": "^6.0.4", + "postcss-styled-syntax": "^0.7.1", + "stylelint-config-clean-order": "^8.0.1", + "stylelint-config-recommended": "^18.0.0", + "stylelint-config-standard": "^40.0.0", + "stylelint-less": "^4.1.0", + "stylelint-order": "^8.1.1", "stylelint-use-logical-spec": "^5.0.1" }, "peerDependencies": {