Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare support for eslint and editorconfig
- Loading branch information
Showing
8 changed files
with
228 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
; EditorConfig is awesome: http://EditorConfig.org | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
; top-most EditorConfig file | ||
root = true | ||
|
||
; Unix-style newlines with a newline ending every file | ||
[*] | ||
; end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
; 4 space indentation | ||
[*.py] | ||
[package.json] | ||
indent_style = space | ||
indent_size = 4 | ||
indent_size = 2 | ||
|
||
; Tab indentation (no size specified) | ||
[*.js] | ||
; indent_style = tab | ||
[Gruntfile.coffee] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
; Indentation override for all JS under lib directory | ||
[lib/**.js] | ||
indent_style = space | ||
indent_size = 2 | ||
;[lib/**.js] | ||
;indent_style = space | ||
;indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
bin | ||
doc | ||
lib | ||
node_modules | ||
test/** | ||
!test/unit/** | ||
*.min.js | ||
build/** | ||
dist/** | ||
!dist/jquery.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"rules": { | ||
"no-negated-in-lhs": "error", | ||
"no-cond-assign": [ | ||
"error", | ||
"except-parens" | ||
], | ||
"curly": [ | ||
"error", | ||
"all" | ||
], | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"computed-property-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"array-bracket-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"eqeqeq": [ | ||
"error", | ||
"smart" | ||
], | ||
"no-unused-expressions": "error", | ||
"no-sequences": "error", | ||
"no-nested-ternary": "error", | ||
"no-unreachable": "error", | ||
"wrap-iife": [ | ||
"error", | ||
"inside" | ||
], | ||
"no-caller": "error", | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"no-undef": "error", | ||
"no-unused-vars": "error", | ||
"operator-linebreak": [ | ||
"error", | ||
"after" | ||
], | ||
"comma-style": [ | ||
"error", | ||
"last" | ||
], | ||
"camelcase": [ | ||
"error", | ||
{ | ||
"properties": "never" | ||
} | ||
], | ||
"dot-notation": [ | ||
"error", | ||
{ | ||
"allowPattern": "^[a-z]+(_[a-z]+)+$" | ||
} | ||
], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 100, | ||
"ignoreComments": true, | ||
"ignoreUrls": true, | ||
"ignoreRegExpLiterals": true | ||
} | ||
], | ||
"no-mixed-spaces-and-tabs": "error", | ||
"no-trailing-spaces": "error", | ||
"no-multi-str": "error", | ||
"comma-dangle": [ | ||
"error", | ||
"never" | ||
], | ||
"comma-spacing": [ | ||
"error", | ||
{ | ||
"before": false, | ||
"after": true | ||
} | ||
], | ||
"space-before-blocks": [ | ||
"error", | ||
"always" | ||
], | ||
"space-in-parens": [ | ||
"error", | ||
"always" | ||
], | ||
"keyword-spacing": [ | ||
2 | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"semi-spacing": [ | ||
"error", | ||
{ | ||
// Because of the `for ( ; ...)` requirement | ||
// "before": true, | ||
"after": true | ||
} | ||
], | ||
"space-infix-ops": "error", | ||
"eol-last": "error", | ||
"lines-around-comment": [ | ||
"error", | ||
{ | ||
"beforeLineComment": true | ||
} | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"no-with": "error", | ||
"brace-style": "error", | ||
"space-before-function-paren": [ | ||
"error", | ||
"never" | ||
], | ||
"no-loop-func": "error", | ||
"no-spaced-func": "error", | ||
"key-spacing": [ | ||
"error", | ||
{ | ||
"beforeColon": false, | ||
"afterColon": true | ||
} | ||
], | ||
"space-unary-ops": [ | ||
"error", | ||
{ | ||
"words": false, | ||
"nonwords": false | ||
} | ||
], | ||
"no-multiple-empty-lines": 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.