From c528e552fec0123af4024d44d530a113d343a8e3 Mon Sep 17 00:00:00 2001 From: Matt <7128721+TobiTenno@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:10:29 -0600 Subject: [PATCH] fix(json-modules): assert -> with (#589) --- .eslintrc.yaml | 16 +++++++++++++++- test/.eslintrc.yaml | 16 ---------------- test/unit/alert.spec.js | 2 +- test/unit/conclavechallenge.spec.js | 2 +- test/unit/deeparchimedea.spec.js | 2 +- test/unit/event.spec.js | 2 +- test/unit/kuva.spec.js | 2 +- test/unit/mission.spec.js | 2 +- test/unit/news.spec.js | 6 +++--- test/unit/nightwave.spec.js | 2 +- test/unit/syndicatejob.spec.js | 10 +++++----- test/unit/system.spec.js | 4 ++-- test/unit/voidtrader.spec.js | 2 +- 13 files changed, 33 insertions(+), 35 deletions(-) delete mode 100644 test/.eslintrc.yaml diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 06ab7247d..67bb6ea5b 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -15,5 +15,19 @@ rules: overrides: - rules: no-new: off + 'prefer-arrow-callback': off + 'func-names': off + 'no-unused-expressions': off + 'valid-jsdoc': off + 'import/no-extraneous-dependencies': + - error + - devDependencies: true + optionalDependencies: false + peerDependencies: false + 'no-console': off + parserOptions: + requireConfigFile: false + env: + mocha: true files: - - './test/**/*.spec.js' \ No newline at end of file + - './test/**/*.spec.js' diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml deleted file mode 100644 index b6b03f660..000000000 --- a/test/.eslintrc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -env: - mocha: true -parserOptions: - requireConfigFile: false -rules: - 'prefer-arrow-callback': off - 'func-names': off - 'no-new': off - 'no-unused-expressions': off - 'valid-jsdoc': off - 'import/no-extraneous-dependencies': - - error - - devDependencies: true - optionalDependencies: false - peerDependencies: false - 'no-console': off diff --git a/test/unit/alert.spec.js b/test/unit/alert.spec.js index b2fc45a09..1fd7c4074 100644 --- a/test/unit/alert.spec.js +++ b/test/unit/alert.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import Alert from '../../lib/models/Alert.js'; -import Alerts from '../data/Alerts.json' assert { type: 'json' }; +import Alerts from '../data/Alerts.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/conclavechallenge.spec.js b/test/unit/conclavechallenge.spec.js index a67d637b8..a02d963de 100644 --- a/test/unit/conclavechallenge.spec.js +++ b/test/unit/conclavechallenge.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import ConclaveChallenge from '../../lib/models/ConclaveChallenge.js'; -import challenges from '../data/PVPChallengeInstances.json' assert { type: 'json' }; +import challenges from '../data/PVPChallengeInstances.json' with { type: 'json' }; const should = chai.should(); diff --git a/test/unit/deeparchimedea.spec.js b/test/unit/deeparchimedea.spec.js index 48d4ee0e9..6a4de15fa 100644 --- a/test/unit/deeparchimedea.spec.js +++ b/test/unit/deeparchimedea.spec.js @@ -2,7 +2,7 @@ import * as chai from 'chai'; import sinonChai from 'sinon-chai'; import DeepArchidemea from '../../lib/models/DeepArchidemea.js'; -import data from '../data/DeepArchimedea.json' assert { type: 'json' }; +import data from '../data/DeepArchimedea.json' with { type: 'json' }; chai.should(); chai.use(sinonChai); diff --git a/test/unit/event.spec.js b/test/unit/event.spec.js index 3ab36835f..059a477d1 100644 --- a/test/unit/event.spec.js +++ b/test/unit/event.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import Event from '../../lib/models/WorldEvent.js'; -import events from '../data/Goals.json' assert { type: 'json' }; +import events from '../data/Goals.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/kuva.spec.js b/test/unit/kuva.spec.js index 41728a4f3..59d750c86 100644 --- a/test/unit/kuva.spec.js +++ b/test/unit/kuva.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import Kuva from '../../lib/models/Kuva.js'; -import mockKuva from '../data/kuvalog.json' assert { type: 'json' }; +import mockKuva from '../data/kuvalog.json' with { type: 'json' }; const should = chai.should(); diff --git a/test/unit/mission.spec.js b/test/unit/mission.spec.js index a73daee3a..a50183fb5 100644 --- a/test/unit/mission.spec.js +++ b/test/unit/mission.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import Mission from '../../lib/models/Mission.js'; -import Alerts from '../data/Alerts.json' assert { type: 'json' }; +import Alerts from '../data/Alerts.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/news.spec.js b/test/unit/news.spec.js index dce99b027..25c749af1 100644 --- a/test/unit/news.spec.js +++ b/test/unit/news.spec.js @@ -1,9 +1,9 @@ import * as chai from 'chai'; import News from '../../lib/models/News.js'; -import testData from '../data/News.json' assert { type: 'json' }; -import realTestData from '../data/RealNews.json' assert { type: 'json' }; -import languageTestData from '../data/LanguageNews.json' assert { type: 'json' }; +import testData from '../data/News.json' with { type: 'json' }; +import realTestData from '../data/RealNews.json' with { type: 'json' }; +import languageTestData from '../data/LanguageNews.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/nightwave.spec.js b/test/unit/nightwave.spec.js index 86bbbb34d..78c27d4be 100644 --- a/test/unit/nightwave.spec.js +++ b/test/unit/nightwave.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import Nightwave from '../../lib/models/Nightwave.js'; -import nwdata from '../data/Nightwave.json' assert { type: 'json' }; +import nwdata from '../data/Nightwave.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/syndicatejob.spec.js b/test/unit/syndicatejob.spec.js index e54990a69..803bef277 100644 --- a/test/unit/syndicatejob.spec.js +++ b/test/unit/syndicatejob.spec.js @@ -1,11 +1,11 @@ import * as chai from 'chai'; import SyndicateJob from '../../lib/models/SyndicateJob.js'; -import isoVaultBounty from '../data/isoVaultBounty.json' assert { type: 'json' }; -import plagueStarBounty from '../data/plagueStarBounty.json' assert { type: 'json' }; -import CetusFTier from '../data/CetusFTier.json' assert { type: 'json' }; -import CambionFTier from '../data/CambionFTier.json' assert { type: 'json' }; -import NoMatchJob from '../data/NoMatchJob.json' assert { type: 'json' }; +import isoVaultBounty from '../data/isoVaultBounty.json' with { type: 'json' }; +import plagueStarBounty from '../data/plagueStarBounty.json' with { type: 'json' }; +import CetusFTier from '../data/CetusFTier.json' with { type: 'json' }; +import CambionFTier from '../data/CambionFTier.json' with { type: 'json' }; +import NoMatchJob from '../data/NoMatchJob.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/system.spec.js b/test/unit/system.spec.js index 7f3e2c5e8..5568a1632 100644 --- a/test/unit/system.spec.js +++ b/test/unit/system.spec.js @@ -2,8 +2,8 @@ import * as chai from 'chai'; // eslint-disable-next-line import/no-named-as-default import WorldState from '../../main.js'; -import kuvaMock from '../data/kuvalog.json' assert { type: 'json' }; -import sentientMock from '../data/anomaly.json' assert { type: 'json' }; +import kuvaMock from '../data/kuvalog.json' with { type: 'json' }; +import sentientMock from '../data/anomaly.json' with { type: 'json' }; chai.should(); diff --git a/test/unit/voidtrader.spec.js b/test/unit/voidtrader.spec.js index 8b1ca6219..1d3f0f513 100644 --- a/test/unit/voidtrader.spec.js +++ b/test/unit/voidtrader.spec.js @@ -1,7 +1,7 @@ import * as chai from 'chai'; import VoidTrader from '../../lib/models/VoidTrader.js'; -import VaultTrader from '../data/VaultTrader.json' assert { type: 'json' }; +import VaultTrader from '../data/VaultTrader.json' with { type: 'json' }; chai.should();