ensure prettier overrides take precedence, remove style rules

(cherry picked from commit c52571be68)
This commit is contained in:
spalger 2019-12-14 15:17:59 -07:00
parent 66822d0d07
commit 29921e1935
71 changed files with 92 additions and 231 deletions

View file

@ -666,8 +666,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',
@ -697,7 +695,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',
@ -738,8 +735,6 @@ module.exports = {
'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',
@ -775,13 +770,10 @@ module.exports = {
'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',
// might be introduced after the other warns are fixed
'react-hooks/exhaustive-deps': 'off',
'require-atomic-updates': 'error',
'rest-spread-spacing': ['error', 'never'],
'symbol-description': 'error',
'template-curly-spacing': 'error',
'vars-on-top': 'error',
},
},
@ -816,8 +808,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',
},
@ -834,7 +824,6 @@ module.exports = {
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
rules: {
radix: 'error',
curly: ['error', 'all'],
// module importing
'import/order': [
@ -852,7 +841,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',
@ -929,5 +917,17 @@ module.exports = {
'import/no-default-export': 'error',
},
},
/**
* Prettier disables all conflicting rules, listing as last override so it takes precedence
*/
{
files: ['**/*'],
rules: {
...require('eslint-config-prettier').rules,
...require('eslint-config-prettier/react').rules,
...require('eslint-config-prettier/@typescript-eslint').rules,
},
},
],
};

View file

