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 cf064e9..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", @@ -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" }, 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[];