Skip to content

Commit d73ae2b

Browse files
committed
chore: updating pre-commit repos
1 parent 08337c9 commit d73ae2b

File tree

4 files changed

+162
-56
lines changed

4 files changed

+162
-56
lines changed

.eslintrc.yaml

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

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88

99
- repo: https://github.com/pre-commit/mirrors-eslint
10-
rev: v8.56.0
10+
rev: v9.35.0
1111
hooks:
1212
- id: eslint
1313
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
1414
types: [ file ]
1515
args: ["--fix"]
1616

1717
- repo: https://github.com/pre-commit/mirrors-prettier
18-
rev: v2.5.1
18+
rev: v4.0.0-alpha.8
1919
hooks:
2020
- id: prettier
2121
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
2222
types: [ file ]
2323

2424
- repo: https://github.com/aws-samples/automated-security-helper
25-
rev: 'v2.0.1' # update with the latest-tagged version in the repository
25+
rev: 'v3.0.0' # update with the latest-tagged version in the repository
2626
hooks:
2727
- id: ash
2828
stages: [ manual ]
2929
# uncomment the line below if using "finch" on MacOS
3030
# args: [ "-f" ]
3131

3232
- repo: https://github.com/sbrunner/pre-commit-copyright
33-
rev: 1.2.1
33+
rev: 1.6.1
3434
hooks:
3535
- id: copyright
3636
name: update copyright

eslint.config.js

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*
2+
* Copyright 2024-2025 Amazon.com, Inc. or its affiliates.
3+
*/
4+
5+
const js = require("@eslint/js");
6+
const typescript = require("@typescript-eslint/eslint-plugin");
7+
const typescriptParser = require("@typescript-eslint/parser");
8+
const importPlugin = require("eslint-plugin-import");
9+
const jestPlugin = require("eslint-plugin-jest");
10+
const prettierPlugin = require("eslint-plugin-prettier");
11+
const promisePlugin = require("eslint-plugin-promise");
12+
const simpleImportSort = require("eslint-plugin-simple-import-sort");
13+
14+
module.exports = [
15+
// Base configuration
16+
js.configs.recommended,
17+
18+
// TypeScript files
19+
{
20+
files: ["**/*.ts", "**/*.tsx"],
21+
languageOptions: {
22+
parser: typescriptParser,
23+
parserOptions: {
24+
project: "./tsconfig.json",
25+
ecmaVersion: "latest",
26+
sourceType: "module"
27+
},
28+
globals: {
29+
// Node.js globals
30+
console: "readonly",
31+
process: "readonly",
32+
Buffer: "readonly",
33+
__dirname: "readonly",
34+
__filename: "readonly",
35+
global: "readonly",
36+
module: "readonly",
37+
require: "readonly",
38+
exports: "readonly",
39+
// Jest globals
40+
describe: "readonly",
41+
it: "readonly",
42+
test: "readonly",
43+
expect: "readonly",
44+
beforeEach: "readonly",
45+
afterEach: "readonly",
46+
beforeAll: "readonly",
47+
afterAll: "readonly",
48+
jest: "readonly"
49+
}
50+
},
51+
plugins: {
52+
"@typescript-eslint": typescript,
53+
import: importPlugin,
54+
promise: promisePlugin,
55+
prettier: prettierPlugin,
56+
jest: jestPlugin,
57+
"simple-import-sort": simpleImportSort
58+
},
59+
rules: {
60+
...typescript.configs.recommended.rules,
61+
...typescript.configs["recommended-requiring-type-checking"].rules,
62+
...importPlugin.configs.errors.rules,
63+
...importPlugin.configs.warnings.rules,
64+
...importPlugin.configs.typescript.rules,
65+
...promisePlugin.configs.recommended.rules,
66+
...prettierPlugin.configs.recommended.rules,
67+
...jestPlugin.configs.recommended.rules,
68+
...jestPlugin.configs.style.rules,
69+
70+
// Custom rules
71+
"import/default": "off",
72+
"import/order": "off",
73+
"simple-import-sort/imports": "error",
74+
"require-await": "off",
75+
"@typescript-eslint/no-unused-expressions": [
76+
"error",
77+
{ allowTernary: true }
78+
],
79+
"@typescript-eslint/no-unsafe-assignment": "warn",
80+
"@typescript-eslint/interface-name-prefix": "off",
81+
"@typescript-eslint/no-empty-interface": "off",
82+
"@typescript-eslint/no-inferrable-types": "off",
83+
"@typescript-eslint/no-non-null-assertion": "off",
84+
"@typescript-eslint/require-await": "error",
85+
"@typescript-eslint/no-empty-function": "off",
86+
"jest/no-done-callback": "off",
87+
"jest/no-conditional-expect": "off"
88+
},
89+
settings: {
90+
"import/resolver": {
91+
typescript: {
92+
alwaysTryTypes: true
93+
}
94+
}
95+
}
96+
},
97+
98+
// JavaScript files
99+
{
100+
files: ["**/*.js", "**/*.jsx"],
101+
languageOptions: {
102+
ecmaVersion: "latest",
103+
sourceType: "module",
104+
globals: {
105+
// Node.js globals
106+
console: "readonly",
107+
process: "readonly",
108+
Buffer: "readonly",
109+
__dirname: "readonly",
110+
__filename: "readonly",
111+
global: "readonly",
112+
module: "readonly",
113+
require: "readonly",
114+
exports: "readonly",
115+
// Jest globals
116+
describe: "readonly",
117+
it: "readonly",
118+
test: "readonly",
119+
expect: "readonly",
120+
beforeEach: "readonly",
121+
afterEach: "readonly",
122+
beforeAll: "readonly",
123+
afterAll: "readonly",
124+
jest: "readonly"
125+
}
126+
},
127+
plugins: {
128+
import: importPlugin,
129+
promise: promisePlugin,
130+
prettier: prettierPlugin,
131+
jest: jestPlugin,
132+
"simple-import-sort": simpleImportSort
133+
},
134+
rules: {
135+
...importPlugin.configs.errors.rules,
136+
...importPlugin.configs.warnings.rules,
137+
...promisePlugin.configs.recommended.rules,
138+
...prettierPlugin.configs.recommended.rules,
139+
...jestPlugin.configs.recommended.rules,
140+
...jestPlugin.configs.style.rules,
141+
142+
// Custom rules
143+
"import/default": "off",
144+
"import/order": "off",
145+
"simple-import-sort/imports": "error",
146+
"require-await": "off",
147+
"jest/no-done-callback": "off",
148+
"jest/no-conditional-expect": "off"
149+
}
150+
}
151+
];

lib/osml/data_catalog/dc_dataplane.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
import { Duration, RemovalPolicy, Size } from "aws-cdk-lib";
66
import { LambdaIntegration } from "aws-cdk-lib/aws-apigateway";
77
import { ISecurityGroup, Port, SecurityGroup } from "aws-cdk-lib/aws-ec2";
8-
import { AnyPrincipal, PolicyStatement, Role } from "aws-cdk-lib/aws-iam";
9-
import { IRole } from "aws-cdk-lib/aws-iam/lib/role";
8+
import {
9+
AnyPrincipal,
10+
IRole,
11+
PolicyStatement,
12+
Role
13+
} from "aws-cdk-lib/aws-iam";
1014
import {
1115
DockerImageFunction,
1216
Function,

0 commit comments

Comments
 (0)