Skip to content

Commit

Permalink
Merge branch 'main' into redshift
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhcsun authored Jan 19, 2024
2 parents 4d6ea45 + 0cab968 commit 7426a43
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 180 deletions.
1 change: 0 additions & 1 deletion packages/awslint/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = {
ignorePatterns: ['*.js', '*.d.ts', 'node_modules/', '*.generated.ts'],
rules: {
'@aws-cdk/no-core-construct': ['error'],
'@aws-cdk/no-qualified-construct': ['error'],
'@aws-cdk/invalid-cfn-imports': ['error'],
// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
'@typescript-eslint/no-require-imports': ['error'],
Expand Down
1 change: 0 additions & 1 deletion tools/@aws-cdk/cdk-build-tools/config/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
ignorePatterns: ['*.js', '*.d.ts', 'node_modules/', '*.generated.ts'],
rules: {
'@aws-cdk/no-core-construct': ['error'],
'@aws-cdk/no-qualified-construct': ['error'],
'@aws-cdk/invalid-cfn-imports': ['error'],
'@aws-cdk/no-literal-partition': ['error'],
// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
Expand Down
6 changes: 6 additions & 0 deletions tools/@aws-cdk/eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ Eslint plugin for the CDK repository. Contains rules that need to be applied spe

## Rules

* `invalid-cfn-imports`: Ensures that imports of `Cfn<Resource>` L1 resources come from the stable
`aws-cdk-lib` package and not the alpha packages. Rule only applies to alpha modules.

* `no-core-construct`: Forbid the use of `Construct` and `IConstruct` from the "@aws-cdk/core" module.
Instead use `Construct` and `IConstruct` from the "constructs" module.
Rule only applies to typescript files under the `test/` folder.

* `no-literal-partition`: Forbids the use of literal partitions (usually `aws`). Instead, use
`Aws.PARTITION` to ensure that the code works for other partitions too.

## How to add new rules

* Make a new file in `lib/rules`. It should export one function called `create`. The
Expand Down
1 change: 0 additions & 1 deletion tools/@aws-cdk/eslint-plugin/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const rules = {
'no-core-construct': require('./rules/no-core-construct'),
'no-qualified-construct': require('./rules/no-qualified-construct'),
'invalid-cfn-imports': require('./rules/invalid-cfn-imports'),
'no-literal-partition': require('./rules/no-literal-partition'),
};
134 changes: 0 additions & 134 deletions tools/@aws-cdk/eslint-plugin/lib/rules/no-qualified-construct.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tools/@aws-cdk/pkglint/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = {
ignorePatterns: ['*.js', '*.d.ts', 'node_modules/', '*.generated.ts'],
rules: {
'@aws-cdk/no-core-construct': ['error'],
'@aws-cdk/no-qualified-construct': ['error'],
'@aws-cdk/invalid-cfn-imports': ['error'],
// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
'@typescript-eslint/no-require-imports': ['error'],
Expand Down

0 comments on commit 7426a43

Please sign in to comment.