diff options
| author | Tyler <[email protected]> | 2025-04-20 17:16:25 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-20 17:16:25 -0700 |
| commit | d55168f51ff989f6818ce386ae5ab7f383b9d3e3 (patch) | |
| tree | 65df07b5deac7024961839823583b6e61306cebd /eslint.config.js | |
| parent | 305ed41b880e10f8c04404ca7e35edfb9cc5392f (diff) | |
add linter for checking license headers (and eslint --fix target to match, and fix missing license headers while we're here) (#62)
Diffstat (limited to 'eslint.config.js')
| -rw-r--r-- | eslint.config.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js index ae924cc7..a846d22d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -12,6 +12,7 @@ import reactHooks from 'eslint-plugin-react-hooks'; import prettierConfig from 'eslint-config-prettier'; import importPlugin from 'eslint-plugin-import'; import globals from 'globals'; +import licenseHeader from 'eslint-plugin-license-header'; export default tseslint.config( { @@ -142,6 +143,24 @@ export default tseslint.config( 'default-case': 'error', }, }, + { + files: ['./**/*.{tsx,ts,js}'], + plugins: { + 'license-header': licenseHeader, + }, + rules: { + 'license-header/header': [ + 'error', + [ + '/**', + ' * @license', + ' * Copyright 2025 Google LLC', + ' * SPDX-License-Identifier: Apache-2.0', + ' */', + ], + ], + }, + }, // Prettier config must be last prettierConfig, ); |
