@@ -19,6 +19,7 @@ import angularTemplate from '@angular-eslint/template-parser';
1919import angularTemplatePlugin from '@angular-eslint/eslint-plugin-template' ;
2020import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin' ;
2121import typescriptParser from '@typescript-eslint/parser' ;
22+ import headers from 'eslint-plugin-headers' ;
2223import eslintConfigPrettier from 'eslint-config-prettier' ;
2324import importPlugin from 'eslint-plugin-import' ;
2425import nodePlugin from 'eslint-plugin-n' ;
@@ -51,10 +52,12 @@ export default [
5152 return newConfig ;
5253 } ) ,
5354 {
55+ files : [ '**/*.ts' , '**/*.js' ] ,
5456 plugins : {
5557 '@typescript-eslint' : typescriptEslintPlugin ,
5658 n : nodePlugin ,
5759 'unused-imports' : unusedImports ,
60+ headers,
5861 } ,
5962 languageOptions : {
6063 globals : {
@@ -104,6 +107,34 @@ export default [
104107 varsIgnorePattern : '^_' ,
105108 } ,
106109 ] ,
110+ 'headers/header-format' : [
111+ 'warn' ,
112+ {
113+ source : 'string' ,
114+ content : `Copyright (year) {company}.
115+
116+ Licensed under the Apache License, Version 2.0 (the 'License');
117+ you may not use this file except in compliance with the License.
118+ You may obtain a copy of the License at
119+
120+ https://www.apache.org/licenses/LICENSE-2.0
121+
122+ Unless required by applicable law or agreed to in writing, software
123+ distributed under the License is distributed on an 'AS IS' BASIS,
124+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125+ See the License for the specific language governing permissions and
126+ limitations under the License.` ,
127+ variables : {
128+ company : 'The Ground Authors' ,
129+ } ,
130+ patterns : {
131+ year : {
132+ pattern : '\\d{4}' ,
133+ defaultValue : '2026' ,
134+ } ,
135+ } ,
136+ } ,
137+ ] ,
107138 } ,
108139 } ,
109140 {
0 commit comments