Skip to content

Commit d76dee5

Browse files
authored
chore: Upgrade dependencies (#55)
1 parent 4e3536e commit d76dee5

File tree

8 files changed

+1732
-1915
lines changed

8 files changed

+1732
-1915
lines changed

.eslintrc

Lines changed: 0 additions & 38 deletions
This file was deleted.

.husky/commit-msg

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
52

63
# Section for git-secrets
7-
84
if ! command -v git-secrets > /dev/null 2>&1
95
then
106
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
@@ -16,4 +12,4 @@ git-secrets --register-aws > /dev/null
1612

1713
echo "Running git-secrets..."
1814
# Scans the commit message.
19-
git-secrets --commit_msg_hook -- "$@"
15+
git-secrets --commit_msg_hook -- "$@"

.husky/pre-commit

100755100644
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
32

43
npx --no-install lint-staged
54

6-
7-
85
# Section for git-secrets
9-
106
if ! command -v git-secrets > /dev/null 2>&1
117
then
128
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
@@ -18,4 +14,4 @@ git-secrets --register-aws > /dev/null
1814

1915
echo "Running git-secrets..."
2016
# Scans all files that are about to be committed.
21-
git-secrets --pre_commit_hook -- "$@"
17+
git-secrets --pre_commit_hook -- "$@"

.husky/prepare-commit-msg

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
52

63
# Section for git-secrets
7-
84
if ! command -v git-secrets > /dev/null 2>&1
95
then
106
echo "git-secrets is not installed. Please run 'brew install git-secrets' or visit https://github.com/awslabs/git-secrets#installing-git-secrets"
@@ -16,4 +12,4 @@ git-secrets --register-aws > /dev/null
1612

1713
echo "Running git-secrets..."
1814
# Determines if merging in a commit will introduce tainted history.
19-
git-secrets --prepare_commit_msg_hook -- "$@"
15+
git-secrets --prepare_commit_msg_hook -- "$@"

eslint.config.mjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
import path from 'node:path';
4+
import eslint from '@eslint/js';
5+
import { includeIgnoreFile } from '@eslint/compat';
6+
import tseslint from 'typescript-eslint';
7+
import eslintPrettier from 'eslint-plugin-prettier/recommended';
8+
import unicornPlugin from 'eslint-plugin-unicorn';
9+
import headerPlugin from 'eslint-plugin-header';
10+
11+
// https://github.com/Stuk/eslint-plugin-header/issues/57
12+
headerPlugin.rules.header.meta.schema = false;
13+
14+
export default tseslint.config(
15+
includeIgnoreFile(path.resolve('.gitignore')),
16+
eslint.configs.recommended,
17+
tseslint.configs.recommended,
18+
eslintPrettier,
19+
{
20+
files: ['**/*.{js,mjs,ts}'],
21+
languageOptions: {
22+
globals: {
23+
console: true,
24+
},
25+
},
26+
plugins: {
27+
unicorn: unicornPlugin,
28+
header: headerPlugin,
29+
},
30+
rules: {
31+
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
32+
'@typescript-eslint/interface-name-prefix': 'off',
33+
'@typescript-eslint/no-explicit-any': 'off',
34+
'@typescript-eslint/no-non-null-assertion': 'off',
35+
'unicorn/filename-case': 'error',
36+
curly: 'error',
37+
eqeqeq: 'error',
38+
'no-return-await': 'error',
39+
'require-await': 'error',
40+
'header/header': [
41+
'error',
42+
'line',
43+
[' Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.', ' SPDX-License-Identifier: Apache-2.0'],
44+
],
45+
},
46+
},
47+
);

0 commit comments

Comments
 (0)