Skip to content

Commit eb70628

Browse files
committed
chore: switch to @tony.ganchev/eslint-plugin-header
Hi, team, I noticed you are using _eslint-plugin-header_ with the schema-turn-off workaround to support ESLint 9. I forked _@tony.ganchev/eslint-plugin-header_ mid-2024 to address this issue and hoped it would be a temporary measure but since the original has not been updated for five years I decided to continue improving the new plugin and have been doing so for the last two years. Specific improvements include: - full JSON schema for validating the configuration. - fixed multiple bugs with the behavior of the plugin on Windows. - many other bug-fixes. - improved autofixing and error-reporting behavior. - added support for leading pragma comments before the header such as `@jest-environment`. I've sent PR proposals to other projects in the cloudscape-design space: - cloudscape-design/collection-hooks#136 - cloudscape-design/component-toolkit#200 - cloudscape-design/components#4308 - cloudscape-design/demos#243 - cloudscape-design/theming-core#148 Looking forward to your feedback.
1 parent a6e1e72 commit eb70628

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

eslint.config.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
import { includeIgnoreFile } from "@eslint/compat";
44
import eslint from "@eslint/js";
5-
import headerPlugin from "eslint-plugin-header";
5+
import headerPlugin from "@tony.ganchev/eslint-plugin-header";
66
import noUnsanitizedPlugin from "eslint-plugin-no-unsanitized";
77
import eslintPrettier from "eslint-plugin-prettier/recommended";
88
import reactPlugin from "eslint-plugin-react";
@@ -15,9 +15,6 @@ import tsEslint from "typescript-eslint";
1515

1616
import cloudscapeCommonRules from "@cloudscape-design/build-tools/eslint/index.js";
1717

18-
// https://github.com/Stuk/eslint-plugin-header/issues/57
19-
headerPlugin.rules.header.meta.schema = false;
20-
2118
export default tsEslint.config(
2219
includeIgnoreFile(path.resolve(".gitignore")),
2320
{

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"@size-limit/preset-small-lib": "^11.2.0",
8888
"@testing-library/jest-dom": "^5.16.5",
8989
"@testing-library/react": "^13.4.0",
90+
"@tony.ganchev/eslint-plugin-header": "^3.3.1",
9091
"@types/jest-image-snapshot": "^6.1.0",
9192
"@types/lodash": "^4.14.191",
9293
"@types/node": "^20.17.14",
@@ -97,7 +98,6 @@
9798
"chokidar-cli": "^3.0.0",
9899
"eslint": "^9.20.1",
99100
"eslint-config-prettier": "^10.1.5",
100-
"eslint-plugin-header": "^3.1.1",
101101
"eslint-plugin-import": "^2.32.0",
102102
"eslint-plugin-no-unsanitized": "^4.1.2",
103103
"eslint-plugin-prettier": "^5.2.3",

0 commit comments

Comments
 (0)