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

Fix eslint configuration #2782

Open
dtslvr opened this issue Dec 25, 2023 · 6 comments
Open

Fix eslint configuration #2782

dtslvr opened this issue Dec 25, 2023 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dtslvr
Copy link
Member

dtslvr commented Dec 25, 2023

Running yarn lint exits with the following error:

Linting "api"...

NX ESLint configuration in apps/api/.eslintrc.json » ../../.eslintrc.json is invalid:

    - Property "extends" is the wrong type (expected string but got `[null,"plugin:storybook/recommended"]`).
    - Property "extends[0]" is the wrong type (expected string but got `null`).
    - "extends" should match exactly one schema in oneOf. Value: [null,"plugin:storybook/recommended"].

Referenced from: /home/fares/repo/_projects/ghostfolio/apps/api/.eslintrc.json
Pass --verbose to see the stacktrace.

NX Ran target lint for project api (613ms)

✖    1/1 failed
✔    0/1 succeeded [0 read from cache]

View structured, searchable error logs at https://nx.app/runs/SDeoEU7RfZ

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Originally posted by @underwater in #2772 (reply in thread)

@dtslvr dtslvr added bug Something isn't working help wanted Extra attention is needed labels Dec 25, 2023
@underwater
Copy link
Contributor

@dtslvr you can assign it to me, and I will dig into this right after we close the p/r on permissions

@underwater
Copy link
Contributor

@dtslvr
I suspect, updating the .eslintrc.json file to use
"extends": ["plugin:storybook/recommended"]
instead of
"extends": [null, "plugin:storybook/recommended"]

would likely resolve the .eslintrc.json is invalid error but the linting itself would raise a large number of errors / warnings (mostly relating to circular dependencies and suggestions for using relative paths for internal imports.....

I did rollback locally to various older commit points to check last occurence when linting worked, but it seems linting always generated errors.... Is the script yarn lint being actively used during local development or triggered in CI / CD ?

@dtslvr
Copy link
Member Author

dtslvr commented Dec 28, 2023

Linting has not been used at this point, but I think it would be an improvement. To get to this point, I suggest that we resolve the circular dependencies and temporarily deactivate the rule with the relative paths imports.

"extends": ["plugin:storybook/recommended"]

Good discovery! Can you create a PR for this change?

@underwater
Copy link
Contributor

underwater commented Dec 28, 2023 via email

@underwater
Copy link
Contributor

@dtslvr I am sorry but again due to health will be offline for another 10 days, and suggest perhaps un-assign me this issue, for better visibility,.....

@dtslvr
Copy link
Member Author

dtslvr commented Jan 10, 2024

@underwater No problem. Get well soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants