Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

chore(deps): update eslint dependencies #1352

Merged
merged 4 commits into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tailwind.js
2 changes: 1 addition & 1 deletion __tests__/e2e/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit.jest.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions __tests__/unit/__utils__/validation.js
Original file line number Diff line number Diff line change
@@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/components/Button/ButtonGeneric.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('ButtonGeneric', () => {
beforeEach(() => {
wrapper = mount(ButtonGeneric, {
propsData: {
'label': 'Test'
label: 'Test'
}
})
})
Expand Down
4 changes: 2 additions & 2 deletions __tests__/unit/components/ListDivided.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/components/Modal/ModalWindow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'
import ModalWindow from '@/components/Modal'

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

describe('ModalWindow', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('TransactionModal', () => {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ describe('TransactionShow', () => {
wallet_formatAddress: address => address
},
stubs: {
'TransactionAmount': true,
'ModalWindow': true
TransactionAmount: true,
ModalWindow: true
}
})
})
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/components/Wallet/WalletDelegates.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('WalletDelegates', () => {
$error: () => {}
},
stubs: {
'TableWrapper': true
TableWrapper: true
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/components/Wallet/WalletHeading.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const mocks = {
}

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

describe('WalletHeading', () => {
Expand Down Expand Up @@ -79,8 +79,8 @@ describe('WalletHeadingPrimaryActions', () => {
const wrapper = shallowMount(WalletHeadingPrimaryActions, {
i18n,
provide: {
'walletVote': {},
'switchToTab': jest.fn()
walletVote: {},
switchToTab: jest.fn()
},
mocks,
stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('WalletTransactions', () => {
it('should render', () => {
const wrapper = shallowMount(WalletTransactions, {
stubs: {
'TransactionTable': true
TransactionTable: true
},
mocks: {
$store: {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/pages/Profile/ProfileAll.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('pages > ProfileAll', () => {
i18n,
mixins: [CurrencyMixin],
stubs: {
'ProfileAvatar': true
ProfileAvatar: true
},
mocks: {
$store: {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/pages/Wallet/WalletAll.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('pages > WalletAll', () => {
wallet_name: value => value
},
stubs: {
'ButtonLetter': true
ButtonLetter: true
}
})
}
Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/services/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Services > Client', () => {
balance: '1202',
publicKey: 'public key'
}
let wallet = {
const wallet = {
body: {
data: {
...data,
Expand All @@ -73,7 +73,7 @@ describe('Services > Client', () => {
}
}
}
let account = {
const account = {
data: {
success: true,
account: {
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('Services > Client', () => {
}
]
const walletAddresses = ['address1', 'address2']
let walletsResponse = {
const walletsResponse = {
body: {
data: [
{
Expand Down Expand Up @@ -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') {
Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/store/modules/announcements.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
}

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

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

Expand All @@ -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:
[
{
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('the announcementStore getters', () => {
})

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

it('fetches all read and unread announcements from state', () => {
let state = {
const state = {
announcements: [
{
guid: 1,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/store/modules/ledger.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/store/modules/transaction.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
6 changes: 3 additions & 3 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Input/InputAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Input/InputFee.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Menu/MenuOptions/MenuOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Modal/ModalExportWallets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/Network/NetworkModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
}
Expand Down
Loading