From e24523a29e292dd667580628676fa455ff349528 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Fri, 11 May 2018 01:48:13 +0200 Subject: [PATCH] updated eslint config to be more sorted and complete --- .eslintrc.js | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5667a04984..ddcc03055a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,34 +6,45 @@ module.exports = { }, "globals": { "Account": false, + "Agent": false, "AnimationCache": false, "Assets": false, "Audio": false, "AudioDevice": false, "AudioEffectOptions": false, + "Avatar": false, "AvatarList": false, "AvatarManager": false, "Camera": false, "Clipboard": false, + "console": false, + "ContextOverlay": false, "Controller": false, - "DialogsManager": false, "DebugDraw": false, + "DialogsManager": false, "Entities": false, + "EntityViewer": false, "FaceTracker": false, "GlobalServices": false, "HMD": false, + "LaserPointers": false, + "location": true, "LODManager": false, "Mat4": false, "Menu": false, "Messages": false, "ModelCache": false, + "module": false, "MyAvatar": false, "Overlays": false, "OverlayWebWindow": false, "Paths": false, + "print": false, "Quat": false, "Rates": false, + "RayPick": false, "Recording": false, + "Render": false, "Resource": false, "Reticle": false, "Scene": false, @@ -45,40 +56,36 @@ module.exports = { "Tablet": false, "TextureCache": false, "Toolbars": false, - "Uuid": false, "UndoStack": false, + "Users": false, "UserActivityLogger": false, + "Uuid": false, "Vec3": false, "WebSocket": false, "WebWindow": false, "Window": false, - "XMLHttpRequest": false, - "location": false, - "print": false, - "RayPick": false, - "LaserPointers": false, - "ContextOverlay": false, - "module": false + "XMLHttpRequest": false }, "rules": { - "brace-style": ["error", "1tbs", { "allowSingleLine": false }], - "comma-dangle": ["error", "never"], + "brace-style": ["error", "1tbs", {"allowSingleLine": false}], "camelcase": ["error"], + "comma-dangle": ["error", "never"], "curly": ["error", "all"], "eqeqeq": ["error", "always"], - "indent": ["error", 4, { "SwitchCase": 1 }], - "keyword-spacing": ["error", { "before": true, "after": true }], + "indent": ["error", 4, {"SwitchCase": 1}], + "key-spacing": ["error", {"beforeColon": false, "afterColon": true, "mode": "strict"}], + "keyword-spacing": ["error", {"before": true, "after": true}], "max-len": ["error", 128, 4], "new-cap": ["error"], + "no-console": ["off"], "no-floating-decimal": ["error"], - //"no-magic-numbers": ["error", { "ignore": [0, 1], "ignoreArrayIndexes": true }], - "no-multiple-empty-lines": ["error"], + // "no-magic-numbers": ["error", {"ignore": [0, 1], "ignoreArrayIndexes": true}], "no-multi-spaces": ["error"], - "no-unused-vars": ["error", { "args": "none", "vars": "local" }], + "no-multiple-empty-lines": ["error"], + "no-unused-vars": ["error", {"args": "none", "vars": "local"}], "semi": ["error", "always"], - "spaced-comment": ["error", "always", { - "line": { "markers": ["/"] } - }], - "space-before-function-paren": ["error", {"anonymous": "ignore", "named": "never"}] + "space-before-blocks": ["error"], + "space-before-function-paren": ["error", {"anonymous": "ignore", "named": "never"}], + "spaced-comment": ["error", "always", {"line": {"markers": ["/"]}}] } };