sort-comp is not working
See original GitHub issueHi, 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:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you guys for such a quick fix 👍
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.