From 9afcf8d5ebc1844297454502ea88e9f79b204221 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Tue, 22 Oct 2019 20:38:01 +0200 Subject: [PATCH] fix(build): do not lint when testing on github --- .github/workflows/test.yml | 2 +- package.json | 1 + .../client/src/components/notifications.vue | 4 +- website/common/script/content/constants.js | 4 +- website/common/script/libs/achievements.js | 50 +++++++++---------- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ee78e4dc1..ae984ca4b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: npm ci env: CI: true - - run: npm run lint + - run: npm run lint-no-fix apidoc: runs-on: ubuntu-latest strategy: diff --git a/package.json b/package.json index 383a24c0d3..d0649c387e 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ }, "scripts": { "lint": "eslint --ext .js --fix . && cd website/client && npm run lint", + "lint-no-fix": "eslint --ext .js . && cd website/client && npm run lint --no-fix", "test": "npm run lint && gulp test && gulp apidoc", "test:build": "gulp test:prepare:build", "test:api-v3": "gulp test:api-v3", diff --git a/website/client/src/components/notifications.vue b/website/client/src/components/notifications.vue index 94b30663dc..0499bbaf8e 100644 --- a/website/client/src/components/notifications.vue +++ b/website/client/src/components/notifications.vue @@ -214,12 +214,12 @@ const NOTIFICATIONS = { }, ACHIEVEMENT_MONSTER_MAGUS: { achievement: true, - label: ($t) => `${$t('achievement')}: ${$t('achievementMonsterMagus')}`, + label: $t => `${$t('achievement')}: ${$t('achievementMonsterMagus')}`, modalId: 'generic-achievement', }, ACHIEVEMENT_UNDEAD_UNDERTAKER: { achievement: true, - label: ($t) => `${$t('achievement')}: ${$t('achievementUndeadUndertaker')}`, + label: $t => `${$t('achievement')}: ${$t('achievementUndeadUndertaker')}`, modalId: 'generic-achievement', }, }; diff --git a/website/common/script/content/constants.js b/website/common/script/content/constants.js index b297b4fefb..1b210c5749 100644 --- a/website/common/script/content/constants.js +++ b/website/common/script/content/constants.js @@ -268,9 +268,9 @@ export const ANIMAL_COLOR_ACHIEVEMENTS = [ color: 'Base', petAchievement: 'backToBasics', petNotificationType: 'ACHIEVEMENT_BACK_TO_BASICS', mountAchievement: 'allYourBase', mountNotificationType: 'ACHIEVEMENT_ALL_YOUR_BASE', }, { - color: 'Desert', petAchievement: 'dustDevil', petNotificationType: 'ACHIEVEMENT_DUST_DEVIL', mountAchievement: 'aridAuthority', mountNotificationType: 'ACHIEVEMENT_ARID_AUTHORITY' + color: 'Desert', petAchievement: 'dustDevil', petNotificationType: 'ACHIEVEMENT_DUST_DEVIL', mountAchievement: 'aridAuthority', mountNotificationType: 'ACHIEVEMENT_ARID_AUTHORITY', }, { - color: 'Zombie', petAchievement: 'monsterMagus', petNotificationType: 'ACHIEVEMENT_MONSTER_MAGUS', mountAchievement: 'undeadUndertaker', mountNotificationType: 'ACHIEVEMENT_UNDEAD_UNDERTAKER' + color: 'Zombie', petAchievement: 'monsterMagus', petNotificationType: 'ACHIEVEMENT_MONSTER_MAGUS', mountAchievement: 'undeadUndertaker', mountNotificationType: 'ACHIEVEMENT_UNDEAD_UNDERTAKER', }, ]; diff --git a/website/common/script/libs/achievements.js b/website/common/script/libs/achievements.js index f44e637af0..c1e6048d3e 100644 --- a/website/common/script/libs/achievements.js +++ b/website/common/script/libs/achievements.js @@ -177,35 +177,35 @@ function _addUltimateGear (result, user, data) { function _getBasicAchievements (user, language) { const result = {}; - _addPlural(result, user, {path: 'streak', language}); - _addPlural(result, user, {path: 'perfect', language}); + _addPlural(result, user, { path: 'streak', language }); + _addPlural(result, user, { path: 'perfect', language }); - _addSimple(result, user, {path: 'partyUp', language}); - _addSimple(result, user, {path: 'partyOn', language}); - _addSimple(result, user, {path: 'joinedGuild', language}); - _addSimple(result, user, {path: 'royallyLoyal', language}); - _addSimple(result, user, {path: 'joinedChallenge', language}); - _addSimple(result, user, {path: 'invitedFriend', language}); - _addSimple(result, user, {path: 'lostMasterclasser', language}); - _addSimple(result, user, {path: 'mindOverMatter', language}); - _addSimple(result, user, {path: 'justAddWater', language}); - _addSimple(result, user, {path: 'backToBasics', language}); - _addSimple(result, user, {path: 'allYourBase', language}); - _addSimple(result, user, {path: 'dustDevil', language}); - _addSimple(result, user, {path: 'aridAuthority', language}); - _addSimple(result, user, {path: 'monsterMagus', language}); - _addSimple(result, user, {path: 'undeadUndertaker', language}); + _addSimple(result, user, { path: 'partyUp', language }); + _addSimple(result, user, { path: 'partyOn', language }); + _addSimple(result, user, { path: 'joinedGuild', language }); + _addSimple(result, user, { path: 'royallyLoyal', language }); + _addSimple(result, user, { path: 'joinedChallenge', language }); + _addSimple(result, user, { path: 'invitedFriend', language }); + _addSimple(result, user, { path: 'lostMasterclasser', language }); + _addSimple(result, user, { path: 'mindOverMatter', language }); + _addSimple(result, user, { path: 'justAddWater', language }); + _addSimple(result, user, { path: 'backToBasics', language }); + _addSimple(result, user, { path: 'allYourBase', language }); + _addSimple(result, user, { path: 'dustDevil', language }); + _addSimple(result, user, { path: 'aridAuthority', language }); + _addSimple(result, user, { path: 'monsterMagus', language }); + _addSimple(result, user, { path: 'undeadUndertaker', language }); - _addSimpleWithMasterCount(result, user, {path: 'beastMaster', language}); - _addSimpleWithMasterCount(result, user, {path: 'mountMaster', language}); - _addSimpleWithMasterCount(result, user, {path: 'triadBingo', language}); + _addSimpleWithMasterCount(result, user, { path: 'beastMaster', language }); + _addSimpleWithMasterCount(result, user, { path: 'mountMaster', language }); + _addSimpleWithMasterCount(result, user, { path: 'triadBingo', language }); - _addUltimateGear(result, user, {path: 'healer', language}); - _addUltimateGear(result, user, {path: 'rogue', language}); - _addUltimateGear(result, user, {path: 'warrior', language}); - _addUltimateGear(result, user, {path: 'mage', altPath: 'wizard', language}); + _addUltimateGear(result, user, { path: 'healer', language }); + _addUltimateGear(result, user, { path: 'rogue', language }); + _addUltimateGear(result, user, { path: 'warrior', language }); + _addUltimateGear(result, user, { path: 'mage', altPath: 'wizard', language }); - let cardAchievements = ['greeting', 'thankyou', 'birthday', 'congrats', 'getwell', 'goodluck']; + const cardAchievements = ['greeting', 'thankyou', 'birthday', 'congrats', 'getwell', 'goodluck']; cardAchievements.forEach(path => { _addSimpleWithCount(result, user, { path, key: `${path}Cards`, language }); });