diff --git a/.changeset/no-default-exported-function.md b/.changeset/no-default-exported-function.md deleted file mode 100644 index 49876af..0000000 --- a/.changeset/no-default-exported-function.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@gaia-react/lint": patch ---- - -Close `prefer-arrow-functions` upstream gap for `export default function NamedFn(){}` via `no-restricted-syntax` selector. - -The `eslint-plugin-prefer-arrow-functions` plugin has a hardcoded exemption (`guard.js:hasNameAndIsExportedAsDefaultExport`) that silently passes named default-exported declarations regardless of `allowNamedFunctions` setting. This release adds a `no-restricted-syntax` rule with selector `ExportDefaultDeclaration > FunctionDeclaration` to flag the pattern. Convert to `const Name = () => {}; export default Name;` instead. Ignored on `**/*.d.ts` since ambient declarations have no body to convert. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8187259..d1b422d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # @gaia-react/lint +## 1.1.1 + +### Patch Changes + +- [#6](https://github.com/gaia-react/lint/pull/6) [`efebb80`](https://github.com/gaia-react/lint/commit/efebb803e690076133ab1c0c9f9ab5adb8ee9cd4) Thanks [@stevensacks](https://github.com/stevensacks)! - Close `prefer-arrow-functions` upstream gap for `export default function NamedFn(){}` via `no-restricted-syntax` selector. + + The `eslint-plugin-prefer-arrow-functions` plugin has a hardcoded exemption (`guard.js:hasNameAndIsExportedAsDefaultExport`) that silently passes named default-exported declarations regardless of `allowNamedFunctions` setting. This release adds a `no-restricted-syntax` rule with selector `ExportDefaultDeclaration > FunctionDeclaration` to flag the pattern. Convert to `const Name = () => {}; export default Name;` instead. Ignored on `**/*.d.ts` since ambient declarations have no body to convert. + ## 1.1.0 ### Minor Changes diff --git a/package.json b/package.json index 8c282a6..37e543a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gaia-react/lint", - "version": "1.1.0", + "version": "1.1.1", "description": "GAIA's opinionated lint configuration.", "type": "module", "main": "./dist/index.js",