Giter Site home page Giter Site logo

andreogle / eslint-teamcity Goto Github PK

View Code? Open in Web Editor NEW
38.0 3.0 9.0 2.37 MB

A (now deprecated) ESLint formatter plugin for TeamCity. Use eslint-formatter-teamcity instead

License: MIT License

JavaScript 99.75% Shell 0.25%
teamcity eslint formatter formatter-plugin linting continuous-integration

eslint-teamcity's People

Contributors

akaguny avatar andreogle avatar dependabot-preview[bot] avatar dependabot[bot] avatar idan-at avatar jordanadams avatar kompot avatar kot-lex avatar ulrichb avatar vicneanschi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eslint-teamcity's Issues

Only run formatter if on TeamCity?

Would it be possible to have this formatter only run if actually running on TeamCity?

I've seen that the jest teamcity reporter does something like this:

const onTeamCity = 'TEAMCITY_VERSION' in process.env;
if(onTeamCity){
    // work the magic
} else {
    // pass to default reporter?
    // require('eslint/lib/formatters/stylish')
}

What do you think?

getting strange character encoding in teamcity messages

eslint-teamcity version: 2.2.0

for example

[00:04:08]##teamcity[inspection typeId='prettier/prettier' message='line 14, col 1, Insert `|0x00b7|0x00b7`' file='src/utils/respondWithBoards.js' line='14' SEVERITY='ERROR']

or

##teamcity[inspection typeId='prettier/prettier' message='line 8, col 1, Replace `|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7R.pipe(|0x23ce|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7R.dissoc("_id"),|0x23ce|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7R.dissoc("plant"),` with `|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7|0x00b7R.pipe(R.dissoc("_id"),|0x00b7R.dissoc("plant"),|0x00b7doc|0x00b7=>`' file='src/utils/respondWithBoards.js' line='8' SEVERITY='ERROR']

which causes lots of failures to parse by teamcity

Formatter has to be used with path

Hey ho.

According to the EsLint docs for formatters you can use formatters in a more generic way when use the following naming scheme: eslint-formatter-$NAME$.

What about renaming this package to eslint-formatter-teamcity, so that it can be used with eslint -f teamcity.

E.g. for those using Yarn's pnp mode this would be beneficial.

What do you think?

feat/bugfix(*): don`t group errors in file

current version group errors in one file to 1 test, and display errors as staktrace of the test.
but it is'nt truthly - if we have different errors in one file we dosn't have new error, because this file(test) was failed in previous build of the branch.

Fails on system

I have been running into this issue on a project that I am working on. When I run this from a scripts in my package.json
"lint-js-teamcity": "eslint . -f node_modules/eslint-html-reporter/reporter-team-city.js -o ESLintReport.html"

It lints everything and produces the html file but it fails right after. Not sure exactly why.
node version: 6.11.0
npm version: 3.10.10

npm ERR! Tell the author that this fails on your system:
npm ERR! eslint . -f node_modules/eslint-html-reporter/reporter-team-city.js -o ESLintReport.html

Reporting issues in the TeamCity UI

Hi,
I have implemented this as a build step on teamcity, but the only place that warnings appear to be reported is in the build log.
Do you know how to report the warnings up onto the UI? you show a screenshot with the errors but i cannot tell where that screen is on the UI?
I am using Teamcity 9.1.7.
Thanks for the really useful package, just trying to understand how to utilise the reporting feature.

A further issue i have, is that we do not use a package.json file, only a gulpfile.js to run this, which means we lose the configuration options. Can these be added as command line params? or is there another way to configure the package when it runs? I would like to enable the summary reporting.

feat(next version): report as inspections, not tests

https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-Inspectiontype
we may report eslint violations as inspection errors, not tests
If we are use that we must push any new error type as ispection type: example:
##teamcity[inspectionType id='indent' name='' description='' category='eslint']
and then error:
##teamcity[inspection typeId='' message='line 10, col 1, Expected indentation of 0 spaces but found 1. (indent)' file='/temp/anyPath/file.js' line='1' additional attribute='ERROR']

Getting an inspection without and id causing TeamCity to error.

The package is generating the output:

##teamcity[inspectionType id='' category='ESLint Violations' name='' description='ESLint Violations']
##teamcity[inspection typeId='' message='line 84, col 18, Parsing error: Unexpected token i' file='MyFile.js' line='84' SEVERITY='ERROR']

Which is causing teamcity to show the error:

[21:27:46][Step 5/17] Attributes id, name, category, description are required to 'inspectionType' service message
[21:27:46][Step 5/17] Attributes 'typeId' and 'file' are required to 'inspection' service message

The offending code is:

for (let i = 0, length = this.formControlOptions.length; i < length; i++) { }

This code is invalid because our config is set to ES5:

{
"parserOptions": { "ecmaVersion": 5 },
"rules": {
"arrow-body-style": ["error", "never"]
}
}

Would it be possible to add a default Id to avoid this issue please?

P.S. Thanks for creating this package!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.