Possible to ignore/exclude file/folder from .editorconfig?

You can create an .editorconfig file in vender/ with a simple root = true line.


Best way I've found is to add this to an otherwise blank .editorconfig in the folder you want to ignore:

[*]
generated_code = true

Another solution to ignore /vendor folder:

  • match the path you want to ignore
  • set unset to property you want to ignore

For example, if you have:

  • /index.html
  • /vendor
  • /.editorconfig

You can match all files in the vendor directory in your .editorconfig and ignore all properties (set to IDE's default):

# top-most EditorConfig file
root = true

# Ignore paths
[/vendor/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

Tags:

Editorconfig