tslint-teamcity-reporter
Advanced tools
Comparing version 2.0.0 to 3.0.1
@@ -1,1 +0,8 @@ | ||
module.exports = require(require('path').join(__dirname, 'TSHintTeamcityFormatter.js')); | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.Formatter = void 0; | ||
var _Reporter = require("./lib/Reporter"); | ||
exports.Formatter = _Reporter.Formatter; |
115
package.json
{ | ||
"name": "tslint-teamcity-reporter", | ||
"version": "2.0.0", | ||
"version": "3.0.1", | ||
"description": "A TSLint formatter/reporter for use in TeamCity which groups by files using TeamCity Test Suite", | ||
"main": "index.js", | ||
"main": "./index.js", | ||
"types": "./index.d.ts", | ||
"scripts": { | ||
"test": "grunt test" | ||
"prepublishOnly": "npm-run-all -s validate build", | ||
"validate": "npm-run-all -p lint test", | ||
"dev": "npm-run-all -p dev:*", | ||
"dev:babel": "babel ./src -x \".ts\" --out-dir ./ --watch", | ||
"dev:ts": "tsc --noEmit --allowJs --watch", | ||
"build": "npm-run-all -s clean build:*", | ||
"build:babel": "babel ./src -x \".ts\" -x \".js\" --out-dir ./", | ||
"build:ts": "tsc -p ./tsconfig.build.json", | ||
"test": "cross-env NODE_ENV=test nyc --all mocha \"./test/**/*.spec.{ts,js}\"", | ||
"test:dev": "mocha -w --watch-extensions ts,js \"./test/**/*.spec.{ts,js}\"", | ||
"clean": "npm-run-all clean:*", | ||
"clean:test": "shx rm -rf coverage .nyc_output", | ||
"clean:npm": "shx rm -rf lib tmp index.js", | ||
"lint": "npm-run-all lint:*", | ||
"lint:js": "eslint src --ext .js --cache", | ||
"lint:ts": "tslint src/**/*.ts -c tslint.json -p tsconfig.json -t verbose", | ||
"prettify": "prettier --write \"src/**/*.{js,ts,json}\"", | ||
"precommit": "lint-staged", | ||
"demo": "tslint test/_fixtures/*.ts -t ./index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ThaNarie/tslint-teamcity-reporter.git" | ||
"lint-staged": { | ||
"linters": { | ||
"src/**/*.{js,ts,json}": [ | ||
"prettier --write", | ||
"git add" | ||
], | ||
"src/**/*.js": [ | ||
"npm run lint:js" | ||
], | ||
"src/**/*.ts": [ | ||
"npm run lint:ts" | ||
] | ||
} | ||
}, | ||
"pre-push": [ | ||
"validate" | ||
], | ||
"author": "Arjan van Wijk <thanarie@gmail.com> (thanarie)", | ||
"homepage": "https://www.thanarie.nl/", | ||
"license": "MIT", | ||
"keywords": [ | ||
"tslint", | ||
"teamcity", | ||
"tslint", | ||
"reporter", | ||
"formatter", | ||
"grunt", | ||
"gruntplugin" | ||
"formatter" | ||
], | ||
"author": "Tha Narie <thanarie@gmail.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"mail": "thanarie@gmail.com", | ||
"url": "https://github.com/ThaNarie/tslint-teamcity-reporter/issues" | ||
}, | ||
"homepage": "https://github.com/ThaNarie/tslint-teamcity-reporter", | ||
"peerDependencies": { | ||
"tslint": "^3.0.0 || >=3.0.0-dev || >=3.1.0-dev || >=3.2.0-dev || >=3.3.0-dev" | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ThaNarie/tslint-teamcity-reporter.git" | ||
}, | ||
"devDependencies": { | ||
"grunt-cli": "~0.1.13", | ||
"grunt": "~0.4.5", | ||
"grunt-tslint": "~3.0.1", | ||
"grunt-contrib-jshint": "0.6.4", | ||
"grunt-run-grunt": "~0.1.0", | ||
"grunt-mocha-test": "~0.7.0", | ||
"grunt-contrib-clean": "~0.5.0", | ||
"grunt-continue": "0.0.1", | ||
"chai": "~1.8.1", | ||
"mocha-unfunk-reporter": "~0.4.0" | ||
"@babel/cli": "^7.0.0-beta.35", | ||
"@babel/core": "^7.0.0-beta.35", | ||
"@babel/plugin-transform-runtime": "^7.0.0-beta.35", | ||
"@babel/preset-env": "^7.0.0-beta.35", | ||
"@babel/preset-stage-3": "^7.0.0-beta.35", | ||
"@babel/preset-typescript": "^7.0.0-beta.35", | ||
"@babel/register": "^7.0.0-beta.35", | ||
"@types/chai": "^4.0.10", | ||
"@types/mocha": "^2.2.44", | ||
"@types/sinon": "^4.1.2", | ||
"@types/sinon-chai": "^2.7.29", | ||
"babel-eslint": "^8.0.3", | ||
"babel-plugin-istanbul": "^4.1.5", | ||
"chai": "^4.1.2", | ||
"coveralls": "^2.11.6", | ||
"cross-env": "^5.1.1", | ||
"eslint": "^4.13.1", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-friendly-formatter": "^3.0.0", | ||
"eslint-import-resolver-typescript": "^1.0.2", | ||
"eslint-plugin-chai-friendly": "^0.4.1", | ||
"eslint-plugin-import": "^2.8.0", | ||
"eslint-plugin-prettier": "^2.4.0", | ||
"husky": "^0.14.3", | ||
"jsdom": "^11.5.1", | ||
"jsdom-global": "^3.0.2", | ||
"lint-staged": "^6.0.0", | ||
"mocha": "^4.0.1", | ||
"npm-run-all": "^4.1.2", | ||
"nyc": "^11.3.0", | ||
"prettier": "^1.9.2", | ||
"shx": "^0.2.2", | ||
"sinon": "^4.1.3", | ||
"sinon-chai": "^2.14.0", | ||
"tslint": "^5.11.0", | ||
"tslint-config-airbnb": "^5.4.2", | ||
"tslint-config-prettier": "^1.6.0", | ||
"typedoc": "^0.9.0", | ||
"typescript": "^2.6.2" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.0.0-beta.35" | ||
} | ||
} |
114
README.md
@@ -1,19 +0,37 @@ | ||
[![Build Status](https://secure.travis-ci.org/ThaNarie/tslint-teamcity-reporter.png?branch=master)](http://travis-ci.org/ThaNarie/tslint-teamcity-reporter) [![Dependency Status](https://gemnasium.com/ThaNarie/tslint-teamcity-reporter.png)](https://gemnasium.com/ThaNarie/tslint-teamcity-reporter) [![NPM version](https://badge.fury.io/js/tslint-teamcity-reporter.png)](http://badge.fury.io/js/tslint-teamcity-reporter) | ||
# tslint-teamcity-reporter | ||
## TSLint TeamCity Reporter | ||
A TSLint formatter/reporter for use in TeamCity which groups by files using TeamCity Test Suite | ||
### Install | ||
**Note: v3.0.0 is completely rewritten to keep it more maintainable | ||
(borrowing from [eslint-teamcity](https://github.com/andreogle/eslint-teamcity) and [tslint](https://github.com/palantir/tslint/) internal tests), | ||
and will be a breaking change to your configuration and output.** | ||
Install with npm: `npm install --save-dev tslint-teamcity-reporter` | ||
#### Changes | ||
### Usage | ||
* From the CLI, the formatter can now be specified as `-t ./node_modules/tslint-teamcity-reporter/index.js` | ||
* The lint errors reported as tests are now grouped by file | ||
* This means that on the top-level, you only see failed files, not individual errors | ||
* The individual errors are now displayed as error output for each file | ||
* This means that the 'failed test count' will drop significantly, please take into account in your overall metrics | ||
* If you liked the old approach better, please let me know in a ticket, and I can add it back as an option | ||
* Warnings are now treated as such, will show up in the logs and at the bottom of a failed test | ||
## Installation | ||
```sh | ||
yarn add tslint-teamcity-reporter | ||
``` | ||
```sh | ||
npm i -D tslint-teamcity-reporter | ||
``` | ||
## Usage | ||
Use it with: | ||
#### JSHint CLI | ||
#### TSLint CLI | ||
``` | ||
tslint --formatters-dir node_modules/tslint-teamcity-reporter/ --format TSHintTeamcity file.ts | ||
tslint files/**/*.ts -t ./node_modules/tslint-teamcity-reporter/index.js | ||
``` | ||
@@ -39,10 +57,80 @@ | ||
### Screenshot | ||
### Configuration | ||
<img src="http://cl.ly/UJnl/Screenshot%202014-02-20%2012.12.17.png" title="This is how it looks like in TeamCity"> | ||
There are several ways that you can configure tslint-teamcity. | ||
You don't have to configure anything by default, you just have the option to if you would like. | ||
Settings are looked for in the following priority: | ||
### License | ||
#### 1. From your package.json | ||
If you have a package.json file in the current directory, you can add an extra "eslint-teamcity" property to it: | ||
Thanks to [jshint-teamcity](https://github.com/hongymagic/jshint-teamcity) and [tslint-path-formatter](https://github.com/Bartvds/tslint-path-formatter). | ||
```json | ||
{ | ||
"tslint-teamcity": { | ||
"report-name": "My TSLint Violations", | ||
"error-statistics-name": "My TSLint Error Count", | ||
"warning-statistics-name": "My TSLint Warning Count" | ||
} | ||
} | ||
``` | ||
MIT © Tha Narie | ||
#### 2. ENV variables | ||
```sh | ||
export TSLINT_TEAMCITY_REPORT_NAME="My Formatting Problems" | ||
export TSLINT_TEAMCITY_ERROR_STATISTICS_NAME="My Error Count" | ||
export TSLINT_TEAMCITY_WARNING_STATISTICS_NAME="My Warning Count" | ||
``` | ||
You can also output your current settings to the log if you set: | ||
```sh | ||
export TSLINT_TEAMCITY_DISPLAY_CONFIG=true | ||
``` | ||
## Building | ||
In order to build tslint-teamcity-reporter, ensure that you have [Git](http://git-scm.com/downloads) | ||
and [Node.js](http://nodejs.org/) installed. | ||
Clone a copy of the repo: | ||
```sh | ||
git clone https://github.com/ThaNarie/tslint-teamcity-reporter.git | ||
``` | ||
Change to the tslint-teamcity-reporter directory: | ||
```sh | ||
cd tslint-teamcity-reporter | ||
``` | ||
Install dev dependencies: | ||
```sh | ||
yarn | ||
``` | ||
Use one of the following main scripts: | ||
```sh | ||
yarn build # build this project | ||
yarn dev # run compilers in watch mode, both for babel and typescript | ||
yarn test # run the unit tests incl coverage | ||
yarn test:dev # run the unit tests in watch mode | ||
yarn lint # run eslint and tslint on this project | ||
``` | ||
When installing this module, it adds a pre-commit hook, that runs lint and prettier commands | ||
before committing, so you can be sure that everything checks out. | ||
## Contribute | ||
View [CONTRIBUTING.md](./CONTRIBUTING.md) | ||
## LICENSE | ||
Thanks to [eslint-teamcity](https://github.com/andreogle/eslint-teamcity), [jshint-teamcity](https://github.com/hongymagic/jshint-teamcity) and [tslint](https://github.com/palantir/tslint/). | ||
[MIT](./LICENSE) © Tha Narie | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
184130
136
40
12
287
1
5
1
+ Added@babel/runtime@7.26.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedargparse@1.0.10(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbuiltin-modules@1.1.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddiff@4.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesprima@4.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob@7.2.3(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtslib@1.14.1(transitive)
- Removedtslint@6.1.3(transitive)
- Removedtsutils@2.29.0(transitive)
- Removedtypescript@5.6.3(transitive)
- Removedwrappy@1.0.2(transitive)