Skip to content

Commit

Permalink
chore: awslint (#1468)
Browse files Browse the repository at this point in the history
Introducing awslint: a linter for the AWS Construct Library APIs. The goal of the linter is to enforce the API design guidelines across the AWS Construct Library.

This commit includes a set of initial rules for the guidelines defined under design/aws-guidelines.md. 

- The `awslint` npm script has been added to all modules through pkglint.
- All violations have been captured through "exclude"s in `package.json` files so we can continue to lint from here.
  • Loading branch information
Elad Ben-Israel committed Jan 3, 2019
1 parent 0f8362d commit 9f45783
Show file tree
Hide file tree
Showing 116 changed files with 2,999 additions and 96 deletions.
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,28 @@ You can also do that per package:
$ lr pkglint
```

### awslint

**awslint** is a linter for the AWS Construct Library APIs. It is executed as a
part of the build of all AWS modules in the project and enforces the [AWS
Construct Library Design Guidelines](./design/aws-guidelines.md).

For more information about this tool, see the [awslint
README](./tools/awslint/README.md).

Generally speaking, if you make any changes which violate an awslint rule, build
will fail with appropriate messages. All rules are documented and explained in
the [guidelines](./design/aws-guidelines.md).

Here are a few useful commands:

* `npm run awslint` in every module will run __awslint__ for that module.
* `npm run awslint list` prints all rules (details and rationale in the guidelines doc)
* `lerna run awslint` will run __awslint__ in all modules.
* `lerna run awslint -- -i <RULE>` will run awslint throughout the repo and
evaluate only the rule specified [awslint README](./tools/awslint/README.md)
for details on include/exclude rule patterns.

## Development Workflows

### Full clean build
Expand Down
Loading

0 comments on commit 9f45783

Please sign in to comment.