From 19d84ed08229f7b8eeac282201c5ea2d79ef0f8b Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Wed, 10 Apr 2019 00:16:26 -0400 Subject: [PATCH] Added eslint rules, updated .gitignore --- .eslintrc.json | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 2 -- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000000..5f86a7c2be9 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,61 @@ +{ + "root": true, + "env": { + "browser": true, + "es6": true, + "jquery": true + }, + "extends": "eslint:recommended", + "globals": { + "SugarCube": false, + "Config": false, + "State": false, + "Story": false, + "settings": false, + "setup": false, + "App": false, + "prehistory": true, + "predisplay": true, + "prerender": true, + "postrender": true, + "postdisplay": true + }, + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "ecmaFeatures": { + "impliedStrict": true + } + }, + "rules": { + "semi-spacing": "warn", + "semi-style": "warn", + "eqeqeq": "error", + "no-fallthrough": "error", + "camelcase": "warn", + "comma-spacing": "error", + "comma-style": "error", + "object-curly-newline": "off", + "object-curly-spacing": "error", + "no-var": "error", + "spaced-comment": "warn", + "no-undef": "off", + "no-unused-vars": "error", + "block-scoped-var": "warn", + "dot-notation": "off", + "linebreak-style": ["error", "unix"], + "eol-last": "warn", + "unicode-bom": [ + "error", + "never" + ], + "valid-jsdoc": [ + "warn", + { + "requireParamDescription": false, + "requireReturnDescription": false, + "requireReturn": false + } + ] + } +} diff --git a/.gitignore b/.gitignore index 8dc0920da27..cd29456af54 100644 --- a/.gitignore +++ b/.gitignore @@ -95,8 +95,6 @@ ENV/ src/config/start.tw # eslint -.eslintrc.js -.eslintrc.json node_modules package-lock.json package.json -- GitLab