-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[eslint] enable no undef #10825
[eslint] enable no undef #10825
Changes from 20 commits
8b74e23
476178d
c5feea6
aa2bb17
9da354a
23ed1d2
f90e6c1
bfe0cac
c07e840
8f0214b
4b471a5
e2c149a
4cd362b
0df17de
337a465
cabd018
74cad8c
3588734
2dd2761
c3cfac3
b8958ea
9af995e
c987885
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
--- | ||
extends: '@elastic/kibana' | ||
rules: | ||
no-unused-vars: off |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import cluster from 'cluster'; | ||
const { join, resolve } = require('path'); | ||
const { format: formatUrl } = require('url'); | ||
import Hapi from 'hapi'; | ||
const { debounce, compact, get, invoke, bindAll, once, sample, uniq } = require('lodash'); | ||
import { resolve } from 'path'; | ||
import { debounce, invoke, bindAll, once, uniq } from 'lodash'; | ||
|
||
import Log from '../log'; | ||
import Worker from './worker'; | ||
|
@@ -83,8 +80,8 @@ module.exports = class ClusterManager { | |
} | ||
|
||
setupWatching(extraPaths) { | ||
const chokidar = require('chokidar'); | ||
const fromRoot = require('../../utils/from_root'); | ||
const chokidar = require('chokidar'); // kibana-jscodeshift-ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What is this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a signal to the jscodeshift transforms that the require statement on that line needs to stay on that line, I planned to remove them before submitting the pr |
||
const fromRoot = require('../../utils/from_root'); // kibana-jscodeshift-ignore | ||
|
||
const watchPaths = [ | ||
fromRoot('src/core_plugins'), | ||
|
@@ -114,7 +111,7 @@ module.exports = class ClusterManager { | |
} | ||
|
||
setupManualRestart() { | ||
const readline = require('readline'); | ||
const readline = require('readline'); // kibana-jscodeshift-ignore | ||
const rl = readline.createInterface(process.stdin, process.stdout); | ||
|
||
let nls = 0; | ||
|
@@ -124,7 +121,7 @@ module.exports = class ClusterManager { | |
rl.setPrompt(''); | ||
rl.prompt(); | ||
|
||
rl.on('line', line => { | ||
rl.on('line', () => { | ||
nls = nls + 1; | ||
|
||
if (nls >= 2) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import expect from 'expect.js'; | ||
import { join, relative, resolve } from 'path'; | ||
import readYamlConfig from '../read_yaml_config'; | ||
import sinon from 'auto-release-sinon'; | ||
|
||
function fixture(name) { | ||
return resolve(__dirname, 'fixtures', name); | ||
} | ||
|
||
describe('cli/serve/read_yaml_config', function () { | ||
it('reads a single config file', function () { | ||
const config = readYamlConfig(fixture('one.yml')); | ||
readYamlConfig(fixture('one.yml')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this call anymore? Are there other places where we have situations like this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't look like it |
||
|
||
expect(readYamlConfig(fixture('one.yml'))).to.eql({ | ||
foo: 1, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { spawn } from 'child_process'; | ||
import { writeFileSync, readFile } from 'fs'; | ||
import { writeFileSync } from 'fs'; | ||
import { relative, resolve } from 'path'; | ||
import { safeDump } from 'js-yaml'; | ||
import es from 'event-stream'; | ||
|
@@ -33,7 +33,7 @@ describe(`Server logging configuration`, function () { | |
|
||
let asserted = false; | ||
let json = Infinity; | ||
const conf = setLoggingJson(true); | ||
setLoggingJson(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this call anymore? What is this doing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this is writing a config file that is then read by the server on startup. |
||
const child = spawn(cli, [`--config`, testConfigFile]); | ||
|
||
child.on('error', err => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's
kibana-jscodeshift-ignore
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ignore
require
->import
?