Socket
Socket
Sign inDemoInstall

eslint-teamcity

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-teamcity - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

1

.eslintrc.json

@@ -15,2 +15,3 @@ {

"object-curly-newline": 0,
"operator-linebreak": 0,
"prefer-arrow-callback": 0,

@@ -17,0 +18,0 @@ "space-before-function-paren": 0,

38

package.json
{
"name": "eslint-teamcity",
"version": "2.1.0",
"version": "2.2.0",
"description": "An ESLint formatter plugin for TeamCity",

@@ -8,6 +8,5 @@ "main": "index.js",

"lint": "eslint .",
"precommit": "lint-staged",
"prettier": "prettier --write",
"prettier": "prettier --write ./**/*.js",
"test": "mocha \"./test/**/*.spec.js\"",
"test-travis": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec \"./test/**/*.spec.js\""
"test:travis": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
},

@@ -30,17 +29,17 @@ "repository": {

"dependencies": {
"fs-extra": "^5.0.0"
"fs-extra": "^8.1.x"
},
"devDependencies": {
"chai": "^4.1.0",
"coveralls": "^3.0.2",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.14.0",
"husky": "^0.14.3",
"istanbul": "^0.4.5",
"lint-staged": "^6.1.1",
"mocha": "^4.1.0",
"prettier": "^1.14.2",
"shelljs": "^0.8.2",
"sinon": "^4.5.0"
"chai": "^4.2.x",
"coveralls": "^3.0.5",
"eslint": "^6.0.x",
"eslint-config-airbnb-base": "^13.2.x",
"eslint-plugin-import": "^2.18.x",
"husky": "^3.0.x",
"lint-staged": "^9.2.x",
"mocha": "^6.1.x",
"nyc": "^14.1.x",
"prettier": "^1.18.x",
"shelljs": "^0.8.3",
"sinon": "^7.3.x"
},

@@ -53,3 +52,8 @@ "lint-staged": {

]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}

@@ -5,3 +5,3 @@ const path = require('path');

/**
* Attempt to load package.json within the current directory.
* Format results using the "errors" style. ESLint messages are grouped by file.
* @param {array} results The output generated by running ESLint.

@@ -26,3 +26,4 @@ * @param {object} config The settings to be used by the formatter.

const filePath = utils.escapeTeamCityString(path.relative(process.cwd(), result.filePath));
const relativeFilePath = path.relative(process.cwd(), result.filePath);
const filePath = utils.escapeTeamCityString(relativeFilePath.replace(/\\/g, '/')); // Ensure slashes on Windows

@@ -29,0 +30,0 @@ outputList.push(`##teamcity[testStarted name='${reportName}: ${filePath}']`);

@@ -5,3 +5,3 @@ const path = require('path');

/**
* Attempt to load package.json within the current directory.
* Format results using the "inspections" style. ESLint messages are grouped by rule.
* @param {array} results The output generated by running ESLint.

@@ -24,3 +24,4 @@ * @param {object} config The settings to be used by the formatter.

const filePath = utils.escapeTeamCityString(path.relative(process.cwd(), result.filePath));
const relativeFilePath = path.relative(process.cwd(), result.filePath);
const filePath = utils.escapeTeamCityString(relativeFilePath.replace(/\\/g, '/')); // Ensure slashes on Windows

@@ -27,0 +28,0 @@ messages.forEach(messageObj => {

@@ -86,2 +86,19 @@ /* global it, describe, beforeEach, afterEach */

describe('output with directory paths', function() {
beforeEach(function() {
results.push({ ...createFatalError(), filePath: 'path\\with\\backslash\\file.js' });
});
it('should render slashes in the service messages', function() {
const outputList = formatErrors(results, reportConfig);
expect(outputList[1]).to.eql(
"##teamcity[testStarted name='ESLint Violations: path/with/backslash/file.js']"
);
expect(outputList[2]).to.eql(
"##teamcity[testFailed name='ESLint Violations: path/with/backslash/file.js' message='line 1, col 1, Some fatal error (no-eval)']"
);
});
});
describe('warning output', function() {

@@ -88,0 +105,0 @@ beforeEach(function() {

@@ -70,2 +70,16 @@ /* global it, describe, beforeEach, afterEach */

describe('output with directory paths', function() {
beforeEach(function() {
results.push({ ...createFatalError(), filePath: 'path\\with\\backslash\\file.js' });
});
it('should render slashes in the service messages', function() {
const outputList = formatInspections(results, reportConfig);
expect(outputList[1]).to.eql(
"##teamcity[inspection typeId='no-eval' message='line 1, col 1, Some fatal error' file='path/with/backslash/file.js' line='1' SEVERITY='ERROR']"
);
});
});
describe('warning output', function() {

@@ -72,0 +86,0 @@ beforeEach(function() {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc