Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Build: Adds an editorconfig #115

Closed
wants to merge 2 commits into from

Conversation

ebenoist
Copy link
Contributor

Adds an editorconfig file to establish minimal standards for edits to any project file

@leobalter
Copy link
Member

This should follow the discussion on #114 (comment)

@leobalter
Copy link
Member

Also: jquery/contribute.jquery.org#129

@jzaefferer
Copy link
Member

Though this should be fine to land as-is now, we can improve it later.

@arthurvr
Copy link
Contributor

The package.json file uses 2 space indentation.

@leobalter
Copy link
Member

The package.json is mostly updated through npm, which always rewrites it after a npm install --save or npm version.

We may follow the suggestion on the editorconfig website:

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

@ebenoist
Copy link
Contributor Author

ebenoist commented Nov 1, 2015

I went ahead and added rules for *.json and *.yml files. Let me know if I should add anything else.

trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,yml}]
Copy link
Member

Choose a reason for hiding this comment

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

This should be specific to the affected files, [{package.json,.travis.yml}].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can possibly see that for *.json, but shouldn't yml always be two space indented?

Copy link
Member

Choose a reason for hiding this comment

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

You're right, that's in the spec: http://yaml.org/spec/current.html#id2519916 - apparently the amount doesn't matter, but sticking with 2 makes sense.

@scottgonzalez
Copy link
Contributor

Let's not let the larger discussion hold this up. @leobalter is there anything stopping this from being merged?

@leobalter
Copy link
Member

It LGTM.

@leobalter leobalter closed this in 2365986 Dec 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

6 participants