Skip to content

Commit

Permalink
Merged in development branch with MATScommon linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mollybsmith-noaa committed Aug 23, 2024
2 parents 4be78e0 + edbb1bc commit d75b23d
Show file tree
Hide file tree
Showing 183 changed files with 11,910 additions and 13,905 deletions.
66 changes: 11 additions & 55 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// our dependencies.
// XXX: this *should* be taken care of by eslint-import-resolver-meteor, investigate.
// "import/no-extraneous-dependencies": "off",
// "no-underscore-dangle": ["error", { "allow": ["_id", "_ensureIndex"] }],
"no-underscore-dangle": ["error", { "allow": ["_id", "_ensureIndex"] }],
"object-shorthand": ["error", "always", { "avoidQuotes": false }],
"space-before-function-paren": "off",
// for Meteor API's that rely on `this` context, e.g. Template.onCreated and publications
Expand All @@ -35,59 +35,15 @@
// We want to be able to turn these back into "error"'s at some point. However, for
// our first pass, we'll only consider the checks that ESLint can auto-fix as errors.
// https://eslint.org/docs/latest/use/configure/rules#rule-severities
"no-undef": "warn",
"no-redeclare": "warn",
"no-plusplus": "warn",
"vars-on-top": "warn",
"no-var": "warn",
"block-scoped-var": "warn",
"no-loop-func": "warn",
"no-unused-vars": "warn",
"prefer-destructuring": "warn",
"no-param-reassign": "warn",
"camelcase": "warn",
"no-use-before-define": "warn",
"no-restricted-globals": "warn",
"radix": "warn",
"global-require": "warn",
"no-lonely-if": "warn",
"no-underscore-dangle": ["off", { "allow": ["_id", "_ensureIndex"] }], // Uncomment line 27 with Meteor's recommended "no-underscore-dangle" policy when resolving this
"no-return-assign": "warn",
"no-shadow": "warn",
"new-cap": "warn",
"prefer-spread": "warn",
"no-case-declarations": "warn",
"default-case": "warn",
"consistent-return": "warn",
"no-unreachable": "warn",
"no-useless-concat": "warn",
"no-multi-str": "warn",
"no-unused-expressions": "warn",
"no-continue": "warn",
"no-eval": "warn",
"array-callback-return": "warn",
"no-multi-assign": "warn",
"no-new-wrappers": "warn",
"no-sequences": "warn",
"no-empty": "warn",
"no-bitwise": "warn",
"no-useless-escape": "warn",
"no-unsafe-negation": "warn",
"guard-for-in": "warn",
"no-restricted-syntax": "warn",
"class-methods-use-this": "warn",
"eqeqeq": "warn",
"operator-assignment": "warn",
"prefer-const": "warn",
"no-buffer-constructor": "warn",
"no-prototype-builtins": "warn",
"no-await-in-loop": "warn",
"no-dupe-else-if": "warn",
"meteor/no-session": "warn",
"meteor/template-names": "warn",
"meteor/eventmap-params": "warn",
"meteor/no-template-lifecycle-assignments": "warn",
"import/prefer-default-export": "warn",
"meteor/no-session": "off",
"import/no-unresolved": ["warn", { "ignore": ["^meteor/", "^/"] }] // This may be tricky to resolve due to: https://github.com/clayne11/eslint-import-resolver-meteor/issues/5
}
},
"ignorePatterns": [
"meteor_packages/mats-common/imports/startup/server/matsMiddle_common.js",
"meteor_packages/mats-common/imports/startup/server/matsMiddle_dailyModelCycle.js",
"meteor_packages/mats-common/imports/startup/server/matsMiddle_dieoff.js",
"meteor_packages/mats-common/imports/startup/server/matsMiddle_map.js",
"meteor_packages/mats-common/imports/startup/server/matsMiddle_timeSeries.js",
"meteor_packages/mats-common/imports/startup/server/matsMiddle_validTime.js"
]
}
655 changes: 218 additions & 437 deletions meteor_packages/mats-common/.npm/package/npm-shrinkwrap.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion meteor_packages/mats-common/client/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Copyright (c) 2021 Colorado State University and Regents of the University of Colorado. All rights reserved.
*/

/* global setInfo, Session, $ */
/* eslint-disable no-undef */

setError = function (error) {
let myError = "";
let myStackTrace = "";
Expand All @@ -27,7 +30,7 @@ setError = function (error) {
$("#error").modal("show");
};

clearError = function (message) {
clearError = function () {
Session.set("errorMessage", "");
Session.set("stackTrace", "");
$("#error").modal("hide");
Expand Down
5 changes: 4 additions & 1 deletion meteor_packages/mats-common/client/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
* Copyright (c) 2021 Colorado State University and Regents of the University of Colorado. All rights reserved.
*/

/* global Session, $ */
/* eslint-disable no-undef */

setInfo = function (info) {
Session.set("infoMessage", info);
$("#info").modal("show");
};

clearInfo = function (info) {
clearInfo = function () {
Session.set("infoMessage", "");
$("#info").modal("hide");
};
Expand Down
2 changes: 2 additions & 0 deletions meteor_packages/mats-common/client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* Created by pierce on 8/31/16.
*/

/* eslint-disable import/no-unresolved */

import "../imports/startup/client";
import "../imports/startup/both";
import "@fortawesome/fontawesome-free";
Expand Down
5 changes: 4 additions & 1 deletion meteor_packages/mats-common/client/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
* Copyright (c) 2021 Colorado State University and Regents of the University of Colorado. All rights reserved.
*/

/* global Session */
/* eslint-disable no-undef */

setStatus = function (status) {
Session.set("statusMessage", status);
};

clearStatus = function (status) {
clearStatus = function () {
Session.set("statusMessage", "");
};

Expand Down
Loading

0 comments on commit d75b23d

Please sign in to comment.