forked from django/django
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #22463 -- Added code style guide and JavaScript linting (Editor…
…Config and ESLint)
- Loading branch information
1 parent
1e63652
commit ec4f219
Showing
26 changed files
with
1,007 additions
and
842 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
||
# Use 2 spaces for the HTML files | ||
[*.html] | ||
indent_size = 2 | ||
|
||
# The JSON files contain newlines inconsistently | ||
[*.json] | ||
indent_size = 2 | ||
insert_final_newline = ignore | ||
|
||
[**/admin/js/vendor/**] | ||
indent_style = ignore | ||
indent_size = ignore | ||
|
||
# Minified JavaScript files shouldn't be changed | ||
[**.min.js] | ||
indent_style = ignore | ||
insert_final_newline = ignore | ||
|
||
# Makefiles always use tabs for indentation | ||
[Makefile] | ||
indent_style = tab | ||
|
||
# Batch files use tabs for indentation | ||
[*.bat] | ||
indent_style = tab |
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,3 @@ | ||
**/{*.min,jquery}.js | ||
django/contrib/gis/templates/**/*.js | ||
node_modules/**.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,51 @@ | ||
{ | ||
"rules": { | ||
"camelcase": [1, {"properties": "always"}], | ||
"comma-spacing": [1, {"before": false, "after": true}], | ||
"dot-notation": [1, {"allowKeywords": true}], | ||
"curly": [1, "all"], | ||
"indent": [ | ||
2, | ||
4 | ||
], | ||
"key-spacing": [1, { | ||
"beforeColon": false, | ||
"afterColon": true | ||
}], | ||
"new-cap": [1, {"newIsCap": true, "capIsNew": true}], | ||
"no-alert": [0], | ||
"no-eval": [1], | ||
"no-extend-native": [2, {"exceptions": ["Date", "String"]}], | ||
"no-multi-spaces": [1], | ||
"no-octal-escape": [1], | ||
"no-underscore-dangle": [1], | ||
"no-unused-vars": [2, {"vars": "local", "args": "none"}], | ||
"no-script-url": [1], | ||
"no-shadow": [1, {"hoist": "functions"}], | ||
"quotes": [ | ||
1, | ||
"single" | ||
], | ||
"linebreak-style": [ | ||
2, | ||
"unix" | ||
], | ||
"semi": [ | ||
2, | ||
"always" | ||
], | ||
"space-before-blocks": [2, "always"], | ||
"space-before-function-paren": [1, {"anonymous": "always", "named": "never"}], | ||
"space-infix-ops": [ | ||
1, | ||
{"int32Hint": false} | ||
], | ||
"strict": [1, "function"] | ||
}, | ||
"env": { | ||
"browser": true | ||
}, | ||
"globals": { | ||
"django": false | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ MANIFEST | |
dist/ | ||
docs/_build/ | ||
docs/locale/ | ||
node_modules/ | ||
tests/coverage_html/ | ||
tests/.coverage | ||
build/ |
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.