fix: lint & tests
This commit is contained in:
parent
1baf8cfaa6
commit
2da04c5bb1
@ -9,8 +9,6 @@ module.exports = {
|
||||
'no-var': 'error',
|
||||
'node/no-extraneous-import': 'error',
|
||||
'node/no-extraneous-require': 'error',
|
||||
'node/no-missing-import': 'error',
|
||||
'node/no-missing-require': 'error',
|
||||
'prefer-const': 'error',
|
||||
},
|
||||
}
|
||||
|
@ -24,10 +24,12 @@
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverage": true,
|
||||
"projects": ["<rootDir>", "<rootDir>/packages/xo-web"],
|
||||
"testEnvironment": "node",
|
||||
"testPathIgnorePatterns": [
|
||||
"/dist/",
|
||||
"/xo-vmdk-to-vhd/"
|
||||
"/xo-vmdk-to-vhd/",
|
||||
"/xo-web/"
|
||||
],
|
||||
"testRegex": "\\.spec\\.js$",
|
||||
"transform": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { createReadStream, createWriteStream, statSync } = require('fs')
|
||||
const { PassThrough } = require('stream')
|
||||
|
||||
const { isOpaqueRef } = require('../') // eslint-disable-line node/no-missing-require
|
||||
const { isOpaqueRef } = require('../')
|
||||
|
||||
exports.createInputStream = path => {
|
||||
if (path === undefined || path === '-') {
|
||||
|
@ -66,7 +66,6 @@
|
||||
"plot": "gnuplot -p memory-test.gnu",
|
||||
"prebuild": "rimraf dist/",
|
||||
"predev": "yarn run prebuild",
|
||||
"prepare": "yarn run build",
|
||||
"prepublishOnly": "yarn run build"
|
||||
},
|
||||
"babel": {
|
||||
|
@ -30,7 +30,6 @@
|
||||
"scripts": {
|
||||
"build": "babel --source-maps --out-dir=dist/ src/",
|
||||
"dev": "babel --watch --source-maps --out-dir=dist/ src/",
|
||||
"prepare": "yarn run build",
|
||||
"prepublishOnly": "yarn run build"
|
||||
}
|
||||
}
|
||||
|
@ -27,9 +27,6 @@ const startsWith = require('lodash/startsWith')
|
||||
const prettyMs = require('pretty-ms')
|
||||
const progressStream = require('progress-stream')
|
||||
const pw = require('pw')
|
||||
|
||||
// FIXME: re-enable the rule when https://github.com/mysticatea/eslint-plugin-node/issues/100 is fixed
|
||||
// eslint-disable-next-line node/no-missing-require
|
||||
const Xo = require('xo-lib').default
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -1 +1 @@
|
||||
module.exports = require('./dist/index') // eslint-disable-line node/no-missing-require
|
||||
module.exports = require('./dist/index')
|
||||
|
@ -1 +1 @@
|
||||
module.exports = require('./dist/unique-index') // eslint-disable-line node/no-missing-require
|
||||
module.exports = require('./dist/unique-index')
|
||||
|
@ -1 +1 @@
|
||||
module.exports = require('./dist/view') // eslint-disable-line node/no-missing-require
|
||||
module.exports = require('./dist/view')
|
||||
|
@ -1 +1 @@
|
||||
module.exports = require('./dist/api-errors') // eslint-disable-line node/no-missing-require
|
||||
module.exports = require('./dist/api-errors')
|
||||
|
@ -4,7 +4,7 @@ process.on('unhandledRejection', function (error) {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
const Xo = require('./').default // eslint-disable-line node/no-missing-require
|
||||
const Xo = require('./').default
|
||||
|
||||
const xo = new Xo({
|
||||
url: 'localhost:9000',
|
||||
|
@ -40,7 +40,6 @@
|
||||
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
|
||||
"prebuild": "rimraf dist/",
|
||||
"predev": "yarn run prebuild",
|
||||
"prepare": "yarn run build",
|
||||
"prepublishOnly": "yarn run build"
|
||||
},
|
||||
"babel": {
|
||||
|
@ -8,4 +8,4 @@ if (process.env.DEBUG === undefined) {
|
||||
}
|
||||
|
||||
// Import the real main module.
|
||||
module.exports = require('./dist').default // eslint-disable-line node/no-missing-require
|
||||
module.exports = require('./dist').default
|
||||
|
@ -44,7 +44,7 @@ import {
|
||||
pSettle,
|
||||
} from '../utils'
|
||||
|
||||
import mixins from './mixins' // eslint-disable-line node/no-missing-import
|
||||
import mixins from './mixins'
|
||||
import OTHER_CONFIG_TEMPLATE from './other-config-template'
|
||||
import {
|
||||
asBoolean,
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
mapValues,
|
||||
} from 'lodash'
|
||||
|
||||
import * as methods from '../api' // eslint-disable-line node/no-missing-import
|
||||
import * as methods from '../api'
|
||||
import {
|
||||
MethodNotFound,
|
||||
} from 'json-rpc-peer'
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
stubTrue,
|
||||
} from 'lodash'
|
||||
|
||||
import mixins from './xo-mixins' // eslint-disable-line node/no-missing-import
|
||||
import mixins from './xo-mixins'
|
||||
import Connection from './connection'
|
||||
import {
|
||||
mixin,
|
||||
|
@ -45,7 +45,6 @@
|
||||
"dev-test": "mocha --watch --reporter=min \"dist/**/*.spec.js\"",
|
||||
"prebuild": "yarn run clean",
|
||||
"predev": "yarn run prebuild",
|
||||
"prepare": "yarn run build",
|
||||
"prepublishOnly": "yarn run build",
|
||||
"test-disabled": "mocha \"dist/**/*.spec.js\""
|
||||
},
|
||||
|
@ -124,6 +124,7 @@
|
||||
"redux": "^3.7.2",
|
||||
"redux-thunk": "^2.0.1",
|
||||
"reselect": "^2.5.4",
|
||||
"rimraf": "^2.6.2",
|
||||
"semver": "^5.4.1",
|
||||
"styled-components": "^3.1.5",
|
||||
"tar-stream": "^1.5.5",
|
||||
@ -188,5 +189,11 @@
|
||||
"react",
|
||||
"stage-0"
|
||||
]
|
||||
},
|
||||
"jest": {
|
||||
"setupTestFrameworkScriptFile": "./setup-tests.js",
|
||||
"snapshotSerializers": [
|
||||
"enzyme-to-json/serializer"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import Upgrade from 'xoa-upgrade'
|
||||
import { addSubscriptions, connectStore } from 'utils'
|
||||
import { Container, Row, Col } from 'grid'
|
||||
import { createGetObjectsOfType, createSelector } from 'selectors'
|
||||
// eslint-disable-next-line node/no-extraneous-import
|
||||
import { formatIps, getNextIpV4, parseIpPattern } from 'ip'
|
||||
import { injectIntl } from 'react-intl'
|
||||
import { Input as DebounceInput } from 'debounce-input-decorator'
|
||||
|
@ -9,6 +9,7 @@ import SortedTable from 'sorted-table'
|
||||
import StateButton from 'state-button'
|
||||
import TabButton from 'tab-button'
|
||||
import Tooltip from 'tooltip'
|
||||
// eslint-disable-next-line node/no-extraneous-import
|
||||
import { isIp, isIpV4 } from 'ip'
|
||||
import { Container, Row, Col } from 'grid'
|
||||
import { injectIntl } from 'react-intl'
|
||||
|
Loading…
Reference in New Issue
Block a user