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

Enfore tabs as indentation #39

Merged
merged 2 commits into from Sep 20, 2016
Merged

Enfore tabs as indentation #39

merged 2 commits into from Sep 20, 2016

Conversation

SimenB
Copy link
Collaborator

@SimenB SimenB commented Sep 20, 2016

Noticed that there's horribly mixed spaces and tabs (most of the spaces come from my PR, but not all).

This enforces tabs using eslint, and adds an editorconfig to help IDEs use it automatically.

The second commit upgrades to latest major of eslint. Breaking is mostly dropping support for node older than 4, which is why I included a dep that checks for the node version

"rules": {
"indent": [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

first new

"space-unary-ops": 2,
"strict": [2, "global"],
"space-before-function-paren": [2, "never"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

second new

@@ -12,7 +12,7 @@
},
"scripts": {
"test": "npm run lint && npm run test-unit",
"lint": "eslint --ignore-pattern doc/ --ignore-path .gitignore .",
"lint": "node-version-gte-4 && eslint . || node-version-lt-4",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

doc/ doesn't exist, and nothing in .gitignore contains js files

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah, that's old stuff and should be safe to remove!

@@ -1,15 +1,8 @@
{
"env": {
"node": true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these were the same as the root one, config inherit up the tree

@siimon
Copy link
Owner

siimon commented Sep 20, 2016

👍 on this, just noticed we had mixed spaces and tabs :s

@SimenB
Copy link
Collaborator Author

SimenB commented Sep 20, 2016

All changes in source code in this PR was made using eslint . --fix, btw

trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

npm rewrites this file all the time, should just keep it as spaces

@siimon siimon merged commit 3a365cf into siimon:master Sep 20, 2016
@SimenB SimenB deleted the lint branch September 20, 2016 11:51
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

Successfully merging this pull request may close these issues.

None yet

2 participants