aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-www/.eslintrc5
-rw-r--r--juick-www/package.json1
-rw-r--r--juick-www/src/main/static/scripts.js2
3 files changed, 7 insertions, 1 deletions
diff --git a/juick-www/.eslintrc b/juick-www/.eslintrc
index 1af934cd..5328a00b 100644
--- a/juick-www/.eslintrc
+++ b/juick-www/.eslintrc
@@ -19,6 +19,7 @@
// Enable custom plugin known as eslint-plugin-react
"plugins": [
// "react"
+ "only-ascii"
],
// http://eslint.org/docs/rules/
"rules": {
@@ -52,6 +53,8 @@
"no-cond-assign": "off",
"no-sparse-arrays": "off",
"no-unused-vars": "off",
- "no-useless-escape": "off"
+ "no-useless-escape": "off",
+
+ "only-ascii/only-ascii": ["warn", { "allowedChars": "✓" }] // "excludePaths": ["i18n.js"]
}
}
diff --git a/juick-www/package.json b/juick-www/package.json
index 74e0e253..0a3a6c61 100644
--- a/juick-www/package.json
+++ b/juick-www/package.json
@@ -18,6 +18,7 @@
"css-loader": "^0.28.4",
"eslint": "^4.0.0",
"eslint-loader": "^1.8.0",
+ "eslint-plugin-only-ascii":"^0.0.0",
"extract-text-webpack-plugin": "^2.1.2",
"file-loader": "^0.11.2",
"globby": "^6.1.0",
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index a5da0849..357b1c30 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -32,6 +32,7 @@ if (!('remove' in Element.prototype)) { // Firefox <23
NodeList.prototype.forEach = Array.prototype.forEach;
HTMLCollection.prototype.forEach = Array.prototype.forEach;
+/* eslint-disable only-ascii/only-ascii */
const translations = {
'en': {
'message.inReplyTo': 'in reply to',
@@ -66,6 +67,7 @@ const translations = {
'error.error': 'Ошибка'
}
};
+/* eslint-enable only-ascii/only-ascii */
function getLang() {
return (window.navigator.languages && window.navigator.languages[0])