[eslint] use prettier for all the things

(cherry picked from commit a3553c924d)

# Conflicts:
#	.eslintrc.js
#	packages/eslint-config-kibana/.eslintrc.js
#	packages/eslint-config-kibana/javascript.js
This commit is contained in:
spalger 2019-12-12 09:16:24 -07:00 committed by spalger
parent 965d809ec6
commit a1f1079a0d
73 changed files with 99 additions and 297 deletions

View file

@ -36,46 +36,6 @@ module.exports = {
extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'],
overrides: [
/**
* Prettier
*/
{
files: [
'.eslintrc.js',
'packages/kbn-utility-types/**/*',
'packages/kbn-eslint-plugin-eslint/**/*',
'packages/kbn-config-schema/**/*',
'packages/kbn-pm/**/*',
'packages/kbn-es/**/*',
'packages/elastic-datemath/**/*',
'packages/kbn-i18n/**/*',
'packages/kbn-dev-utils/**/*',
'packages/kbn-plugin-helpers/**/*',
'packages/kbn-plugin-generator/**/*',
'packages/kbn-test-subj-selector/**/*',
'packages/kbn-test/**/*',
'packages/kbn-eslint-import-resolver-kibana/**/*',
'src/legacy/server/saved_objects/**/*',
'x-pack/legacy/plugins/apm/**/*',
'x-pack/legacy/plugins/canvas/**/*',
'**/*.{ts,tsx}',
'src/legacy/core_plugins/metrics/**/*.js',
],
plugins: ['prettier'],
rules: Object.assign(
{
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
require('eslint-config-prettier').rules,
require('eslint-config-prettier/react').rules
),
},
/**
* Files that require Apache 2.0 headers, settings
* are overridden below for files that require Elastic
@ -522,8 +482,6 @@ module.exports = {
'accessor-pairs': 'error',
'array-callback-return': 'error',
'no-array-constructor': 'error',
// This will be turned on after bug fixes are mostly completed
// 'arrow-body-style': ['warn', 'as-needed'],
complexity: 'warn',
// This will be turned on after bug fixes are mostly completed
// 'consistent-return': 'warn',
@ -553,7 +511,6 @@ module.exports = {
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-label': 'error',
'no-floating-decimal': 'error',
'no-func-assign': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
@ -587,15 +544,12 @@ module.exports = {
// 'no-useless-return': 'warn',
// This will be turned on after bug fixers are mostly complete
// 'no-void': 'warn',
'one-var-declaration-per-line': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
// This style will be turned on after most bugs are fixed
// 'prefer-template': 'warn',
// This style will be turned on after most bugs are fixed
// quotes: ['warn', 'single', { avoidEscape: true }],
'react/boolean-prop-naming': 'error',
'react/button-has-type': 'error',
'react/forbid-dom-props': 'error',
@ -631,12 +585,8 @@ module.exports = {
'react/jsx-fragments': 'error',
'react/jsx-sort-default-props': 'error',
// might be introduced after the other warns are fixed
// 'react/jsx-sort-props': 'error',
'react/jsx-tag-spacing': 'error',
'require-atomic-updates': 'error',
'rest-spread-spacing': ['error', 'never'],
'symbol-description': 'error',
'template-curly-spacing': 'error',
'vars-on-top': 'error',
},
},
@ -671,8 +621,6 @@ module.exports = {
{
files: ['x-pack/legacy/plugins/monitoring/**/*.js'],
rules: {
'block-spacing': ['error', 'always'],
curly: ['error', 'all'],
'no-unused-vars': ['error', { args: 'all', argsIgnorePattern: '^_' }],
'no-else-return': 'error',
},
@ -689,7 +637,6 @@ module.exports = {
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
rules: {
radix: 'error',
curly: ['error', 'all'],
// module importing
'import/order': [
@ -707,7 +654,6 @@ module.exports = {
'react/self-closing-comp': 'error',
'react/sort-comp': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-wrap-multilines': 'error',
'react/no-unescaped-entities': ['error', { forbid: ['>', '}'] }],
'react/forbid-elements': [
'error',

View file

@ -4,7 +4,11 @@ module.exports = {
'./typescript.js',
'./jest.js',
],
plugins: ['@kbn/eslint-plugin-eslint'],
plugins: [
'@kbn/eslint-plugin-eslint',
'prettier',
],
parserOptions: {
ecmaVersion: 6
@ -14,28 +18,39 @@ module.exports = {
es6: true
},
rules: {
'@kbn/eslint/module_migration': [
'error',
[
rules: Object.assign(
{
'prettier/prettier': [
'error',
{
from: 'expect.js',
to: '@kbn/expect',
},
{
from: 'mkdirp',
to: false,
disallowedMessage: `Don't use 'mkdirp', use the new { recursive: true } option of Fs.mkdir instead`
},
{
from: 'x-pack',
toRelative: 'x-pack',
},
{
from: 'react-router',
to: 'react-router-dom',
endOfLine: 'auto',
},
],
],
}
'@kbn/eslint/module_migration': [
'error',
[
{
from: 'expect.js',
to: '@kbn/expect',
},
{
from: 'mkdirp',
to: false,
disallowedMessage: `Don't use 'mkdirp', use the new { recursive: true } option of Fs.mkdir instead`
},
{
from: 'x-pack',
toRelative: 'x-pack',
},
{
from: 'react-router',
to: 'react-router-dom',
},
],
],
},
require('eslint-config-prettier').rules,
require('eslint-config-prettier/react').rules
)
};

View file

@ -51,18 +51,10 @@ module.exports = {
rules: {
'block-scoped-var': 'error',
camelcase: [ 'error', { properties: 'never' } ],
'comma-dangle': 'off',
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': [ 'error', 'last' ],
'consistent-return': 'off',
curly: [ 'error', 'multi-line' ],
'dot-location': [ 'error', 'property' ],
'dot-notation': [ 'error', { allowKeywords: true } ],
eqeqeq: [ 'error', 'allow-null' ],
'guard-for-in': 'error',
indent: [ 'error', 2, { SwitchCase: 1 } ],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'max-len': [ 'error', 140, 2, { ignoreComments: true, ignoreUrls: true } ],
'new-cap': [ 'error', { capIsNewExceptions: [ 'Private' ] } ],
'no-bitwise': 'off',
'no-caller': 'error',
@ -72,13 +64,10 @@ module.exports = {
'no-empty': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-parens': 'off',
'no-extra-semi': [ 'error' ],
'no-global-assign': 'error',
'no-irregular-whitespace': 'error',
'no-iterator': 'error',
'no-loop-func': 'error',
'no-multi-spaces': 'off',
'no-multi-str': 'off',
'no-nested-ternary': 'error',
'no-new': 'off',
@ -92,7 +81,6 @@ module.exports = {
'no-script-url': 'error',
'no-sequences': 'error',
'no-shadow': 'off',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-underscore-dangle': 'off',
'no-unsanitized/method': 'error',
@ -104,44 +92,18 @@ module.exports = {
'no-with': 'error',
'one-var': [ 'error', 'never' ],
'prefer-const': 'error',
quotes: [ 'error', 'single', { allowTemplateLiterals: true } ],
'semi-spacing': [ 'error', { before: false, after: true } ],
semi: [ 'error', 'always' ],
'space-before-blocks': [ 'error', 'always' ],
'space-before-function-paren': [ 'error', { anonymous: 'always', named: 'never' } ],
'space-in-parens': [ 'error', 'never' ],
'space-infix-ops': [ 'error', { int32Hint: false } ],
'space-unary-ops': [ 'error' ],
strict: [ 'error', 'never' ],
'valid-typeof': 'error',
'wrap-iife': [ 'error', 'outside' ],
'eol-last': ['error', 'always'],
yoda: 'off',
'object-curly-spacing': 'off', // overridden with babel/object-curly-spacing
'babel/object-curly-spacing': [ 'error', 'always' ],
'jsx-quotes': ['error', 'prefer-double'],
'react/jsx-uses-react': 'error',
'react/react-in-jsx-scope': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
'react/jsx-closing-tag-location': 'error',
'react/jsx-curly-spacing': ['error', 'never', { allowMultiline: true }],
'react/jsx-indent-props': ['error', 2],
'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }],
'react/jsx-no-duplicate-props': ['error', { ignoreCase: true }],
'react/no-danger': 'error',
'react/self-closing-comp': 'error',
'react/jsx-wrap-multilines': ['error', {
declaration: true,
assignment: true,
return: true,
arrow: true,
}],
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'jsx-a11y/accessible-emoji': 'error',
@ -169,8 +131,6 @@ module.exports = {
'jsx-a11y/scope': 'error',
'jsx-a11y/tabindex-no-positive': 'error',
'jsx-a11y/label-has-associated-control': 'error',
'react/jsx-equals-spacing': ['error', 'never'],
'react/jsx-indent': ['error', 2],
'react/no-will-update-set-state': 'error',
'react/no-is-mounted': 'error',
'react/no-multi-comp': ['error', { ignoreStateless: true }],

View file

@ -90,8 +90,6 @@ module.exports = {
}
}
],
'indent': 'off',
'@typescript-eslint/indent': [ 'error', 2, { SwitchCase: 1 } ],
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-interface': 'error',
'@typescript-eslint/member-ordering': ['error', {
@ -105,13 +103,8 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unified-signatures': 'error',
'arrow-body-style': 'error',
'arrow-parens': 'error',
'comma-dangle': ['error', 'always-multiline'],
'constructor-super': 'error',
'curly': 'error',
'dot-notation': 'error',
'eol-last': 'error',
'eqeqeq': ['error', 'always', {'null': 'ignore'}],
'guard-for-in': 'error',
'import/order': ['error', {
@ -122,8 +115,6 @@ module.exports = {
],
}],
'max-classes-per-file': ['error', 1],
'max-len': [ 'error', { code: 120, ignoreComments: true, ignoreUrls: true } ],
'new-parens': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
'no-cond-assign': 'error',
@ -132,29 +123,18 @@ module.exports = {
'no-empty': 'error',
'no-extend-native': 'error',
'no-eval': 'error',
'no-multiple-empty-lines': 'error',
'no-new-wrappers': 'error',
'no-shadow': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-undef-init': 'error',
'no-unsafe-finally': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-var': 'error',
'object-curly-spacing': 'error',
'object-shorthand': 'error',
'one-var': [ 'error', 'never' ],
'prefer-const': 'error',
'quotes': ['error', 'double', { 'avoidEscape': true }],
'quote-props': ['error', 'consistent-as-needed'],
'radix': 'error',
'semi': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always'
}],
'spaced-comment': ["error", "always", {
"exceptions": ["/"]
}],

View file

@ -97,21 +97,30 @@ module.exports = function({ name }) {
enforceNewFolder: true,
installDependencies: false,
gitInit: true,
post({ log }) {
return execa('yarn', ['kbn', 'bootstrap'], {
async post({ log }) {
await execa('yarn', ['kbn', 'bootstrap'], {
cwd: KBN_DIR,
stdio: 'inherit',
}).then(() => {
const dir = relative(process.cwd(), resolve(KBN_DIR, 'plugins', snakeCase(name)));
log.success(chalk`🎉
Your plugin has been created in {bold ${dir}}. Move into that directory to run it:
{bold cd "${dir}"}
{bold yarn start}
`);
});
const dir = relative(process.cwd(), resolve(KBN_DIR, 'plugins', snakeCase(name)));
try {
await execa('yarn', ['lint', '--fix'], {
cwd: dir,
all: true,
});
} catch (error) {
throw new Error(`Failure when running prettier on the generated output: ${error.all}`);
}
log.success(chalk`🎉
Your plugin has been created in {bold ${dir}}. Move into that directory to run it:
{bold cd "${dir}"}
{bold yarn start}
`);
},
};
};

View file

@ -41,7 +41,8 @@ export default function (kibana) {
},
<%_ if (generateApi || generateApp) { -%>
init(server, options) { // eslint-disable-line no-unused-vars
// eslint-disable-next-line no-unused-vars
init(server, options) {
<%_ if (generateApp) { -%>
const xpackMainPlugin = server.plugins.xpack_main;
if (xpackMainPlugin) {

View file

@ -71,7 +71,7 @@ export class Table extends Component {
status: 'warning',
dateCreated: 'Tue Dec 06 2016 12:56:15 GMT-0800 (PST)',
}, {
title: 'You can also specify that really long content wraps instead of becoming truncated with an ellipsis (which is the default behavior)', // eslint-disable-line max-len
title: 'You can also specify that really long content wraps instead of becoming truncated with an ellipsis (which is the default behavior)',
isLink: true,
isWrapped: true,
status: 'danger',

View file

@ -18,7 +18,6 @@
*/
import { castEsToKbnFieldTypeName } from '../plugins/data/common';
// eslint-disable-next-line max-len
import { shouldReadFieldFromDocValues } from '../legacy/server/index_patterns/service/lib/field_capabilities/should_read_field_from_doc_values';
function stubbedLogstashFields() {

View file

@ -63,7 +63,6 @@ export function ScriptHighlightRules() {
},
{
token: 'script.keyword.operator',
// eslint-disable-next-line max-len
regex: '\\?\\.|\\*\\.|=~|==~|!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|->|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|typeof|void)'
},
{

View file

@ -18,7 +18,6 @@
*/
/* eslint import/no-unresolved: 0 */
/* eslint max-len: 0 */
const ace = require('brace');
ace.define('ace/theme/sense-dark', ['require', 'exports', 'module'],

View file

@ -59,24 +59,24 @@ describe('Utils class', () => {
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning"')).toEqual(
['#! Deprecation: this is a warning']);
expect(utils.extractDeprecationMessages( //eslint-disable-next-line max-len
expect(utils.extractDeprecationMessages(
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning" "Mon, 27 Feb 2017 14:52:14 GMT", 299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a second warning" "Mon, 27 Feb 2017 14:52:14 GMT"')).toEqual(
['#! Deprecation: this is a warning', '#! Deprecation: this is a second warning']);
expect(utils.extractDeprecationMessages( //eslint-disable-next-line max-len
expect(utils.extractDeprecationMessages(
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning", 299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a second warning"')).toEqual(
['#! Deprecation: this is a warning', '#! Deprecation: this is a second warning']);
expect(utils.extractDeprecationMessages( //eslint-disable-next-line max-len
expect(utils.extractDeprecationMessages(
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning, and it includes a comma" "Mon, 27 Feb 2017 14:52:14 GMT"')).toEqual(
['#! Deprecation: this is a warning, and it includes a comma']);
expect(utils.extractDeprecationMessages( //eslint-disable-next-line max-len
expect(utils.extractDeprecationMessages(
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning, and it includes a comma"')).toEqual(
['#! Deprecation: this is a warning, and it includes a comma']);
expect(utils.extractDeprecationMessages( //eslint-disable-next-line max-len
expect(utils.extractDeprecationMessages(
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning, and it includes an escaped backslash \\\\ and a pair of \\\"escaped quotes\\\"" "Mon, 27 Feb 2017 14:52:14 GMT"')).toEqual(
['#! Deprecation: this is a warning, and it includes an escaped backslash \\ and a pair of "escaped quotes"']);
expect(utils.extractDeprecationMessages( //eslint-disable-next-line max-len
expect(utils.extractDeprecationMessages(
'299 Elasticsearch-6.0.0-alpha1-SNAPSHOT-abcdef1 "this is a warning, and it includes an escaped backslash \\\\ and a pair of \\\"escaped quotes\\\""')).toEqual(
['#! Deprecation: this is a warning, and it includes an escaped backslash \\ and a pair of "escaped quotes"']);
});

View file

@ -6,13 +6,9 @@ extends: '../../../../../../../.eslintrc.js'
rules:
block-scoped-var: off
camelcase: off
curly: off
dot-location: off
dot-notation: off
eqeqeq: off
guard-for-in: off
indent: off
max-len: off
new-cap: off
no-caller: off
no-empty: off
@ -25,12 +21,6 @@ rules:
no-undef: off
no-use-before-define: off
one-var: off
quotes: off
space-before-blocks: off
space-in-parens: off
space-infix-ops: off
semi: off
strict: off
wrap-iife: off
no-var: off
prefer-const: off

View file

@ -540,7 +540,7 @@ export class IndexPattern implements StaticIndexPattern {
{
defaultMessage:
'Unable to write index pattern! Refresh the page to get the most up to date changes for this index pattern.',
} // eslint-disable-line max-len
}
);
this.notifications.toasts.addDanger(message);
throw err;

View file

@ -441,7 +441,6 @@ Object {
},
};
const migratedDoc = migrate(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -467,7 +466,6 @@ Object {
"type": "visualization",
}
`);
/* eslint-enable max-len */
});
it('extracts index patterns from controls', () => {
@ -493,7 +491,6 @@ Object {
},
};
const migratedDoc = migrate(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -511,7 +508,6 @@ Object {
"type": "visualization",
}
`);
/* eslint-enable max-len */
});
it('skips extracting savedSearchId when missing', () => {
@ -1571,7 +1567,6 @@ Object {
},
};
const migratedDoc = migration(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -1601,7 +1596,6 @@ Object {
"type": "dashboard",
}
`);
/* eslint-enable max-len */
});
test('skips error when panelsJSON is not a string', () => {
@ -1919,7 +1913,6 @@ Object {
},
};
const migratedDoc = migration(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -1939,7 +1932,6 @@ Object {
"type": "search",
}
`);
/* eslint-enable max-len */
});
});

View file

@ -40,7 +40,6 @@ describe('extractReferences', () => {
},
};
const updatedDoc = extractReferences(doc);
/* eslint-disable max-len */
expect(updatedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -61,7 +60,6 @@ Object {
],
}
`);
/* eslint-enable max-len */
});
test('fails when "type" attribute is missing from a panel', () => {
@ -136,7 +134,6 @@ describe('injectReferences', () => {
},
];
injectReferences(context, references);
/* eslint-disable max-len */
expect(context).toMatchInlineSnapshot(`
Object {
"foo": true,
@ -144,7 +141,6 @@ Object {
"panelsJSON": "[{\\"title\\":\\"Title 1\\",\\"id\\":\\"1\\",\\"type\\":\\"visualization\\"},{\\"title\\":\\"Title 2\\",\\"id\\":\\"2\\",\\"type\\":\\"visualization\\"}]",
}
`);
/* eslint-enable max-len */
});
test('skips when panelsJSON is missing', () => {

View file

@ -63,7 +63,6 @@ function getFieldValueCounts(params) {
if (params.hits.length - missing === 0) {
return {
error: i18n.translate('kbn.discover.fieldChooser.fieldCalculator.fieldIsNotPresentInDocumentsErrorMessage', {
// eslint-disable-next-line max-len
defaultMessage: 'This field is present in your Elasticsearch mapping but not in the {hitsLength} documents shown in the doc table. You may still be able to visualize or search on it.',
values: {
hitsLength: params.hits.length,

View file

@ -519,7 +519,6 @@ function discoverController(
$scope.getBucketIntervalToolTipText = () => {
return i18n.translate('kbn.discover.bucketIntervalTooltip', {
// eslint-disable-next-line max-len
defaultMessage: 'This interval creates {bucketsDescription} to show in the selected time range, so it has been scaled to {bucketIntervalDescription}',
values: {
bucketsDescription: $scope.bucketInterval.scale > 1

View file

@ -44,7 +44,6 @@ function displayBanner() {
iconType="iInCircle"
title={
i18n.translate('kbn.management.indexPattern.bannerLabel',
//eslint-disable-next-line max-len
{ defaultMessage: 'In order to visualize and explore data in Kibana, you\'ll need to create an index pattern to retrieve data from Elasticsearch.' })
}
/>

View file

@ -85,7 +85,6 @@ Object {
},
};
const updatedDoc = extractReferences(doc);
/* eslint-disable max-len */
expect(updatedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -101,7 +100,7 @@ Object {
],
}
`);
/* eslint-enable max-len */
});
});

View file

@ -17,8 +17,6 @@
* under the License.
*/
/* eslint-disable quotes */
/*
Really didn't want to do this, but testing the agg flatten logic
in units isn't really possible since the functions depend on each other

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint max-len:0 */
/* eslint-disable jsx-a11y/anchor-is-valid, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
// Markdown builder is not yet properly accessible

View file

@ -21,7 +21,6 @@ import React from 'react';
export const bombIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
{/* eslint-disable-next-line max-len */}
<path d="M3.92176768,4.53361616 L3.46466635,5.59664282 L2.65302767,4.14840719 L0.999875397,3.99598886 L2.12641918,2.77654518 L1.76052549,1.15720408 L3.26840652,1.85178207 L4.69542405,1.00339256 L4.500802,2.65210905 L5.74864103,3.7471166 L4.73514583,3.9490388 L5.61669633,5.03766301 C6.0459022,4.69009896 6.67559863,4.75628272 7.02316269,5.18548858 L7.15815921,5.3521954 C7.8837785,5.06498672 8.68754455,4.943927 9.51742529,5.03115098 C12.2637217,5.31979836 14.2560398,7.78010639 13.9673924,10.5264028 C13.6787451,13.2726992 11.218437,15.2650173 8.47214065,14.9763699 C5.72584427,14.6877226 3.73352611,12.2274145 4.02217349,9.48111814 C4.10939747,8.6512374 4.39492411,7.8902053 4.82672133,7.24015658 L4.6917248,7.07344975 C4.34416075,6.64424389 4.41034451,6.01454746 4.83955037,5.6669834 L3.92176768,4.53361616 Z M5.46887076,6.44412936 L6.12580983,7.24015658 C6.03489722,7.30663504 5.87952666,7.491071 5.65969815,7.79346445 C5.30650784,8.32517447 5.08508565,8.93495668 5.01669539,9.5856466 C4.78577748,11.7826837 6.37963201,13.7509301 8.57666912,13.981848 C10.7737062,14.2127659 12.7419526,12.6189114 12.9728706,10.4218743 C13.2037885,8.2248372 11.6099339,6.25659078 9.41289682,6.02567287 C8.7622069,5.95728261 8.11971364,6.04708534 7.52619036,6.28200886 C7.24048061,6.40187373 7.0242157,6.5121707 6.87739563,6.61289978 L6.24601673,5.81480897 L5.46887076,6.44412936 Z M3.34009664,3.61834468 C3.6160708,3.60870745 3.83197954,3.37717367 3.82234231,3.10119951 C3.81270508,2.82522536 3.5811713,2.60931662 3.30519715,2.61895385 C3.02922299,2.62859108 2.81331425,2.86012485 2.82295148,3.13609901 C2.83258871,3.41207317 3.06412249,3.62798191 3.34009664,3.61834468 Z M9.2038399,8.01471666 C8.92921026,7.98585193 8.72997844,7.73982112 8.75884318,7.46519148 C8.78770792,7.19056185 9.03373872,6.99133003 9.30836836,7.02019477 C10.7411945,7.17079087 11.8319627,8.30660625 11.9782919,9.68376241 C11.9842403,9.72621687 11.9855849,9.77015886 11.9808868,9.81485847 C11.9520221,10.0894881 11.7059913,10.2887199 11.4313616,10.2598552 C11.1835304,10.2338071 10.9971003,10.0309074 10.9842889,9.78973323 C10.8859009,8.87197536 10.1588372,8.11509093 9.2038399,8.01471666 Z" />
</svg>
);

View file

@ -21,7 +21,6 @@ import React from 'react';
export const fireIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
{/* eslint-disable-next-line max-len */}
<path d="M10.4285489,13.2131862 C11.3850613,12.5116211 12,11.4062861 12,10.1681623 C12,8.88948911 11.7647926,7.64522527 11.315853,6.48027409 L10.7184365,8.07936372 L9.62838732,6.51595716 C8.65161637,5.11502026 7.41222171,3.90368767 5.9820674,2.94508952 C5.99399825,3.12925457 6,3.31436795 6,3.50022638 C6,5.08794888 5.48443413,6.95085436 4.74437685,7.94154468 C4.26219055,8.5870316 4,9.35779518 4,10.1681623 C4,11.4427639 4.65170744,12.5766371 5.65687647,13.2741368 C5.73557697,13.041105 5.84196228,12.8229717 5.97161458,12.624616 C6.26836682,12.1706132 6.5,11.2280234 6.5,10.4287008 C6.5,9.92871906 6.42479348,9.44813694 6.28619258,9 C7.47628141,9.64169048 8.4897566,10.6210605 9.22434324,11.8251557 C9.23213615,11.8013168 9.2406884,11.7775998 9.25,11.7540048 C9.39656041,11.3826304 9.5,11.0805724 9.5,10.6495848 C9.5,10.6240812 9.49971537,10.5986511 9.49914944,10.5732981 C9.96875289,11.3529062 10.2928315,12.2486386 10.4285489,13.2131862 Z M10.4486865,5.94402249 C10.4642723,5.90230435 10.4813768,5.86079967 10.5,5.81950846 C10.7931208,5.16960326 11,4.64100165 11,3.88677339 C11,3.84214218 10.9994307,3.79763944 10.9982989,3.7532716 C12.2630338,5.59045545 13,7.7961396 13,10.1681623 C13,12.8367126 10.7614237,15 8,15 C5.23857625,15 3,12.8367126 3,10.1681623 C3,9.11340491 3.34972471,8.13758287 3.94322917,7.34307798 C4.53673363,6.54857309 5,4.8990409 5,3.50022638 C5,2.62525836 4.84958695,1.78423964 4.57238517,1 C6.95256283,2.12295834 8.97951321,3.83685594 10.4486865,5.94402249 Z" />
</svg>
);

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint max-len:0 */
const filter = metric => metric.type === 'filter_ratio';
import { bucketTransform } from '../../helpers/bucket_transform';
import _ from 'lodash';

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint max-len:0 */
const filter = metric => metric.type === 'filter_ratio';
import { bucketTransform } from '../../helpers/bucket_transform';
import _ from 'lodash';

View file

@ -93,7 +93,6 @@ export class EsQueryParser {
}));
} else if (legacyContext !== true && (typeof legacyContext !== 'string' || legacyContext.length === 0)) {
throw new Error(i18n.translate('visTypeVega.esQueryParser.legacyContextCanBeTrueErrorMessage', {
// eslint-disable-next-line max-len
defaultMessage: 'Legacy {legacyContext} can either be {trueValue} (ignores time range picker), or it can be the name of the time field, e.g. {timestampParam}',
values: { legacyContext: `"${LEGACY_CONTEXT}"`, trueValue: 'true', timestampParam: '"@timestamp"' },
}));

View file

@ -143,7 +143,7 @@ describe('server logging LogInterceptor', () => {
describe('#downgradeIfHTTPWhenHTTPS', () => {
it('transforms http requests when serving https errors', () => {
const message = '40735139278848:error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request:../deps/openssl/openssl/ssl/s23_srvr.c:394'; // eslint-disable-line max-len
const message = '40735139278848:error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request:../deps/openssl/openssl/ssl/s23_srvr.c:394';
const interceptor = new LogInterceptor();
const event = stubClientErrorEvent({ message });
assertDowngraded(interceptor.downgradeIfHTTPWhenHTTPS(event));

View file

@ -17,9 +17,6 @@
* under the License.
*/
/* eslint max-len: 0 */
/* eslint quotes: 0 */
export const fieldMappings = {
category: {
type: 'text',

View file

@ -17,9 +17,6 @@
* under the License.
*/
/* eslint max-len: 0 */
/* eslint quotes: 0 */
import { i18n } from '@kbn/i18n';
export const getSavedObjects = () => [

View file

@ -17,9 +17,6 @@
* under the License.
*/
/* eslint max-len: 0 */
/* eslint quotes: 0 */
export const fieldMappings = {
timestamp: {
type: 'date'

View file

@ -17,9 +17,6 @@
* under the License.
*/
/* eslint max-len: 0 */
/* eslint quotes: 0 */
import { i18n } from '@kbn/i18n';
export const getSavedObjects = () => [

View file

@ -17,9 +17,6 @@
* under the License.
*/
/* eslint max-len: 0 */
/* eslint quotes: 0 */
export const fieldMappings = {
request: {
type: 'text',

View file

@ -17,9 +17,6 @@
* under the License.
*/
/* eslint max-len: 0 */
/* eslint quotes: 0 */
import { i18n } from '@kbn/i18n';
export const getSavedObjects = () => [

View file

@ -90,7 +90,6 @@ describe('buildHierarchicalData convertTable', () => {
{ 'id': 'col-5-agg_1', 'name': 'Average bytes' }
],
rows: [
/* eslint-disable max-len */
{ 'col-0-agg_2': 'png', 'col-2-agg_3': 'IT', 'col-4-agg_4': 'win', 'col-1-agg_1': 412032, 'col-3-agg_1': 9299, 'col-5-agg_1': 0 },
{ 'col-0-agg_2': 'png', 'col-2-agg_3': 'IT', 'col-4-agg_4': 'mac', 'col-1-agg_1': 412032, 'col-3-agg_1': 9299, 'col-5-agg_1': 9299 },
{ 'col-0-agg_2': 'png', 'col-2-agg_3': 'US', 'col-4-agg_4': 'linux', 'col-1-agg_1': 412032, 'col-3-agg_1': 8293, 'col-5-agg_1': 3992 },
@ -103,7 +102,6 @@ describe('buildHierarchicalData convertTable', () => {
{ 'col-0-agg_2': 'html', 'col-2-agg_3': 'CN', 'col-4-agg_4': 'mac', 'col-1-agg_1': 412032, 'col-3-agg_1': 9299, 'col-5-agg_1': 5892 },
{ 'col-0-agg_2': 'html', 'col-2-agg_3': 'FR', 'col-4-agg_4': 'win', 'col-1-agg_1': 412032, 'col-3-agg_1': 8293, 'col-5-agg_1': 3992 },
{ 'col-0-agg_2': 'html', 'col-2-agg_3': 'FR', 'col-4-agg_4': 'mac', 'col-1-agg_1': 412032, 'col-3-agg_1': 8293, 'col-5-agg_1': 3029 }
/* eslint-enable max-len */
]
};
dimensions = {

View file

@ -125,7 +125,6 @@ export const histogramBucketAgg = new BucketAggType<IBucketHistogramAggConfig>({
if (e.name === 'AbortError') return;
toastNotifications.addWarning(
i18n.translate('common.ui.aggTypes.histogram.missingMaxMinValuesWarning', {
// eslint-disable-next-line max-len
defaultMessage:
'Unable to retrieve max and min values to auto-scale histogram buckets. This may lead to poor visualization performance.',
})

View file

@ -119,11 +119,11 @@ describe('Url shortener', () => {
});
it('should shorten urls with a query string in the hash', async () => {
const relativeUrl = "/app/kibana#/discover?_g=(refreshInterval:(pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&_a=(columns:!(_source),index:%27logstash-*%27,interval:auto,query:(query_string:(analyze_wildcard:!t,query:%27*%27)),sort:!(%27@timestamp%27,desc))"; //eslint-disable-line max-len, quotes
const relativeUrl = "/app/kibana#/discover?_g=(refreshInterval:(pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&_a=(columns:!(_source),index:%27logstash-*%27,interval:auto,query:(query_string:(analyze_wildcard:!t,query:%27*%27)),sort:!(%27@timestamp%27,desc))";
kfetchStub.withArgs({
method: 'POST',
pathname: `/api/shorten_url`,
body: '{"url":"/app/kibana#/discover?_g=(refreshInterval:(pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&_a=(columns:!(_source),index:%27logstash-*%27,interval:auto,query:(query_string:(analyze_wildcard:!t,query:%27*%27)),sort:!(%27@timestamp%27,desc))"}' //eslint-disable-line max-len, quotes
body: '{"url":"/app/kibana#/discover?_g=(refreshInterval:(pause:!f,value:0),time:(from:now-15m,mode:quick,to:now))&_a=(columns:!(_source),index:%27logstash-*%27,interval:auto,query:(query_string:(analyze_wildcard:!t,query:%27*%27)),sort:!(%27@timestamp%27,desc))"}'
}).returns(Promise.resolve({ urlId: shareId }));
const shortUrl = await shortenUrl(`http://localhost${basePath}${relativeUrl}`);

View file

@ -35,7 +35,7 @@ export default function ({ getService }) {
await supertest
.post('/elasticsearch/_msearch')
.set('content-type', 'application/x-ndjson')
.send('{"index":"logstash-2015.04.21","ignore_unavailable":true}\n{"size":500,"sort":{"@timestamp":"desc"},"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"bool":{"must":[{"range":{"@timestamp":{"gte":1429577068175,"lte":1429577968175}}}],"must_not":[]}}],"must_not":[]}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"*":{}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30s","min_doc_count":0,"extended_bounds":{"min":1429577068175,"max":1429577968175}}}},"stored_fields":["*"],"_source": true,"script_fields":{},"docvalue_fields":["timestamp_offset","@timestamp","utc_time"]}\n') // eslint-disable-line max-len
.send('{"index":"logstash-2015.04.21","ignore_unavailable":true}\n{"size":500,"sort":{"@timestamp":"desc"},"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"bool":{"must":[{"range":{"@timestamp":{"gte":1429577068175,"lte":1429577968175}}}],"must_not":[]}}],"must_not":[]}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"*":{}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30s","min_doc_count":0,"extended_bounds":{"min":1429577068175,"max":1429577968175}}}},"stored_fields":["*"],"_source": true,"script_fields":{},"docvalue_fields":["timestamp_offset","@timestamp","utc_time"]}\n')
.expect(200)
));
});

View file

@ -10,7 +10,6 @@ export const UPLOAD_LICENSE_EXPIRED = [
'{"acknowledged": "true", "license_status": "expired"}'
];
/* eslint-disable max-len */
export const UPLOAD_LICENSE_REQUIRES_ACK = [
200,
{ 'Content-Type': 'application/json' },
@ -24,7 +23,6 @@ export const UPLOAD_LICENSE_REQUIRES_ACK = [
}
}`
];
/* eslint-enable max-len */
export const UPLOAD_LICENSE_SUCCESS = [
200,

View file

@ -138,7 +138,6 @@ export class StartTrial extends React.PureComponent {
target="_blank"
>
<FormattedMessage
// eslint-disable-next-line max-len
id="xpack.licenseMgmt.licenseDashboard.startTrial.confirmModalDescription.securityDocumentationLinkText"
defaultMessage="documentation"
/>
@ -158,7 +157,6 @@ export class StartTrial extends React.PureComponent {
target="_blank"
>
<FormattedMessage
// eslint-disable-next-line max-len
id="xpack.licenseMgmt.licenseDashboard.startTrial.confirmModalDescription.termsAndConditionsLinkText"
defaultMessage="terms and conditions"
/>

View file

@ -46,7 +46,6 @@ const dispatchFromResponse = async (response, dispatch, currentLicenseType, newL
const messages = Object.values(acknowledge).slice(1);
// messages can be in nested arrays
const first = i18n.translate('xpack.licenseMgmt.uploadLicense.problemWithUploadedLicenseDescription', {
// eslint-disable-next-line max-len
defaultMessage: 'Some functionality will be lost if you replace your {currentLicenseType} license with a {newLicenseType} license. Review the list of features below.',
values: {
currentLicenseType: currentLicenseType.toUpperCase(),

View file

@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint max-len: 0 */
import { emsRasterTileToEmsVectorTile } from './ems_raster_tile_to_ems_vector_tile';
describe('emsRasterTileToEmsVectorTile', () => {

View file

@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint max-len: 0 */
import { extractReferences, injectReferences } from './references';
import { ES_GEO_GRID, ES_SEARCH, ES_PEW_PEW } from '../constants';

View file

@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint max-len: 0 */
import { topHitsTimeToSort } from './top_hits_time_to_sort';
describe('topHitsTimeToSort', () => {

View file

@ -145,7 +145,6 @@ export class MBMapContainer extends React.Component {
});
mbMap.on('load', () => {
emptyImage = new Image();
// eslint-disable-next-line max-len
emptyImage.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=';
emptyImage.crossOrigin = 'anonymous';
resolve(mbMap);

View file

@ -16,7 +16,6 @@ export function getEmsUnavailableMessage() {
}
return i18n.translate('xpack.maps.source.ems.disabledDescription', {
// eslint-disable-next-line max-len
defaultMessage: 'Access to Elastic Maps Service has been disabled. Ask your system administrator to set "map.includeElasticMapsService" in kibana.yml.'
});
}

View file

@ -84,7 +84,6 @@ describe('getLinearGradient', () => {
'rgb(32,112,180)',
'rgb(7,47,107)'
];
// eslint-disable-next-line max-len
expect(getLinearGradient(colorRamp)).toBe('linear-gradient(to right, rgb(247,250,255) 0%, rgb(221,234,247) 14%, rgb(197,218,238) 28%, rgb(157,201,224) 42%, rgb(106,173,213) 57%, rgb(65,145,197) 71%, rgb(32,112,180) 85%, rgb(7,47,107) 100%)');
});
});

View file

@ -23,21 +23,18 @@ describe('styleSvg', () => {
it('Should add fill style property to svg element', async () => {
const unstyledSvgString = '<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11"><path/></svg>';
const styledSvg = await styleSvg(unstyledSvgString, 'red');
// eslint-disable-next-line max-len
expect(styledSvg.split('\n')[1]).toBe('<svg version=\"1.1\" width=\"11px\" height=\"11px\" viewBox=\"0 0 11 11\" style=\"fill:red;\">');
});
it('Should add stroke style property to svg element', async () => {
const unstyledSvgString = '<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11"><path/></svg>';
const styledSvg = await styleSvg(unstyledSvgString, 'red', 'white');
// eslint-disable-next-line max-len
expect(styledSvg.split('\n')[1]).toBe('<svg version=\"1.1\" width=\"11px\" height=\"11px\" viewBox=\"0 0 11 11\" style=\"fill:red;stroke:white;\">');
});
it('Should add stroke-width style property to svg element', async () => {
const unstyledSvgString = '<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11"><path/></svg>';
const styledSvg = await styleSvg(unstyledSvgString, 'red', 'white', '2px');
// eslint-disable-next-line max-len
expect(styledSvg.split('\n')[1]).toBe('<svg version=\"1.1\" width=\"11px\" height=\"11px\" viewBox=\"0 0 11 11\" style=\"fill:red;stroke:white;stroke-width:2px;\">');
});
});

View file

@ -45,7 +45,6 @@ export function getEMSClient() {
const proxyElasticMapsServiceInMaps = chrome.getInjected('proxyElasticMapsServiceInMaps', false);
const proxyPath = proxyElasticMapsServiceInMaps ? relativeToAbsolute('..') : '';
// eslint-disable-next-line max-len
const manifestServiceUrl = proxyElasticMapsServiceInMaps ? relativeToAbsolute(`${GIS_API_RELATIVE}/${EMS_CATALOGUE_PATH}`) : chrome.getInjected('emsManifestServiceUrl');
emsClient = new EMSClient({

View file

@ -305,7 +305,6 @@ export function initRoutes(server, licenseUid) {
const vectorStyle = await tmsService.getVectorStyleSheet();
const sourceManifest = vectorStyle.sources[request.query.sourceId];
// eslint-disable-next-line max-len
const newUrl = `${GIS_API_PATH}/${EMS_TILES_VECTOR_TILE_PATH}?id=${request.query.id}&sourceId=${request.query.sourceId}&x={x}&y={y}&z={z}`;
return {
...sourceManifest,

View file

@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint-disable max-len */
import { i18n } from '@kbn/i18n';

View file

@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint-disable max-len */
import { i18n } from '@kbn/i18n';

View file

@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint-disable max-len */
import { i18n } from '@kbn/i18n';

View file

@ -113,7 +113,7 @@ describe('ML - job utils', () => {
const job = {
analysis_config: {
detectors: [
{ 'function': 'sum', 'field_name': 'bytes', 'partition_field_name': 'clientip', 'detector_description': 'High bytes client IP' }, // eslint-disable-line max-len
{ 'function': 'sum', 'field_name': 'bytes', 'partition_field_name': 'clientip', 'detector_description': 'High bytes client IP' },
{ 'function': 'freq_rare', 'by_field_name': 'uri', 'over_field_name': 'clientip', 'detector_description': 'Freq rare URI' },
{ 'function': 'count', 'by_field_name': 'mlcategory', 'detector_description': 'Count by category' },
{ 'function': 'count', 'by_field_name': 'hrd', 'detector_description': 'count by hrd' },

View file

@ -90,21 +90,21 @@ describe('ML - custom URL utils', () => {
url_name: 'Show dashboard',
time_range: '1h',
url_value:
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'$earliest$',mode:absolute,to:'$latest$'))&_a=(filters:!(),query:(language:kuery,query:'airline:\"$airline$\"'))", // eslint-disable-line max-len
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'$earliest$',mode:absolute,to:'$latest$'))&_a=(filters:!(),query:(language:kuery,query:'airline:\"$airline$\"'))",
};
const TEST_DISCOVER_URL: KibanaUrlConfig = {
url_name: 'Raw data',
time_range: 'auto',
url_value:
"kibana#/discover?_g=(time:(from:'$earliest$',mode:absolute,to:'$latest$'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:'airline:\"$airline$\"'))", // eslint-disable-line max-len
"kibana#/discover?_g=(time:(from:'$earliest$',mode:absolute,to:'$latest$'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:'airline:\"$airline$\"'))",
};
const TEST_DASHBOARD_LUCENE_URL: KibanaUrlConfig = {
url_name: 'Show dashboard',
time_range: '1h',
url_value:
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'$earliest$',mode:absolute,to:'$latest$'))&_a=(filters:!(),query:(language:lucene,query:'airline:\"$airline$\"'))", // eslint-disable-line max-len
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'$earliest$',mode:absolute,to:'$latest$'))&_a=(filters:!(),query:(language:lucene,query:'airline:\"$airline$\"'))",
};
const TEST_OTHER_URL: UrlConfig = {
@ -121,7 +121,7 @@ describe('ML - custom URL utils', () => {
test('replaces tokens as expected for a Kibana Dashboard type URL', () => {
expect(replaceTokensInUrlValue(TEST_DASHBOARD_URL, 300, TEST_DOC, 'timestamp')).toBe(
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(filters:!(),query:(language:kuery,query:'airline:\"AAL\"'))"
); // eslint-disable-line max-len
);
});
test('replaces tokens containing special characters as expected for a Kibana Dashboard type URL', () => {
@ -129,7 +129,7 @@ describe('ML - custom URL utils', () => {
replaceTokensInUrlValue(TEST_DASHBOARD_URL, 300, TEST_RECORD_SPECIAL_CHARS, 'timestamp')
).toBe(
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(filters:!(),query:(language:kuery,query:'airline:\"%3C%3E%3A%3B%5B%7D%5C%22)\"'))"
); // eslint-disable-line max-len
);
});
test('replaces tokens containing special characters as expected for a Kibana Dashboard type URL where query language is lucene', () => {
@ -142,13 +142,13 @@ describe('ML - custom URL utils', () => {
)
).toBe(
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(filters:!(),query:(language:lucene,query:'airline:\"%5C%3C%5C%3E%5C%3A%3B%5C%5B%5C%7D%5C%22%5C)\"'))"
); // eslint-disable-line max-len
);
});
test('replaces tokens as expected for a Kibana Discover type URL', () => {
expect(replaceTokensInUrlValue(TEST_DISCOVER_URL, 300, TEST_DOC, 'timestamp')).toBe(
"kibana#/discover?_g=(time:(from:'2017-02-09T16:05:00.000Z',mode:absolute,to:'2017-02-09T16:20:00.000Z'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:'airline:\"AAL\"'))"
); // eslint-disable-line max-len
);
});
test('replaces token with multiple influencer values', () => {
@ -161,7 +161,7 @@ describe('ML - custom URL utils', () => {
)
).toBe(
"kibana#/discover?_g=(time:(from:'2017-02-09T16:05:00.000Z',mode:absolute,to:'2017-02-09T16:20:00.000Z'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:'(airline:\"AAL\" OR airline:\"AWE\")'))"
); // eslint-disable-line max-len
);
});
test('removes tokens with no influencer values', () => {
@ -174,7 +174,7 @@ describe('ML - custom URL utils', () => {
)
).toBe(
"kibana#/discover?_g=(time:(from:'2017-02-09T16:05:00.000Z',mode:absolute,to:'2017-02-09T16:20:00.000Z'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:''))"
); // eslint-disable-line max-len
);
});
test('replaces tokens as expected for other type URL with tokens', () => {
@ -254,19 +254,19 @@ describe('ML - custom URL utils', () => {
test('returns expected URL for a Kibana Dashboard type URL', () => {
expect(getUrlForRecord(TEST_DASHBOARD_URL, TEST_RECORD)).toBe(
"kibana#/dashboard/5f112420-9fc6-11e8-9130-150552a4bef3?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(filters:!(),query:(language:kuery,query:'airline:\"AAL\"'))"
); // eslint-disable-line max-len
);
});
test('returns expected URL for a Kibana Discover type URL', () => {
expect(getUrlForRecord(TEST_DISCOVER_URL, TEST_RECORD)).toBe(
"kibana#/discover?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:'airline:\"AAL\"'))"
); // eslint-disable-line max-len
);
});
test('returns expected URL for a Kibana Discover type URL when record field contains special characters', () => {
expect(getUrlForRecord(TEST_DISCOVER_URL, TEST_RECORD_SPECIAL_CHARS)).toBe(
"kibana#/discover?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(index:bf6e5860-9404-11e8-8d4c-593f69c47267,query:(language:kuery,query:'airline:\"%3C%3E%3A%3B%5B%7D%5C%22)\"'))"
); // eslint-disable-line max-len
);
});
test('replaces tokens with nesting', () => {
@ -274,7 +274,7 @@ describe('ML - custom URL utils', () => {
url_name: 'Raw data',
time_range: 'auto',
url_value:
'kibana#/dashboard/ml_http_access_explorer_ecs?_g=(time:(from:\u0027$earliest$\u0027,mode:absolute,to:\u0027$latest$\u0027))&_a=(description:\u0027\u0027,filters:!((\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:event.dataset,negate:!f,params:(query:\u0027apache.access\u0027),type:phrase,value:\u0027apache.access\u0027),query:(match:(event.dataset:(query:\u0027apache.access\u0027,type:phrase)))),(\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:http.response.status_code,negate:!f,params:(query:\u0027$http.response.status_code$\u0027),type:phrase,value:\u0027$http.response.status_code$\u0027),query:(match:(http.response.status_code:(query:\u0027$http.response.status_code$\u0027,type:phrase))))),query:(language:kuery,query:\u0027\u0027))', // eslint-disable-line max-len
'kibana#/dashboard/ml_http_access_explorer_ecs?_g=(time:(from:\u0027$earliest$\u0027,mode:absolute,to:\u0027$latest$\u0027))&_a=(description:\u0027\u0027,filters:!((\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:event.dataset,negate:!f,params:(query:\u0027apache.access\u0027),type:phrase,value:\u0027apache.access\u0027),query:(match:(event.dataset:(query:\u0027apache.access\u0027,type:phrase)))),(\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:http.response.status_code,negate:!f,params:(query:\u0027$http.response.status_code$\u0027),type:phrase,value:\u0027$http.response.status_code$\u0027),query:(match:(http.response.status_code:(query:\u0027$http.response.status_code$\u0027,type:phrase))))),query:(language:kuery,query:\u0027\u0027))',
};
const testRecord = {
@ -303,7 +303,7 @@ describe('ML - custom URL utils', () => {
expect(getUrlForRecord(testUrlApache, testRecord)).toBe(
"kibana#/dashboard/ml_http_access_explorer_ecs?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(description:\u0027\u0027,filters:!((\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:event.dataset,negate:!f,params:(query:\u0027apache.access\u0027),type:phrase,value:\u0027apache.access\u0027),query:(match:(event.dataset:(query:\u0027apache.access\u0027,type:phrase)))),(\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:http.response.status_code,negate:!f,params:(query:\u0027403\u0027),type:phrase,value:\u0027403\u0027),query:(match:(http.response.status_code:(query:\u0027403\u0027,type:phrase))))),query:(language:kuery,query:\u0027\u0027))"
); // eslint-disable-line max-len
);
});
test('does not escape special characters for Lucene query language inside of the filter', () => {
@ -311,7 +311,7 @@ describe('ML - custom URL utils', () => {
url_name: 'Lucene query with filters',
time_range: 'auto',
url_value:
"kibana#/dashboard/884c8780-0618-11ea-b671-c9c7e0ebf1f2?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'$earliest$',to:'$latest$'))&_a=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'7a0a6120-0612-11ea-b671-c9c7e0ebf1f2',key:'at@name',negate:!f,params:(query:'$at@name$'),type:phrase),query:(match_phrase:('at@name':'$at@name$')))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:f7ef89e3-62a6-42da-84b2-c815d8da8bb4,w:24,x:0,y:0),id:'19067710-0617-11ea-b671-c9c7e0ebf1f2',panelIndex:f7ef89e3-62a6-42da-84b2-c815d8da8bb4,type:visualization,version:'8.0.0')),query:(language:lucene,query:''),timeRestore:!f,title:special-lucine,viewMode:view)", // eslint-disable-line max-len
"kibana#/dashboard/884c8780-0618-11ea-b671-c9c7e0ebf1f2?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'$earliest$',to:'$latest$'))&_a=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'7a0a6120-0612-11ea-b671-c9c7e0ebf1f2',key:'at@name',negate:!f,params:(query:'$at@name$'),type:phrase),query:(match_phrase:('at@name':'$at@name$')))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:f7ef89e3-62a6-42da-84b2-c815d8da8bb4,w:24,x:0,y:0),id:'19067710-0617-11ea-b671-c9c7e0ebf1f2',panelIndex:f7ef89e3-62a6-42da-84b2-c815d8da8bb4,type:visualization,version:'8.0.0')),query:(language:lucene,query:''),timeRestore:!f,title:special-lucine,viewMode:view)",
};
const testRecord = {
@ -342,7 +342,7 @@ describe('ML - custom URL utils', () => {
expect(getUrlForRecord(testUrlLuceneFilters, testRecord)).toBe(
"kibana#/dashboard/884c8780-0618-11ea-b671-c9c7e0ebf1f2?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2017-02-09T15:10:00.000Z',to:'2017-02-09T17:15:00.000Z'))&_a=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'7a0a6120-0612-11ea-b671-c9c7e0ebf1f2',key:'at@name',negate:!f,params:(query:'contains%5C%20and%20a%20%2F'),type:phrase),query:(match_phrase:('at@name':'contains%5C%20and%20a%20%2F')))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:f7ef89e3-62a6-42da-84b2-c815d8da8bb4,w:24,x:0,y:0),id:'19067710-0617-11ea-b671-c9c7e0ebf1f2',panelIndex:f7ef89e3-62a6-42da-84b2-c815d8da8bb4,type:visualization,version:'8.0.0')),query:(language:lucene,query:''),timeRestore:!f,title:special-lucine,viewMode:view)"
); // eslint-disable-line max-len
);
});
test('returns expected URL for other type URL', () => {

View file

@ -685,7 +685,6 @@ export const elasticsearchJsPlugin = (Client, config, components) => { // eslint
ml.fileStructure = ca({
urls: [
{
// eslint-disable-next-line max-len
fmt: '/_ml/find_file_structure?&charset=<%=charset%>&format=<%=format%>&has_header_row=<%=has_header_row%>&column_names=<%=column_names%>&delimiter=<%=delimiter%>&quote=<%=quote%>&should_trim_fields=<%=should_trim_fields%>&grok_pattern=<%=grok_pattern%>&timestamp_field=<%=timestamp_field%>&timestamp_format=<%=timestamp_format%>&lines_to_sample=<%=lines_to_sample%>',
req: {
charset: {

View file

@ -45,7 +45,7 @@ const logs = {
'level': 'WARN',
'type': 'server',
'node': 'foobar2',
'message': 'high disk watermark [90%] exceeded on [-pH5RhfsRl6FDeTPwD5vEw][Elastic-MBP.local][/Users/chris/Development/repos/kibana/.es/8.0.0/data/nodes/0] free: 29.5gb[6.3%], shards will be relocated away from this node' // eslint-disable-line max-len
'message': 'high disk watermark [90%] exceeded on [-pH5RhfsRl6FDeTPwD5vEw][Elastic-MBP.local][/Users/chris/Development/repos/kibana/.es/8.0.0/data/nodes/0] free: 29.5gb[6.3%], shards will be relocated away from this node'
}, {
'timestamp': '2019-03-18T12:49:24.414Z',
'component': 'o.e.c.r.a.DiskThresholdMonitor',
@ -73,7 +73,7 @@ const logs = {
'level': 'WARN',
'type': 'server',
'node': 'foobar',
'message': 'high disk watermark [90%] exceeded on [-pH5RhfsRl6FDeTPwD5vEw][Elastic-MBP.local][/Users/chris/Development/repos/kibana/.es/8.0.0/data/nodes/0] free: 29.3gb[6.2%], shards will be relocated away from this node' // eslint-disable-line max-len
'message': 'high disk watermark [90%] exceeded on [-pH5RhfsRl6FDeTPwD5vEw][Elastic-MBP.local][/Users/chris/Development/repos/kibana/.es/8.0.0/data/nodes/0] free: 29.3gb[6.2%], shards will be relocated away from this node'
}, {
'timestamp': '2019-03-18T12:48:53.753Z',
'component': 'o.e.d.x.m.r.a.RestMonitoringBulkAction',

View file

@ -12,7 +12,7 @@ export function getPageData($injector) {
const $route = $injector.get('$route');
const globalState = $injector.get('globalState');
const timeBounds = timefilter.getBounds();
const url = `../api/monitoring/v1/clusters/${globalState.cluster_uuid}/elasticsearch/ccr/${$route.current.params.index}/shard/${$route.current.params.shardId}`; // eslint-disable-line max-len
const url = `../api/monitoring/v1/clusters/${globalState.cluster_uuid}/elasticsearch/ccr/${$route.current.params.index}/shard/${$route.current.params.shardId}`;
return $http.post(url, {
ccs: globalState.ccs,

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint max-len: 0 */
import { mapNodesMetrics } from '../map_nodes_metrics';
describe('map nodes metrics', () => {

View file

@ -118,7 +118,7 @@ describe('Create Remote cluster', () => {
const expectInvalidChar = (char) => {
form.setComboBoxValue('remoteClusterFormSeedsInput', `192.16${char}:3000`);
expect(form.getErrorsMessages()).toContain(`Seed node must use host:port format. Example: 127.0.0.1:9400, localhost:9400. Hosts can only consist of letters, numbers, and dashes.`); // eslint-disable-line max-len
expect(form.getErrorsMessages()).toContain(`Seed node must use host:port format. Example: 127.0.0.1:9400, localhost:9400. Hosts can only consist of letters, numbers, and dashes.`);
};
[...NON_ALPHA_NUMERIC_CHARS, ...ACCENTED_CHARS]

View file

@ -1,4 +1,3 @@
/* eslint quotes: 0 */
export const flatTimes = [
{
id:"f1e689b1-dafe-4c2b-9a4d-9bd8f1a53803",

View file

@ -1,4 +1,3 @@
/* eslint quotes: 0 */
export const inputTimes = [
{
type:"BooleanQuery",

View file

@ -16,7 +16,7 @@ export interface UserValidationResult {
error?: string;
}
const validEmailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; // eslint-disable-line max-len
const validEmailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
const validUsernameRegex = /[a-zA-Z_][a-zA-Z0-9_@\-\$\.]*/;
export class UserValidator {

View file

@ -161,7 +161,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [child \"feature\" fails because [\"!foo\" is not allowed]]]`,
statusCode: 400,
validation: {
@ -187,7 +186,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [child \"feature\" fails because [child \"foo\" fails because [\"foo\" at position 0 fails because [\"0\" with value \"!foo\" fails to match the required pattern: /^[a-zA-Z0-9_-]+$/]]]]]`,
statusCode: 400,
validation: {
@ -214,7 +212,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [\"base\" conflict with forbidden peer \"feature\"]]`,
statusCode: 400,
validation: {
@ -240,7 +237,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [child \"base\" fails because [\"base\" at position 0 fails because [\"0\" must be one of [all, read]]]]]`,
statusCode: 400,
validation: {
@ -265,7 +261,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [\"_reserved\" is not allowed]]`,
statusCode: 400,
validation: {
@ -298,7 +293,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" position 1 contains a duplicate value]`,
statusCode: 400,
validation: {
@ -325,7 +319,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [child \"spaces\" fails because [\"spaces\" at position 0 fails because [\"0\" must be one of [*]], \"spaces\" at position 0 fails because [\"0\" with value \"foo-*\" fails to match the required pattern: /^[a-z0-9_-]+$/]]]]`,
statusCode: 400,
validation: {
@ -349,7 +342,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [child \"spaces\" fails because [\"spaces\" at position 1 fails because [\"1\" must be one of [*]], \"spaces\" at position 0 fails because [\"0\" with value \"*\" fails to match the required pattern: /^[a-z0-9_-]+$/]]]]`,
statusCode: 400,
validation: {
@ -374,7 +366,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [child \"base\" fails because [\"base\" at position 0 fails because [\"0\" must be one of [all, read]]]]]`,
statusCode: 400,
validation: {
@ -407,7 +398,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" position 1 contains a duplicate value]`,
statusCode: 400,
validation: {
@ -432,7 +422,6 @@ describe('PUT role', () => {
statusCode: 400,
result: {
error: 'Bad Request',
//eslint-disable-next-line max-len
message: `child \"kibana\" fails because [\"kibana\" at position 0 fails because [\"_reserved\" is not allowed]]`,
statusCode: 400,
validation: {

View file

@ -76,7 +76,6 @@ describe('serializeThresholdWatch', () => {
},
condition: {
script: {
// eslint-disable-next-line max-len
source: 'ArrayList arr = ctx.payload.aggregations.bucketAgg.buckets; for (int i = 0; i < arr.length; i++) { if (arr[i][\'metricAgg\'].value >= params.threshold[0] && arr[i][\'metricAgg\'].value <= params.threshold[1]) { return true; } } return false;',
params: {
threshold: 50,
@ -85,7 +84,6 @@ describe('serializeThresholdWatch', () => {
},
transform: {
script: {
// eslint-disable-next-line max-len
source: 'HashMap result = new HashMap(); ArrayList arr = ctx.payload.aggregations.bucketAgg.buckets; ArrayList filteredHits = new ArrayList(); for (int i = 0; i < arr.length; i++) { HashMap filteredHit = new HashMap(); filteredHit.key = arr[i].key; filteredHit.value = arr[i][\'metricAgg\'].value; if (filteredHit.value >= params.threshold[0] && filteredHit.value <= params.threshold[1]) { filteredHits.add(filteredHit); } } result.results = filteredHits; return result;',
params: {
threshold: 50,
@ -184,7 +182,6 @@ describe('serializeThresholdWatch', () => {
},
condition: {
script: {
// eslint-disable-next-line max-len
source: 'ArrayList arr = ctx.payload.aggregations.bucketAgg.buckets; for (int i = 0; i < arr.length; i++) { if (arr[i][\'metricAgg\'].value >= params.threshold[0] && arr[i][\'metricAgg\'].value <= params.threshold[1]) { return true; } } return false;',
params: {
threshold: 50,
@ -193,7 +190,6 @@ describe('serializeThresholdWatch', () => {
},
transform: {
script: {
// eslint-disable-next-line max-len
source: 'HashMap result = new HashMap(); ArrayList arr = ctx.payload.aggregations.bucketAgg.buckets; ArrayList filteredHits = new ArrayList(); for (int i = 0; i < arr.length; i++) { HashMap filteredHit = new HashMap(); filteredHit.key = arr[i].key; filteredHit.value = arr[i][\'metricAgg\'].value; if (filteredHit.value >= params.threshold[0] && filteredHit.value <= params.threshold[1]) { filteredHits.add(filteredHit); } } result.results = filteredHits; return result;',
params: {
threshold: 50,
@ -292,7 +288,6 @@ describe('serializeThresholdWatch', () => {
},
condition: {
script: {
// eslint-disable-next-line max-len
source: 'ArrayList arr = ctx.payload.aggregations.bucketAgg.buckets; for (int i = 0; i < arr.length; i++) { if (arr[i][\'metricAgg\'].value >= params.threshold[0] && arr[i][\'metricAgg\'].value <= params.threshold[1]) { return true; } } return false;',
params: {
threshold: 50,
@ -301,7 +296,6 @@ describe('serializeThresholdWatch', () => {
},
transform: {
script: {
// eslint-disable-next-line max-len
source: 'HashMap result = new HashMap(); ArrayList arr = ctx.payload.aggregations.bucketAgg.buckets; ArrayList filteredHits = new ArrayList(); for (int i = 0; i < arr.length; i++) { HashMap filteredHit = new HashMap(); filteredHit.key = arr[i].key; filteredHit.value = arr[i][\'metricAgg\'].value; if (filteredHit.value >= params.threshold[0] && filteredHit.value <= params.threshold[1]) { filteredHits.add(filteredHit); } } result.results = filteredHits; return result;',
params: {
threshold: 50,

View file

@ -94,7 +94,7 @@ export default function ({ getService }) {
// As there is no easy way to set the index in the ERROR state to be able to retry
// we validate that the error returned *is* coming from the ES "_ilm/retry" endpoint
const { body } = await retryPolicyOnIndex(indexName);
const expected = `[illegal_argument_exception] cannot retry an action for an index [${indexName}] that has not encountered an error when running a Lifecycle Policy`; // eslint-disable-line max-len
const expected = `[illegal_argument_exception] cannot retry an action for an index [${indexName}] that has not encountered an error when running a Lifecycle Policy`;
expect(body.message).to.be(expected);
});
});

View file

@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint max-len: 0 */
import expect from '@kbn/expect';

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
// eslint-disable-next-line max-len
import {
createDashboardEditUrl,
DashboardConstants,

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
// eslint-disable-next-line max-len
import {
createDashboardEditUrl,
DashboardConstants,

View file

@ -109,7 +109,7 @@ export default function ({ getPageObjects, getService }) {
it('should update app state with query stored with map', async () => {
const currentUrl = await browser.getCurrentUrl();
const appState = currentUrl.substring(currentUrl.indexOf('_a='));
expect(appState).to.equal('_a=(filters:!((%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,index:c698b940-e149-11e8-a35a-370a8516603a,key:machine.os.raw,negate:!f,params:(query:ios),type:phrase),query:(match:(machine.os.raw:(query:ios,type:phrase))))),query:(language:kuery,query:%27%27))'); // eslint-disable-line max-len
expect(appState).to.equal('_a=(filters:!((%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,index:c698b940-e149-11e8-a35a-370a8516603a,key:machine.os.raw,negate:!f,params:(query:ios),type:phrase),query:(match:(machine.os.raw:(query:ios,type:phrase))))),query:(language:kuery,query:%27%27))');
});
it('should apply query stored with map', async () => {

View file

@ -53,7 +53,7 @@ export default function ({ getService, getPageObjects }) {
const indicesAll = await indicesList.getIndicesAll();
const tableData = [ /*eslint-disable max-len*/
const tableData = [
{ name: 'many-0006_gkuqbjonkjmg', status: 'Health: green', documentCount: '1', dataSize: '3.7 KB', indexRate: '0 /s', searchRate: '4.08 /s', unassignedShards: '0', },
{ name: 'many-0008_amnscruqlsnu', status: 'Health: green', documentCount: '1', dataSize: '3.7 KB', indexRate: '0 /s', searchRate: '4.08 /s', unassignedShards: '0', },
{ name: 'many-0010_dgnlpqtstfvi', status: 'Health: green', documentCount: '1', dataSize: '3.7 KB', indexRate: '0 /s', searchRate: '1.95 /s', unassignedShards: '0', },
@ -74,7 +74,7 @@ export default function ({ getService, getPageObjects }) {
{ name: 'many-0011_xtkcmlwmxcov', status: 'Health: red', documentCount: '1', dataSize: '3.6 KB', indexRate: '0 /s', searchRate: '0 /s', unassignedShards: '1', },
{ name: 'many-0013_smjuwdkhpduv', status: 'Health: red', documentCount: '1', dataSize: '3.6 KB', indexRate: '0 /s', searchRate: '0 /s', unassignedShards: '1', },
{ name: 'many-0015_vwmrucgzvohb', status: 'Health: red', documentCount: '1', dataSize: '3.6 KB', indexRate: '0 /s', searchRate: '0 /s', unassignedShards: '1', },
]; /*eslint-enable*/
];
// check the all data in the table
indicesAll.forEach((obj, index) => { // eslint-disable-line no-unused-vars

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
// eslint-disable-next-line max-len
import { VisualizeConstants } from '../../../../../../src/legacy/core_plugins/kibana/public/visualize/visualize_constants';
import { FtrProviderContext } from '../../../ftr_provider_context';

View file

@ -6,8 +6,6 @@
// These all have the domain name portion stripped out. The api infrastructure assumes it when we post to it anyhow.
/* eslint-disable max-len */
// The URL below was captured from release 6.4 and then the layout section was removed to test structure before
// preserve_layout was introduced. See https://github.com/elastic/kibana/issues/23414
export const PDF_PRINT_DASHBOARD_PRE_6_2 = '/api/reporting/generate/printablePdf?jobParams=(browserTimezone:America%2FNew_York,objectType:dashboard,relativeUrls:!(%27%2Fapp%2Fkibana%23%2Fdashboard%2F2ae34a60-3dd4-11e8-b2b9-5d5dc1715159%3F_g%3D(refreshInterval:(pause:!!t,value:0),time:(from:!%27Mon%2BApr%2B09%2B2018%2B17:56:08%2BGMT-0400!%27,mode:absolute,to:!%27Wed%2BApr%2B11%2B2018%2B17:56:08%2BGMT-0400!%27))%26_a%3D(description:!%27!%27,filters:!!(),fullScreenMode:!!f,options:(hidePanelTitles:!!f,useMargins:!!t),panels:!!((embeddableConfig:(),gridData:(h:15,i:!%271!%27,w:24,x:0,y:0),id:!%27145ced90-3dcb-11e8-8660-4d65aa086b3c!%27,panelIndex:!%271!%27,type:visualization,version:!%276.3.0!%27),(embeddableConfig:(),gridData:(h:15,i:!%272!%27,w:24,x:24,y:0),id:e2023110-3dcb-11e8-8660-4d65aa086b3c,panelIndex:!%272!%27,type:visualization,version:!%276.3.0!%27)),query:(language:lucene,query:!%27!%27),timeRestore:!!f,title:!%27couple%2Bpanels!%27,viewMode:view)%27),title:%27couple%20panels%27)';

View file

@ -29,7 +29,6 @@ export default function ({ getPageObjects, getService }) {
await PageObjects.maps.closeLegend();
});
// eslint-disable-next-line max-len
it('should symbolize fill color with custom steps from join value and border color with dynamic color ramp from prop value', async () => {
await visualTesting.snapshot();
});
@ -43,7 +42,6 @@ export default function ({ getPageObjects, getService }) {
await PageObjects.maps.closeLegend();
});
// eslint-disable-next-line max-len
it('should symbolize pew pew lines', async () => {
await visualTesting.snapshot();
});