From 2f0204a689cff6292bb9eac508dcf87db1626de1 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Mon, 24 Mar 2025 19:06:44 -0500 Subject: [PATCH] eslint cleanup after mjs switch --- .eslintrc | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ .eslintrc.js | 74 ------------------------------------------ 2 files changed, 91 insertions(+), 74 deletions(-) create mode 100644 .eslintrc delete mode 100644 .eslintrc.js diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..16c4bab --- /dev/null +++ b/.eslintrc @@ -0,0 +1,91 @@ +{ + "env": { + "browser": true, + "es6": true, + "node": true, + "jquery": true + }, + "extends": [ + "airbnb-base" + ], + "globals": { + "TravelCities": "readonly", + "RegionalCities": "readonly", + "StationInfo": "readonly", + "SunCalc": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2023, + "sourceType": "module" + }, + "plugins": [], + "rules": { + "indent": [ + "error", + "tab", + { + "SwitchCase": 1 + } + ], + "no-tabs": 0, + "no-console": 0, + "max-len": 0, + "no-use-before-define": [ + "error", + { + "variables": false + } + ], + "no-param-reassign": [ + "error", + { + "props": false + } + ], + "no-mixed-operators": [ + "error", + { + "groups": [ + [ + "&", + "|", + "^", + "~", + "<<", + ">>", + ">>>" + ], + [ + "==", + "!=", + "===", + "!==", + ">", + ">=", + "<", + "<=" + ], + [ + "&&", + "||" + ], + [ + "in", + "instanceof" + ] + ], + "allowSamePrecedence": true + } + ], + "import/extensions": [ + "error", + { + "mjs": "always", + "json": "always" + } + ] + }, + "ignorePatterns": [ + "*.min.js" + ] +} \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 89eac82..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,74 +0,0 @@ -module.exports = { - env: { - browser: true, - commonjs: true, - es6: true, - node: true, - jquery: true, - }, - extends: [ - 'airbnb-base', - ], - globals: { - Atomics: 'readonly', - SharedArrayBuffer: 'readonly', - StationInfo: 'readonly', - RegionalCities: 'readonly', - TravelCities: 'readonly', - NoSleep: 'readonly', - states: 'readonly', - SunCalc: 'readonly', - - }, - parserOptions: { - ecmaVersion: 2023, - }, - plugins: [ - ], - rules: { - indent: [ - 'error', - 'tab', - { - SwitchCase: 1 - }, - ], - 'no-tabs': 0, - 'no-console': 0, - 'max-len': 0, - 'no-use-before-define': [ - 'error', - { - variables: false, - }, - ], - 'no-param-reassign': [ - 'error', - { - props: false, - }, - ], - 'no-mixed-operators': [ - 'error', - { - groups: [ - ['&', '|', '^', '~', '<<', '>>', '>>>'], - ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - ['&&', '||'], - ['in', 'instanceof'], - ], - allowSamePrecedence: true, - }, - ], - 'import/extensions': [ - 'error', - { - mjs: 'always', - json: 'always', - }, - ], - }, - ignorePatterns: [ - '*.min.js', - ], -};