Skip to content
Permalink
Browse files

chore(deps): update eslint dependencies (#1352)

* chore(deps): update eslint dependencies

* style: fix config

* chore: eslint ignore tailwind.js
  • Loading branch information...
faustbrian authored and alexbarnsley committed Aug 5, 2019
1 parent 5ce2840 commit 868a15344d88bfce4aed92776481ab4c083d1008
Showing with 221 additions and 179 deletions.
  1. +1 −0 .eslintignore
  2. +1 −1 __tests__/e2e/app.spec.js
  3. +1 −1 __tests__/unit.jest.conf.js
  4. +4 −4 __tests__/unit/__utils__/validation.js
  5. +1 −1 __tests__/unit/components/Button/ButtonGeneric.spec.js
  6. +2 −2 __tests__/unit/components/ListDivided.spec.js
  7. +1 −1 __tests__/unit/components/Modal/ModalWindow.spec.js
  8. +12 −12 __tests__/unit/components/Passphrase/PassphraseVerification.spec.js
  9. +2 −2 __tests__/unit/components/Profile/ProfileRemovalConfirmation.spec.js
  10. +1 −1 __tests__/unit/components/Transaction/TransactionModal.spec.js
  11. +2 −2 __tests__/unit/components/Transaction/TransactionShow.spec.js
  12. +1 −1 __tests__/unit/components/Wallet/WalletDelegates.spec.js
  13. +3 −3 __tests__/unit/components/Wallet/WalletHeading.spec.js
  14. +1 −1 __tests__/unit/components/Wallet/WalletTransactions.spec.js
  15. +1 −1 __tests__/unit/pages/Profile/ProfileAll.spec.js
  16. +1 −1 __tests__/unit/pages/Wallet/WalletAll.spec.js
  17. +5 −5 __tests__/unit/services/client.spec.js
  18. +5 −5 __tests__/unit/store/modules/announcements.spec.js
  19. +1 −1 __tests__/unit/store/modules/ledger.spec.js
  20. +1 −1 __tests__/unit/store/modules/transaction.spec.js
  21. +2 −2 __tests__/unit/store/plugins/vuex-persist-migrations.spec.js
  22. +3 −3 config/index.js
  23. +7 −7 package.json
  24. +1 −1 src/renderer/components/Input/InputAddress.vue
  25. +1 −1 src/renderer/components/Input/InputFee.vue
  26. +1 −1 src/renderer/components/Menu/MenuOptions/MenuOptions.vue
  27. +1 −1 src/renderer/components/Modal/ModalExportWallets.vue
  28. +2 −2 src/renderer/components/Network/NetworkModal.vue
  29. +1 −1 src/renderer/components/Plugin/PluginTable.vue
  30. +2 −2 src/renderer/components/Search/SearchFilter/SearchFilter.vue
  31. +1 −1 src/renderer/components/Selection/mixin-selection-image.js
  32. +1 −1 src/renderer/components/Wallet/WalletAddress.vue
  33. +1 −1 src/renderer/components/Wallet/WalletDetails/WalletDetails.vue
  34. +1 −1 src/renderer/components/Wallet/WalletHeading/WalletHeadingInfo.vue
  35. +1 −1 src/renderer/components/Wallet/WalletTable.vue
  36. +1 −1 src/renderer/i18n/locales/en-US.js
  37. +1 −1 src/renderer/i18n/locales/it-IT.js
  38. +1 −1 src/renderer/pages/Contact/ContactAll.vue
  39. +1 −1 src/renderer/pages/Profile/ProfileEdition.vue
  40. +1 −1 src/renderer/pages/Wallet/WalletAll.vue
  41. +4 −4 src/renderer/services/client.js
  42. +14 −14 src/renderer/services/plugin-manager.js
  43. +2 −2 src/renderer/services/uri-handler.js
  44. +1 −1 src/renderer/services/wallet.js
  45. +1 −1 src/renderer/store/modules/announcements.js
  46. +2 −2 src/renderer/store/modules/ledger.js
  47. +3 −3 src/renderer/store/modules/peer.js
  48. +116 −75 yarn.lock
@@ -0,0 +1 @@
tailwind.js
@@ -5,7 +5,7 @@ import welcomeSpecs from './pages/2-welcome.spec'
import profileNewSpecs from './pages/3-profile-new.spec'

describe('App', () => {
let scope = {}
const scope = {}

beforeAll(async () => {
await setup.startApp(scope)
@@ -15,7 +15,7 @@ module.exports = {
'^@config/(.*)$': '<rootDir>/config/$1',
'^@/(.*)$': '<rootDir>/src/renderer/$1',
'^@tests/(.*)$': '<rootDir>/__tests__/$1',
'vue$': '<rootDir>/node_modules/vue/dist/vue.common.js'
vue$: '<rootDir>/node_modules/vue/dist/vue.common.js'
},
transform: {
'^.+\\.js$': 'babel-jest',
@@ -1,19 +1,19 @@
const testRequired = (model, validValue = 'not empty') => {
if (!model.hasOwnProperty('required') && !model.hasOwnProperty('requiredIfFull')) {
if (!Object.prototype.hasOwnProperty.call(model, 'required') && !Object.prototype.hasOwnProperty.call(model, 'requiredIfFull')) {
throw new Error('missing required property')
}

expect(model.hasOwnProperty('required') ? model.required : model.requiredIfFull).toBe(false)
expect(Object.prototype.hasOwnProperty.call(model, 'required') ? model.required : model.requiredIfFull).toBe(false)
expect(model.$invalid).toBe(true)

model.$model = validValue

expect(model.hasOwnProperty('required') ? model.required : model.requiredIfFull).toBe(true)
expect(Object.prototype.hasOwnProperty.call(model, 'required') ? model.required : model.requiredIfFull).toBe(true)
expect(model.$invalid).toBe(false)

model.$model = ''

expect(model.hasOwnProperty('required') ? model.required : model.requiredIfFull).toBe(false)
expect(Object.prototype.hasOwnProperty.call(model, 'required') ? model.required : model.requiredIfFull).toBe(false)
expect(model.$invalid).toBe(true)
}

@@ -7,7 +7,7 @@ describe('ButtonGeneric', () => {
beforeEach(() => {
wrapper = mount(ButtonGeneric, {
propsData: {
'label': 'Test'
label: 'Test'
}
})
})
@@ -56,8 +56,8 @@ describe('ListDivided', () => {

it('should render list with items', () => {
const items = {
'address': 'example',
'fee': '0.01'
address: 'example',
fee: '0.01'
}
const wrapper = mount(ListDivided, {
propsData: {
@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'
import ModalWindow from '@/components/Modal'

const stubs = {
'Portal': true
Portal: true
}

describe('ModalWindow', () => {
@@ -235,12 +235,12 @@ describe('PassphraseVerification', () => {
wrapper.setData({
currentPosition: '3',
acceptedWords: {
'1': 'former',
'3': '',
'5': 'other',
'7': '',
'9': 'example',
'11': 'random'
1: 'former',
3: '',
5: 'other',
7: '',
9: 'example',
11: 'random'
}
})
wrapper.vm.toNextWord()
@@ -254,12 +254,12 @@ describe('PassphraseVerification', () => {
wrapper.setData({
currentPosition: '3',
acceptedWords: {
'1': 'former',
'2': '',
'3': '',
'4': 'random',
'5': 'other',
'6': 'example'
1: 'former',
2: '',
3: '',
4: 'random',
5: 'other',
6: 'example'
}
})
wrapper.vm.toNextWord()
@@ -6,8 +6,8 @@ const i18n = useI18nGlobally()
let wrapper

const profile = { id: 'my profile' }
let $store = {}
let $router = {}
const $store = {}
const $router = {}

const mountComponent = ({ profiles } = {}) => {
$router.push = jest.fn()
@@ -42,7 +42,7 @@ describe('TransactionModal', () => {

describe('isSuccessfulResponse', () => {
// Only V2
let response = {
const response = {
body: { data: {} }
}

@@ -37,8 +37,8 @@ describe('TransactionShow', () => {
wallet_formatAddress: address => address
},
stubs: {
'TransactionAmount': true,
'ModalWindow': true
TransactionAmount: true,
ModalWindow: true
}
})
})
@@ -31,7 +31,7 @@ describe('WalletDelegates', () => {
$error: () => {}
},
stubs: {
'TableWrapper': true
TableWrapper: true
}
})
}
@@ -45,7 +45,7 @@ const mocks = {
}

const stubs = {
'WalletHeadingInfo': WalletHeadingInfoStub
WalletHeadingInfo: WalletHeadingInfoStub
}

describe('WalletHeading', () => {
@@ -79,8 +79,8 @@ describe('WalletHeadingPrimaryActions', () => {
const wrapper = shallowMount(WalletHeadingPrimaryActions, {
i18n,
provide: {
'walletVote': {},
'switchToTab': jest.fn()
walletVote: {},
switchToTab: jest.fn()
},
mocks,
stubs
@@ -5,7 +5,7 @@ describe('WalletTransactions', () => {
it('should render', () => {
const wrapper = shallowMount(WalletTransactions, {
stubs: {
'TransactionTable': true
TransactionTable: true
},
mocks: {
$store: {
@@ -26,7 +26,7 @@ describe('pages > ProfileAll', () => {
i18n,
mixins: [CurrencyMixin],
stubs: {
'ProfileAvatar': true
ProfileAvatar: true
},
mocks: {
$store: {
@@ -49,7 +49,7 @@ describe('pages > WalletAll', () => {
wallet_name: value => value
},
stubs: {
'ButtonLetter': true
ButtonLetter: true
}
})
}
@@ -64,7 +64,7 @@ describe('Services > Client', () => {
balance: '1202',
publicKey: 'public key'
}
let wallet = {
const wallet = {
body: {
data: {
...data,
@@ -73,7 +73,7 @@ describe('Services > Client', () => {
}
}
}
let account = {
const account = {
data: {
success: true,
account: {
@@ -128,7 +128,7 @@ describe('Services > Client', () => {
}
]
const walletAddresses = ['address1', 'address2']
let walletsResponse = {
const walletsResponse = {
body: {
data: [
{
@@ -156,8 +156,8 @@ describe('Services > Client', () => {
}
}

let getWalletEndpoint = jest.fn(generateWalletResponse)
let searchWalletEndpoint = jest.fn(() => walletsResponse)
const getWalletEndpoint = jest.fn(generateWalletResponse)
const searchWalletEndpoint = jest.fn(() => walletsResponse)
beforeEach(() => {
const resource = resource => {
if (resource === 'wallets') {
@@ -3,7 +3,7 @@ import announcementStore from '@/store/modules/announcements'
describe('the announcementStore mutations', () => {
it('saves announcements to state', () => {
// vuex state -- will be modified by mutation
let state = {
const state = {
announcements: []
}

@@ -27,7 +27,7 @@ describe('the announcementStore mutations', () => {

it('marks an announcement as read', () => {
// create state
let state = {
const state = {
announcements: []
}

@@ -47,7 +47,7 @@ describe('the announcementStore mutations', () => {
describe('the announcementStore getters', () => {
it('fetches announcements from state', () => {
// create state with items
let state = {
const state = {
announcements:
[
{
@@ -85,7 +85,7 @@ describe('the announcementStore getters', () => {
})

it('fetches a single announcement from state', () => {
let state = {
const state = {
announcements:
[
{
@@ -121,7 +121,7 @@ describe('the announcementStore getters', () => {
})

it('fetches all read and unread announcements from state', () => {
let state = {
const state = {
announcements: [
{
guid: 1,
@@ -18,7 +18,7 @@ ClientService.host = 'http://127.0.0.1'
let ledgerNameByAddress = () => null
let ledgerCache = false
const nethash = '2a44f340d76ffc3df204c5f38cd355b7496c9065a1ade2ef92071436bd72e867'
let store = new Vuex.Store({
const store = new Vuex.Store({
modules: {
ledger: LedgerModule,
session: {
@@ -185,7 +185,7 @@ describe('TransactionModule', () => {
it('should return a single fee', () => {
store.commit('transaction/SET_STATIC_FEES', {
networkId: network1.id,
staticFees: [ 1, 2, 3, 4, 5 ]
staticFees: [1, 2, 3, 4, 5]
})

expect(store.getters['transaction/staticFee'](0)).toEqual(1)
@@ -2,8 +2,8 @@ import MigrationsPlugin from '@/store/plugins/vuex-persist-migrations'

describe('Migrations plugin', () => {
let plugin
let fromVersion = '1.0.0'
let untilVersion = '2.0.2'
const fromVersion = '1.0.0'
const untilVersion = '2.0.2'

beforeAll(() => {
plugin = new MigrationsPlugin({ fromVersion, untilVersion })
@@ -59,9 +59,9 @@ exports.TRANSACTION_TYPES = {
}

exports.INTERVALS = {
'short': 30000, // 30 seconds
'medium': 60000, // 1 minute
'long': 180000 // 3 minute
short: 30000, // 30 seconds
medium: 60000, // 1 minute
long: 180000 // 3 minute
}

exports.MARKET = {
@@ -122,15 +122,15 @@
"electron-builder": "^21.1.1",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"eslint": "^5.15.3",
"eslint-config-standard": "^12.0.0",
"eslint": "^6.1.0",
"eslint-config-standard": "^13.0.1",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-loader": "^2.2.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.2",
"eslint-plugin-vue": "^5.2.3",
"file-loader": "^3.0.1",
"glob-all": "^3.1.0",
"html-webpack-plugin": "^3.2.0",
@@ -269,7 +269,7 @@ export default {
* @result {Boolean}
*/
async checkNeoAddress (address) {
const wasChecked = this.neoCheckedAddressess.hasOwnProperty(address)
const wasChecked = Object.prototype.hasOwnProperty.call(this.neoCheckedAddressess, address)
if (!wasChecked) {
this.neoCheckedAddressess[address] = await WalletService.isNeoAddress(address)
}
@@ -184,7 +184,7 @@ export default {
return this.isAdvancedFee ? this.feeChoices.MAXIMUM.multipliedBy(10) : this.feeChoices.MAXIMUM
},
feeChoices () {
let { avgFee, maxFee } = this.feeStatistics
const { avgFee, maxFee } = this.feeStatistics
// Even if the network provides average or maximum fees higher than V1, they will be corrected
const average = this.currency_subToUnit(avgFee < this.maxV1fee ? avgFee : this.maxV1fee)
@@ -35,7 +35,7 @@ export default {
computed: {
classes () {
let classes = [this.isHorizontal ? 'MenuOptions--horizontal' : 'MenuOptions--vertical']
const classes = [this.isHorizontal ? 'MenuOptions--horizontal' : 'MenuOptions--vertical']
if (!this.isHorizontal) {
classes.push(this.isSettings ? 'MenuOptions__settings--vertical' : 'MenuOptions__default--vertical')
}
@@ -154,7 +154,7 @@ export default {
toggleOption (option, isAdvanced = false) {
const options = isAdvanced ? this.advancedOptions : this.options
if (options.hasOwnProperty(option)) {
if (Object.prototype.hasOwnProperty.call(options, option)) {
options[option].active = !options[option].active
}
},
@@ -484,9 +484,9 @@ export default {
const tokenFound = await cryptoCompare.checkTradeable(network.token)
for (const key of Object.keys(this.form)) {
if (network.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(network, key)) {
this.form[key] = network[key]
} else if (prefilled.hasOwnProperty(key)) {
} else if (Object.prototype.hasOwnProperty.call(prefilled, key)) {
this.form[key] = prefilled[key]
}
}

0 comments on commit 868a153

Please sign in to comment.
You can’t perform that action at this time.