From d9f3b57bb80ddb3366528fe22626e87ccfa7d07b Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 11 May 2017 16:05:53 +0530 Subject: [PATCH] Add eslint files --- .eslintignore | 2 + .eslintrc | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..7a9c501bc6 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +frappe/public/js/lib/* +frappe/public/js/frappe/misc/tests/* \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000000..1194af2016 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,100 @@ +{ + "env": { + "browser": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "indent": [ + "error", + "tab" + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "off", + "double" + ], + "semi": [ + "off", + "always" + ], + "no-unused-vars": [ + "off" + ], + "no-redeclare": [ + "off" + ], + "no-console": [ + "off" + ] + }, + "globals": { + "frappe": true, + "$": true, + "jQuery": true, + "moment": true, + "hljs": true, + "Awesomplete": true, + "CalHeatMap": true, + "Sortable": true, + "Showdown": true, + "Taggle": true, + "Gantt": true, + "Slick": true, + "PhotoSwipe": true, + "PhotoSwipeUI_Default": true, + "fluxify": true, + "io": true, + "c3": true, + "__": true, + "_p": true, + "_f": true, + "repl": true, + "Class": true, + "locals": true, + "cint": true, + "cstr": true, + "cur_frm": true, + "cur_dialog": true, + "cur_page": true, + "cur_list": true, + "cur_tree": true, + "is_null": true, + "in_list": true, + "has_common": true, + "has_words": true, + "validate_email": true, + "get_number_format": true, + "format_number": true, + "format_currency": true, + "comment_when": true, + "replace_newlines": true, + "open_url_post": true, + "toTitle": true, + "lstrip": true, + "strip": true, + "strip_html": true, + "replace_all": true, + "flt": true, + "precision": true, + "md5": true, + "CREATE": true, + "AMEND": true, + "CANCEL": true, + "copy_dict": true, + "get_number_format_info": true, + + "$c": true, + "$c_obj": true, + "refresh_many": true, + "refresh_field": true, + "toggle_field": true, + "get_field_obj": true, + "get_query_params": true, + "unhide_field": true, + "hide_field": true + } +} \ No newline at end of file