nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 5bc3f5659ef09923e047a122550247f404fb9b5b
parent 5ec7fa0fa5e639fee03d8882b97318f7a3994ea7
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Sun,  5 Jan 2020 11:18:25 +0100

lint: add check for not using console in browser code

Diffstat:
M.eslintrc | 7+++++--
AmyEslintBrowserRules.js | 6++++++
2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/.eslintrc b/.eslintrc @@ -18,6 +18,7 @@ "parserOptions": { "sourceType": "module" }, + "extends": ["./myEslintBrowserRules.js"], "rules": { "no-unused-vars": ["error", {"argsIgnorePattern": "_unused(_.+)?"}], "no-constant-condition": ["error", {"checkLoops": false}], // allow `while (true)` @@ -31,7 +32,8 @@ { "files": "src/vendored/**/*.js", "rules": { - "semi": "off" + "semi": "off", + "no-console": "off" } }, { @@ -55,7 +57,8 @@ "webpack/**/*.js", "test/karma.conf.js", "scripts/**/*.js", - "./myEslintRules.js" + "./myEslintRules.js", + "./myEslintBrowserRules.js", ], "env": { "node": true, diff --git a/myEslintBrowserRules.js b/myEslintBrowserRules.js @@ -0,0 +1,6 @@ +module.exports = { + extends: ["./myEslintRules.js"], + rules: { + "no-console": "error" + } +};