22// SPDX-License-Identifier: Apache-2.0
33import { includeIgnoreFile } from '@eslint/compat' ;
44import eslint from '@eslint/js' ;
5- import headerPlugin from 'eslint-plugin-header' ;
5+ import headerPlugin from '@tony.ganchev/ eslint-plugin-header' ;
66import jestPlugin from 'eslint-plugin-jest' ;
77import noUnsanitizedPlugin from 'eslint-plugin-no-unsanitized' ;
88import eslintPrettier from 'eslint-plugin-prettier/recommended' ;
@@ -18,9 +18,6 @@ import cloudscapeCommonRules from '@cloudscape-design/build-tools/eslint/index.j
1818
1919import cloudscapeComponentsRules from './build-tools/eslint/index.js' ;
2020
21- // https://github.com/Stuk/eslint-plugin-header/issues/57
22- headerPlugin . rules . header . meta . schema = false ;
23-
2421export default tsEslint . config (
2522 includeIgnoreFile ( path . resolve ( '.gitignore' ) ) ,
2623 {
@@ -112,8 +109,23 @@ export default tsEslint.config(
112109 'require-await' : 'error' ,
113110 'header/header' : [
114111 'error' ,
115- 'line' ,
116- [ ' Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.' , ' SPDX-License-Identifier: Apache-2.0' ] ,
112+ {
113+ header : {
114+ commentType : 'line' ,
115+ lines : [
116+ ' Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.' ,
117+ ' SPDX-License-Identifier: Apache-2.0' ,
118+ ] ,
119+ } ,
120+ leadingComments : {
121+ comments : [
122+ {
123+ commentType : 'block' ,
124+ lines : [ '*' , ' * @jest-environment node' , ' ' ] ,
125+ } ,
126+ ] ,
127+ } ,
128+ } ,
117129 ] ,
118130 'no-restricted-syntax' : [
119131 'error' ,
0 commit comments