Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.5.3 not working with chalk v1.1.2 #5716

Closed
huozicheng opened this issue Mar 29, 2016 · 8 comments

Comments

Projects
None yet
6 participants
@huozicheng
Copy link

commented Mar 29, 2016

What version of ESLint are you using?
v2.5.3
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
{
"extends": "name",
"rules": {
"no-useless-call": 1,
"comma-dangle": 2
}
}

What did you do? Please include the actual source code causing the issue.
npm install
What did you expect to happen?
working
What actually happened? Please include the actual, raw output from ESLint.
.../node_modules/gulp-eslint/node_modules/eslint/lib/formatters/stylish.js:71
return chalk.stripColor(str).length;
^

TypeError: chalk.stripColor is not a function
at table.stringLength (.../node_modules/gulp-eslint/node_modules/eslint/lib/formatters/stylish.js:71:34)
at .../node_modules/text-table/index.js:33:21
at Array.forEach (native)
at forEach (.../node_modules/text-table/index.js:73:31)
at .../node_modules/text-table/index.js:32:9
at Array.reduce (native)
at reduce (.../node_modules/text-table/index.js:63:30)
at module.exports (.../node_modules/text-table/index.js:31:17)
at .../node_modules/gulp-eslint/node_modules/eslint/lib/formatters/stylish.js:46:19
at Array.forEach (native)

Thank you

@eslintbot eslintbot added the triage label Mar 29, 2016

@jsdelfino

This comment has been minimized.

Copy link

commented Mar 29, 2016

Running into the same problem on Node 4.2 (5.9 works). Looks like a problem with the stylish formatter, as switching to the unix of compact formatter as a workaround works.

@ilyavolodin

This comment has been minimized.

Copy link
Member

commented Mar 29, 2016

I just did a clean install of eslint v2.5.3 and it comes with chalk v1.1.3. Everything is working correctly for me. Which version of NPM are you using? If you are using NPM 3, it might be that chalk is required by some other dependency in your project and NPM is screwing up deduping. Can you also try doing a clean reinstall (delete node_modules directory completely).

@ilyavolodin ilyavolodin added question and removed triage labels Mar 29, 2016

@huozicheng

This comment has been minimized.

Copy link
Author

commented Mar 29, 2016

It is chalk v1.1.2, it updated to 1.1.3? 1.1.2 is like 10 minutes ago.

@huozicheng

This comment has been minimized.

Copy link
Author

commented Mar 29, 2016

@huozicheng

This comment has been minimized.

Copy link
Author

commented Mar 29, 2016

I think it's fixed.

@huozicheng huozicheng closed this Mar 29, 2016

jsdelfino added a commit to cloudfoundry-incubator/cf-abacus that referenced this issue Mar 29, 2016

Temporarily switching to Unix ESLint formatter
This is to work around ESLint issue #5716 which started to break our
builds today.

See eslint/eslint#5716.

Will switch back to the default Stylish ESlint formatter when this is
resolved.
@Qix-

This comment has been minimized.

Copy link

commented Mar 29, 2016

Yeah. We had an issue earlier today so I've been doing damage control. As long as you're not requiring exactly v1.1.2 it should be fixed by simply reinstalling packages.

Apologies.

morrissinger pushed a commit to morrissinger/eslint that referenced this issue Mar 29, 2016

@morrissinger

This comment has been minimized.

Copy link

commented Mar 29, 2016

I ran into this issue. It looks like the problem is that package.json isn't hard-versioned, and chalk issued a breaking change in the point-point release by removing their export of the stripColor() method from the strip-ansi package.

See: https://github.com/eslint/eslint/blob/master/package.json#L39

I fixed this by bringing in the strip-ansi dependency directly. See PR: #5731

morrissinger pushed a commit to morrissinger/eslint that referenced this issue Mar 29, 2016

morrissinger pushed a commit to morrissinger/eslint that referenced this issue Mar 29, 2016

@Qix-

This comment has been minimized.

Copy link

commented Mar 29, 2016

That has been reverted. This shouldn't be a problem anymore...

morrissinger pushed a commit to morrissinger/eslint that referenced this issue Mar 29, 2016

morrissinger pushed a commit to morrissinger/eslint that referenced this issue Mar 29, 2016

morrissinger pushed a commit to morrissinger/eslint that referenced this issue Mar 30, 2016

ilyavolodin added a commit that referenced this issue Mar 30, 2016

Merge pull request #5733 from morrissinger/master
Fix: Old Chalk.JS deprecated method (fixes #5716)

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.