From 4765dd52e2a5eb0ecde40fb534a6f3ffa09e5106 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 3 May 2024 15:06:12 +0200 Subject: [PATCH 1/3] fix(markdown): override default rules --- src/eslint.config.ts | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/eslint.config.ts b/src/eslint.config.ts index 0da160f..249d0cc 100644 --- a/src/eslint.config.ts +++ b/src/eslint.config.ts @@ -53,6 +53,24 @@ export default function unjsPreset( ...(tseslint.configs.recommended as Linter.FlatConfig[]), // https://github.com/sindresorhus/eslint-plugin-unicorn eslintPluginUnicorn.configs["flat/recommended"] as Linter.FlatConfig, + + // Preset overrides + { rules: rules as Linter.RulesRecord }, + { + languageOptions: { + globals: Object.fromEntries( + Object.keys(globals).flatMap((group) => + Object.keys(globals[group as keyof typeof globals]).map((k) => [ + k, + true, + ]), + ), + ), + }, + }, + { ignores: ["dist", "coverage", ...(config.ignores || [])] }, + + // Markdown // https://www.npmjs.com/package/eslint-plugin-markdown config.markdown !== false && { plugins: { markdown } }, config.markdown !== false && { @@ -68,24 +86,12 @@ export default function unjsPreset( "padded-blocks": 0, "@typescript-eslint/no-unused-vars": 0, "no-empty-pattern": 0, + "no-redeclare": 0, + "no-import-assign": 0, ...config.markdown?.rules, }) as any, }, - // Preset overrides - { rules: rules as Linter.RulesRecord }, - { - languageOptions: { - globals: Object.fromEntries( - Object.keys(globals).flatMap((group) => - Object.keys(globals[group as keyof typeof globals]).map((k) => [ - k, - true, - ]), - ), - ), - }, - }, - { ignores: ["dist", "coverage", ...(config.ignores || [])] }, + // User overrides ...(userConfigs as Linter.FlatConfig[]), ].filter(Boolean) as Linter.FlatConfig[]; From a98c465900c791b10d2977f37b1d37cd3edd8ab0 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 3 May 2024 15:07:20 +0200 Subject: [PATCH 2/3] chore: remove prerelease script (pnpm why ?!) --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index cf064e9..458a84d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "lint:fix": "eslint . --fix && prettier -w src", "prepack": "pnpm build", "release": "pnpm test && changelogen --release && npm publish && git push --follow-tags", - "prerelease": "pnpm test && changelogen --release --prerelease && npm publish --tag rc && git push --follow-tags", "test": "pnpm lint", "typegen": "node ./scripts/typegen.mjs" }, From a8de1be9ac047ff2fa950b974fb765439be367be Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 3 May 2024 15:07:45 +0200 Subject: [PATCH 3/3] chore(release): v0.3.1 --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c5b363..5377cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # Changelog +## v0.3.1 + +[compare changes](https://github.com/unjs/eslint-config/compare/v0.3.0...v0.3.1) + +### 🩹 Fixes + +- **markdown:** Override default rules ([4765dd5](https://github.com/unjs/eslint-config/commit/4765dd5)) + +### 🏡 Chore + +- Remove prerelease script (pnpm why ?!) ([a98c465](https://github.com/unjs/eslint-config/commit/a98c465)) + +### ❤️ Contributors + +- Pooya Parsa ([@pi0](http://github.com/pi0)) + ## v0.3.0 [compare changes](https://github.com/unjs/eslint-config/compare/v0.3.0-rc.8...v0.3.0) diff --git a/package.json b/package.json index 458a84d..b3cbd71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-unjs", - "version": "0.3.0", + "version": "0.3.1", "description": "ESLint config for unjs projects", "repository": "unjs/eslint-config", "license": "MIT",