question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sort-comp is not working

See original GitHub issue

Hi, when I run sort-comp transformation, it throws following error:

Error: Cannot read config package: eslint-config-airbnb
Error: Cannot find module 'eslint-config-airbnb'
Referenced from: C:\projects\client\.eslintrc
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at loadPackage (C:\projects\react-codemod\node_modules\eslint\lib\config\config-file.js:168:16)
    at loadConfigFile (C:\projects\react-codemod\node_modules\eslint\lib\config\config-file.js:212:1
8)
    at load (C:\projects\react-codemod\node_modules\eslint\lib\config\config-file.js:385:18)
    at C:\projects\react-codemod\node_modules\eslint\lib\config\config-file.js:326:36
    at Array.reduceRight (native)
    at applyExtends (C:\projects\react-codemod\node_modules\eslint\lib\config\config-file.js:309:28)

I’ve run npm install within react-codemod directory but it didn’t help.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ondrejsevcikcommented, Jun 2, 2016

Thank you guys for such a quick fix 👍

0reactions
cpojercommented, Jun 2, 2016

It’s probably some npm module that has an eslintrc shipped with it but is installed as a regular dependency so its dev dependencies aren’t there. You should probably not run codemods on node_modules folders, but it doesn’t hurt to silently ignore this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sort-comp not working by cli · Issue #653 - GitHub
I have the sort-comp rule enabled, inside Atom (with ESlint package) everything works. When I run the linter from CLI instead, ...
Read more >
1258353 - Update the ESLint rule "react/sort-comp"
This rule wants methods inside a React class to be sorted alphabetically, and is responsible for warnings like "render must be placed after...
Read more >
Sorting Algorithms Compared - Cprogramming.com
Most sorting algorithms work by comparing the data being sorted. In some cases, it may be desirable to sort a large chunk of...
Read more >
JS.REACT.SORT.COMP - Klocwork Static Code Analysis
everything-else is a special group that matches all of the methods that do not match any of the other groups. render refers to...
Read more >
sort comp() vs sort() - Codeforces
I think the problem is that using a function pointer for the comparison wastes a lot of time in function calls. The second...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found