@ -19,44 +19,40 @@ module.exports = {
es6: true
},
rules: Object.assign(
{
'prettier/prettier': [
'error',
rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'@kbn/eslint/module_migration': [
'error',
[
{
endOfLine: 'auto',
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: '@kbn/elastic-idx',
to: false,
disallowedMessage: `Don't use idx(), use optional chaining syntax instead https://ela.st/optchain`
},
{
from: 'x-pack',
toRelative: 'x-pack',
},
{
from: 'react-router',
to: 'react-router-dom',
},
],
'@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: '@kbn/elastic-idx',
to: false,
disallowedMessage: `Don't use idx(), use optional chaining syntax instead https://ela.st/optchain`
},
{
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

@ -43,8 +43,6 @@ module.exports = {
'block-scoped-var': 'error',
camelcase: [ 'error', { properties: 'never', allow: ['^UNSAFE_'] } ],
'consistent-return': 'off',
curly: [ 'error', 'multi-line' ],
'dot-location': [ 'error', 'property' ],
'dot-notation': [ 'error', { allowKeywords: true } ],
eqeqeq: [ 'error', 'allow-null' ],
'guard-for-in': 'error',
@ -87,7 +85,6 @@ module.exports = {
'prefer-const': 'error',
strict: [ 'error', 'never' ],
'valid-typeof': 'error',
'eol-last': ['error', 'always'],
yoda: 'off',
'mocha/handle-done-callback': 'error',

View file

@ -21,27 +21,14 @@ module.exports = {
},
rules: {
'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': 'error', // Checks effect dependencies
'jsx-a11y/accessible-emoji': 'error',
@ -71,8 +58,6 @@ module.exports = {
'jsx-a11y/role-supports-aria-props': 'error',
'jsx-a11y/scope': 'error',
'jsx-a11y/tabindex-no-positive': '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

@ -108,8 +108,6 @@ module.exports = {
}
}
],
'indent': 'off',
'@typescript-eslint/indent': [ 'error', 2, { SwitchCase: 1 } ],
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/member-ordering': ['error', {
@ -126,15 +124,9 @@ module.exports = {
lib: 'never'
}],
'@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', {
@ -145,8 +137,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',
@ -155,30 +145,19 @@ 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',
'prefer-rest-params': '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

@ -73,7 +73,7 @@ export class Table extends Component {
},
{
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
'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

@ -61,7 +61,7 @@ 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'], function(require, exports) {

View file

@ -76,33 +76,28 @@ describe('Utils class', () => {
expect(
utils.extractDeprecationMessages(
//eslint-disable-next-line max-len
'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
'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
'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
'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
'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([
@ -110,7 +105,6 @@ describe('Utils class', () => {
]);
expect(
utils.extractDeprecationMessages(
//eslint-disable-next-line max-len
'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([

View file

@ -6,13 +6,10 @@ 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 +22,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

@ -64,7 +64,6 @@ Object {
const input = {
attributes: {
title: 'test',
// eslint-disable-next-line max-len
fields:
'[{"name":"customer_name","type":"string","esTypes":["text"],"count":0,"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"name":"customer_name.keyword","type":"string","esTypes":["keyword"],"count":0,"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":"multi","parent":"customer_name"}]',
},
@ -72,7 +71,6 @@ Object {
const expected = {
attributes: {
title: 'test',
// eslint-disable-next-line max-len
fields:
'[{"name":"customer_name","type":"string","esTypes":["text"],"count":0,"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"name":"customer_name.keyword","type":"string","esTypes":["keyword"],"count":0,"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"customer_name"}}}]',
},
@ -466,7 +464,7 @@ Object {
},
};
const migratedDoc = migrate(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -492,7 +490,6 @@ Object {
"type": "visualization",
}
`);
/* eslint-enable max-len */
});
it('extracts index patterns from controls', () => {
@ -518,7 +515,7 @@ Object {
},
};
const migratedDoc = migrate(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -536,7 +533,6 @@ Object {
"type": "visualization",
}
`);
/* eslint-enable max-len */
});
it('skips extracting savedSearchId when missing', () => {
@ -1601,7 +1597,7 @@ Object {
},
};
const migratedDoc = migration(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -1631,7 +1627,6 @@ Object {
"type": "dashboard",
}
`);
/* eslint-enable max-len */
});
test('skips error when panelsJSON is not a string', () => {
@ -1949,7 +1944,7 @@ Object {
},
};
const migratedDoc = migration(doc);
/* eslint-disable max-len */
expect(migratedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -1969,7 +1964,6 @@ Object {
"type": "search",
}
`);
/* eslint-enable max-len */
});
});

View file

@ -40,7 +40,7 @@ describe('extractReferences', () => {
},
};
const updatedDoc = extractReferences(doc);
/* eslint-disable max-len */
expect(updatedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -61,7 +61,6 @@ Object {
],
}
`);
/* eslint-enable max-len */
});
test('fails when "type" attribute is missing from a panel', () => {
@ -136,7 +135,7 @@ describe('injectReferences', () => {
},
];
injectReferences(context, references);
/* eslint-disable max-len */
expect(context).toMatchInlineSnapshot(`
Object {
"foo": true,
@ -144,7 +143,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

@ -536,7 +536,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: {

View file

@ -73,7 +73,6 @@ function getFieldValueCounts(params) {
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: {

View file

@ -85,7 +85,7 @@ Object {
},
};
const updatedDoc = extractReferences(doc);
/* eslint-disable max-len */
expect(updatedDoc).toMatchInlineSnapshot(`
Object {
"attributes": Object {
@ -101,7 +101,6 @@ 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

@ -109,7 +109,6 @@ export class EsQueryParser {
) {
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: {

View file

@ -147,7 +147,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
'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

@ -141,7 +141,6 @@ it('rewrites url imports', async () => {
},
}).build();
/* eslint-disable max-len */
expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2'))
.toMatchInlineSnapshot(`
"/* 1 */

View file

@ -77,7 +77,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',
@ -174,7 +173,6 @@ describe('buildHierarchicalData convertTable', () => {
'col-3-agg_1': 8293,
'col-5-agg_1': 3029,
},
/* eslint-enable max-len */
],
};
dimensions = {

View file

@ -123,7 +123,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

@ -526,13 +526,10 @@ export class IndexPattern implements IIndexPattern {
}
if (unresolvedCollision) {
const message = i18n.translate(
'data.indexPatterns.unableWriteLabel',
{
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
);
const message = i18n.translate('data.indexPatterns.unableWriteLabel', {
defaultMessage:
'Unable to write index pattern! Refresh the page to get the most up to date changes for this index pattern.',
});
const { toasts } = getNotifications();
toasts.addDanger(message);

View file

@ -34,7 +34,7 @@ export default function({ getService }) {
.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
)
.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

@ -126,7 +126,6 @@ export class StartTrial extends React.PureComponent {
securityDocumentationLinkText: (
<EuiLink href={getDocLinks().securityDocumentationLink} target="_blank">
<FormattedMessage
// eslint-disable-next-line max-len
id="xpack.licenseMgmt.licenseDashboard.startTrial.confirmModalDescription.securityDocumentationLinkText"
defaultMessage="documentation"
/>
@ -143,7 +142,6 @@ export class StartTrial extends React.PureComponent {
termsAndConditionsLinkText: (
<EuiLink href={EXTERNAL_LINKS.TRIAL_LICENSE} target="_blank">
<FormattedMessage
// eslint-disable-next-line max-len
id="xpack.licenseMgmt.licenseDashboard.startTrial.confirmModalDescription.termsAndConditionsLinkText"
defaultMessage="terms and conditions"
/>

View file

@ -64,7 +64,6 @@ const dispatchFromResponse = async (
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: {

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 { moveApplyGlobalQueryToSources } from './move_apply_global_query';
describe('moveApplyGlobalQueryToSources', () => {

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

@ -147,7 +147,7 @@ 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';

View file

@ -17,7 +17,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

@ -92,7 +92,7 @@ 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

@ -27,7 +27,7 @@ describe('styleSvg', () => {
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;">'
);
@ -37,7 +37,7 @@ describe('styleSvg', () => {
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;">'
);
@ -47,7 +47,7 @@ describe('styleSvg', () => {
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

@ -80,7 +80,7 @@ export class VectorStyle extends AbstractStyle {
this._descriptor.properties[VECTOR_STYLES.ICON_SIZE],
VECTOR_STYLES.ICON_SIZE
);
// eslint-disable-next-line max-len
this._iconOrientationProperty = this._makeOrientationProperty(
this._descriptor.properties[VECTOR_STYLES.ICON_ORIENTATION],
VECTOR_STYLES.ICON_ORIENTATION

View file

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

View file

@ -300,7 +300,7 @@ 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

@ -137,7 +137,7 @@ describe('ML - job utils', () => {
field_name: 'bytes',
partition_field_name: 'clientip',
detector_description: 'High bytes client IP',
}, // eslint-disable-line max-len
},
{
function: 'freq_rare',
by_field_name: 'uri',

View file

@ -1301,7 +1301,6 @@ export class TimeSeriesExplorer extends React.Component {
title={
<FormattedMessage
id="xpack.ml.timeSeriesExplorer.singleMetricRequiredMessage"
/* eslint-disable-next-line max-len */
defaultMessage="To view a single metric you must select {missingValuesCount, plural, one {a value for {fieldName1}} other {values for {fieldName1} and {fieldName2}}}"
values={{
missingValuesCount: fieldNamesWithEmptyValues.length,

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

@ -695,7 +695,6 @@ export const elasticsearchJsPlugin = (Client, config, components) => {
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: {

View file

@ -53,7 +53,7 @@ const logs = {
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
'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',
@ -88,7 +88,7 @@ const logs = {
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
'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',

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, {

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

@ -124,7 +124,7 @@ describe('Create Remote cluster', () => {
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
);
};
[...NON_ALPHA_NUMERIC_CHARS, ...ACCENTED_CHARS]

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

@ -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: {
@ -86,7 +85,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: {
@ -186,7 +184,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: {
@ -196,7 +193,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: {
@ -296,7 +292,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: {
@ -306,7 +301,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: {

View file

@ -89,7 +89,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

@ -111,7 +111,7 @@ export default function({ getPageObjects, getService }) {
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
);
});
it('should apply query stored with map', async () => {

View file

@ -54,7 +54,6 @@ export default function({ getService, getPageObjects }) {
const indicesAll = await indicesList.getIndicesAll();
const tableData = [
/*eslint-disable max-len*/
{
name: 'many-0006_gkuqbjonkjmg',
status: 'Health: green',

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 =

View file

@ -28,7 +28,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();
});
@ -41,7 +40,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();
});