Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{cjs,js,json,ts}]
indent_size = 2

[*.sh]
# like -i=4
indent_style = space
indent_size = 4
switch_case_indent = false


# Exclude files and directories by ensuring they are not matched by any section
# Files like .cxx, gradlew*, and node_modules are not explicitly matched in this file.

# Exclude target directory
[!target/**]

# Exclude .direnv directory
[!.direnv/**]

# Exclude Pods directory
[!**/Pods/**]

# Exclude node_modules directory
[!**/node_modules/**]
Comment on lines +20 to +33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think .editorconfig supports ignoring paths, these lines define empty rulesets applying to any path that does not match e.g. target/**.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding ignore = true under a [heading] will tell editors to ignore files under a matching path.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm seeing that ignore is not a valid EditorConfig property. The ignore = true syntax is supported by shfmt, which is what we're using to lint and format shell scripts in the monorepo.

One SO answer suggests setting all properties to unset to disable validation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[!**/node_modules/**]
[**/node_modules/**]
ignore = true


Loading