Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
tslint-teamcity-reporter
Advanced tools
Readme
A TSLint formatter/reporter for use in TeamCity which groups by files using TeamCity Test Suite
Note: v3.0.0 is completely rewritten to keep it more maintainable (borrowing from eslint-teamcity and tslint internal tests), and will be a breaking change to your configuration and output.
-t ./node_modules/tslint-teamcity-reporter/index.js
yarn add tslint-teamcity-reporter
npm i -D tslint-teamcity-reporter
Use it with:
tslint files/**/*.ts -t ./node_modules/tslint-teamcity-reporter/index.js
module.exports = grunt => {
grunt.loadNpmTasks('grunt-tslint');
grunt.initConfig({
tslint: {
options: {
configuration: './tslint.json',
formatter: 'tslint-teamcity-reporter',
},
files: {
src: ['**/*.ts'],
},
},
});
grunt.registerTask('default', ['tslint']);
};
const gulp = require('gulp');
const tslint = require('gulp-tslint');
gulp.task('tslint', () =>
gulp
.src('**/*.ts')
.pipe(
tslint({
configuration: './tslint.json',
formatter: 'tslint-teamcity-reporter',
formattersDirectory: 'anything-but-falsy', // passing a falsy value will resolve in `null` and throw an error in tslint
}),
)
.pipe(tslint.report()),
);
gulp.task('default', ['tslint']);
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:
If you run tslint-teamcity-reporter by requiring it in your code, you can pass a second argument to the function:
import { Formatter } from 'tslint-teamcity-reporter';
const formatter = new Formatter();
const options = {
reporter: 'inspections',
reportName: 'My TSLint Violations',
errorStatisticsName: 'My TSLint Error Count',
warningStatisticsName: 'My TSLint Warning Count',
};
console.log(formatter.format(tslintFailures, options));
If you have a package.json file in the current directory, you can add an extra "tslint-teamcity-reporter" property to it:
{
"tslint-teamcity-reporter": {
"reporter": "inspections",
"report-name": "My TSLint Violations",
"error-statistics-name": "My TSLint Error Count",
"warning-statistics-name": "My TSLint Warning Count"
}
}
export TSLINT_TEAMCITY_REPORTER="inspections"
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:
export TSLINT_TEAMCITY_DISPLAY_CONFIG=true
By default, the output is displayed as tests on a TeamCity build ("reporter": "errors"
). You can change it to be displayed as "Inspections" in a separate tab by setting the "reporter": "inspections"
option.
In order to build tslint-teamcity-reporter, ensure that you have Git and Node.js installed.
Clone a copy of the repo:
git clone https://github.com/ThaNarie/tslint-teamcity-reporter.git
Change to the tslint-teamcity-reporter directory:
cd tslint-teamcity-reporter
Install dev dependencies:
yarn
Use one of the following main scripts:
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.
View CONTRIBUTING.md
Thanks to eslint-teamcity, jshint-teamcity and tslint.
MIT © Tha Narie
FAQs
A TSLint formatter/reporter for use in TeamCity which groups by files using TeamCity Test Suite
The npm package tslint-teamcity-reporter receives a total of 1,031 weekly downloads. As such, tslint-teamcity-reporter popularity was classified as popular.
We found that tslint-teamcity-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.