This is an API to retrieve the nutritional information of a given food item.
MIT License
1
stars
1
forks
source link
As a contributor to the Nutrition Information API, I want continuous integration to automatically lint the code for readability, maintainability, and functionality errors, so I can automatically confirm the code changes meet coding styles specified in the lint rules. #24
As a contributor to the Nutrition Information API, I want continuous integration to automatically lint the code for readability, maintainability, and functionality errors, so I can automatically confirm the code changes meet coding styles specified in the lint rules.
Acceptance Criteria
Given a commit, when build runs, then it will automatically lint the code.
Given a build running, when the code does not pass the rules in the lint, then it fails the build
Given a build running, when the code passes the rules in the lint, then it does not fail the build
Test Plan
Testing for this issue will be done manually covering the acceptance criteria by running builds to match each of the criteria.
Dev Work
Install tslint and save as a dev depenedency $ npm install tslint --save-dev
Use tslint --init to generate an initial tslint.json config file. We will update this further in future tasks with rules from https://palantir.github.io/tslint/rules/ that we desire
Add the following npm script to package.json "lint": "tslint --project ./ --typecheck"
Update the npm test script to start with npm run-script lint
Test locally and apply fixes to pass the current set of rules
As a contributor to the Nutrition Information API, I want continuous integration to automatically lint the code for readability, maintainability, and functionality errors, so I can automatically confirm the code changes meet coding styles specified in the lint rules.
Acceptance Criteria
Test Plan Testing for this issue will be done manually covering the acceptance criteria by running builds to match each of the criteria.
Dev Work
$ npm install tslint --save-dev
tslint --init
to generate an initial tslint.json config file. We will update this further in future tasks with rules from https://palantir.github.io/tslint/rules/ that we desire"lint": "tslint --project ./ --typecheck"
npm run-script lint
Definition of Ready