-
Notifications
You must be signed in to change notification settings - Fork 213
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
Support for global config #169
base: main
Are you sure you want to change the base?
Conversation
Hi @bernabas, I can definitely understand what you're going for here, even though it's a pretty niche edge case. I have two concerns:
|
So if we supported this, IMO, it would need to follow the XDG basedir spec. Which means the global file would live at There is some prior art that addresses 1. Eslint also supports global configs and actually does combine the global config with local configs. This exposes them to the inconsistent behavior we're concerned about. Their solution to this is for the local config to specify So, I would be in favor of this feature provided:
Unfortunately, I suspect this latter requirement makes the feature moot for @bernabas' use-case? |
I'm becoming more sympathetic to this for exactly one edge case: ignoring particular untracked files that you don't want Standard to touch. I find myself making a lot of scratch files that I want my tools to skip and which (because I'm not committing them) I don't want to have to reference from tracked files that configure my tools. If I'm debugging something in the project with a throwaway All that to say, and I realize this isn't the thrust of the implementation of the pull request, but it might meet the spirit of what @bernabas was going for. |
Personally, I'd rather be able to tell standard to only look at versioned files. Then standard doesn't need to care why or how the files are unversioned. Instead, it would ask git which files are versioned, and only scan those. (Not surprisingly, if this were how Standard worked, it would eliminate the need for all but one or two standard's built-in ignore rules.) |
That thought occurred to me too, but unfortunately such an option would have the unintended consequence of not linting/formatting any new files until they were committed. Meaning every time you write new classes you wouldn't benefit from autoformatting until committing them. And once committed you'd likely discover they have linting errors. 🤔 |
From the cli I suppose. But IDE integration would still be in effect and run against new files. |
Our VS Code extension reads the config and ignores ignored files, though :-/ |
Hmm. Seems weird. Vim passes the source to the tool, iirc.I would have expected LSP to take source directly from buffer and not think about “files”. Bummer
|
I am trying to exclude a file without having to list it in the repo's standard.yml file. That directory is included in my global gitignore file so it gets to be ignored, and I do not want to add it to the repo's standard.yml file exclusion list (for the same reason why I added it to the global gitignore file vs the repo's gitignore file).
This PR adds that basic functionality by looking for a
.standard_global.yml
file in the home directory.