-
-
Notifications
You must be signed in to change notification settings - Fork 893
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
Airbnb not being recognized from eslintrc in builderbook. #251
Comments
@callahanp this is pretty sure a working directory setup issue which should be simplified with the next version. Can you please retest this with the next version. Please note that if you use a mono repository you will still need to configure working directories. I tried hard to get around this but it is not possible due to the fact that ESLint itself is very sensitive to this. |
I'll leave it to the builderbook team to respond officially, but I will do some testing with more current versions and get back to you if I have any success. Can I assume that the fix will only work with vscode insiders and eslint 6.7.3 when released, or in the meantime, eslint from github? |
@callahanp I will look into it. Last time I checked, both highlighting and auto-fixing worked for me in VS editor. @NguyenDa18 @dbaeumer Does ESLint highlighting and auto-fixing work for you? |
@callahanp Just tested again, I also tested Here what I auto-fixed just now: Did you try removing @callahanp @dbaeumer ESLint works fine for this root project and book chapter projects without setting But I had to add |
@callahanp Here is a link to code fixed by ESLint: |
@callahanp I just tested too. ESLint error highlighting and auto fixing works fine on All dependencies installed locally, no globally installed I tested the root project and Here is my
|
@tima101 two things you can do to improve this.
See also https://github.com/microsoft/vscode-eslint#settings-options |
Highlighting and auto-fix are working for me too. I tested in However, I do see the issue brought up in #252 . An error is identified by Eslint, but when I click cmd+S, the function does not change. It looks like it's trying to change (quick flash of style), but it ends up staying the same. This is in reference to the example we have in Chapter 1, section Eslint and Prettier: https://builderbook.org/books/builder-book/app-structure-next-js-hoc-material-ui-server-side-rendering-styles#eslint-and-prettier We expect that this function:
will be automatically changed to:
Screenshot of unchanged function: |
@klyburke can you check if increasing the |
@dbaeumer Could you please create pull request with edits to this file: I am not sure we need these settings but if these settings help @callahanp to resolve issues, we can merge them. |
@callahanp @klyburke @delgermurun @dbaeumer This is what found about #252 @delgermurun @klyburke Can you guys test and confirm? @callahanp Thank you for reporting! |
Updated to Node 12.14.0 Notes: After updating visual studio code, check that the eslint and any other extensions are working, are updated if necessary and that they are not requiring a restart of visual studio code to start working again. |
ESLint: Failed to load config "airbnb" to extend from. Referenced from: /work/builderbook/.eslintrc.js. Please see the 'ESLint' output channel for details.
ESLint output channel is attached
eslint_output.txt
If you are not seeing this error, you have config-airbnb and config-airbnb-base installed in such a way that your particular installation works. On a fresh install of builderbook, you see the error above. You may or may not experience this error if you have eslint or airbnb installed globally.
Curiously, you cannot get builderbooks linting to work in visual studio code, with the .eslintrc.js in the builderbook folder. you have to move it into the working folder then linting works correctly. If the copy remains at the higher level, it will be found and used, with the result that the airbnb line will cause linting to fail completely.
I believe this stems from ongoing problems mentioned in microsoft/vscode-eslint#696. Dbaumer references microsoft/vscode-eslint#815 which further refers to a fix that works in VSCode insiders edition. Apparently to fix this properly, changes were needed in vsCode itself.
The text was updated successfully, but these errors were encountered: