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

Dynamically adjust .eslintrc path in VSCode settings file #22

Open
scriptify opened this issue Nov 13, 2018 · 0 comments
Open

Dynamically adjust .eslintrc path in VSCode settings file #22

scriptify opened this issue Nov 13, 2018 · 0 comments

Comments

@scriptify
Copy link
Collaborator

In order that VSCode can locate the ESLint config, a settings file (.vscode/settings.json) is created in the root of the project where the path to the ESLint config is specified. The absolute path of the ESLint file depends on the user, so if someone else than the creator of the project opened it, VSCode will not find the file.

The path should be dynamically changed depending on the path the Crana package is located.

An alternative solution would be to place the .eslintrc file directly in the project itself, but that would break the "encapsulate everything" principle of Crana.

Currently, the seetings.json file looks something like this:

{
    "eslint.options": { "configFile": "C:/Users/_scriptify_/DEV/crana-no-git/.eslintrc" }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant