mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
lint: Delegate console.log check to ESLint.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
0c8d199a3d
commit
b3f63262af
8
static/.eslintrc.json
Normal file
8
static/.eslintrc.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "error"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
// System documented in https://zulip.readthedocs.io/en/latest/subsystems/logging.html
|
||||
|
||||
// This must be included before the first call to $(document).ready
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
/* WARNING:
|
||||
|
||||
This file is only included when Django's DEBUG = True and your
|
||||
|
||||
@@ -156,13 +156,6 @@ js_rules = RuleList(
|
||||
'description': 'Write JS else statements on same line as }'},
|
||||
{'pattern': '^else if',
|
||||
'description': 'Write JS else statements on same line as }'},
|
||||
{'pattern': 'console[.][a-z]',
|
||||
'exclude': set(['static/js/blueslip.js',
|
||||
'frontend_tests/zjsunit',
|
||||
'frontend_tests/casper_lib/common.js',
|
||||
'frontend_tests/node_tests',
|
||||
'static/js/debug.js']),
|
||||
'description': 'console.log and similar should not be used in webapp'},
|
||||
{'pattern': r'''[.]text\(["'][a-zA-Z]''',
|
||||
'description': 'Strings passed to $().text should be wrapped in i18n.t() for internationalization',
|
||||
'exclude': set(['frontend_tests/node_tests/'])},
|
||||
|
||||
Reference in New Issue
Block a user