diff --git a/.eslintrc b/.eslintrc index bbdacd10d25..57c5efa8e15 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,13 @@ { "extends": ["@grafana/eslint-config"], - "root": true + "root": true, + "overrides": [ + { + "files": ["packages/**/*.{ts,tsx}", "public/app/**/*.{ts,tsx}"], + "rules": { + "react-hooks/rules-of-hooks": "off", + "react-hooks/exhaustive-deps": "off" + } + } + ] } diff --git a/.gitignore b/.gitignore index ea2f09b7b5f..eddabf62495 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ awsconfig .yarnrc .yarn/ vendor/ -.eslintcache # Enterprise emails /emails/templates/enterprise_* diff --git a/Gruntfile.js b/Gruntfile.js index 4e987c4d1d7..b07bca92a13 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = function (grunt) { +module.exports = function(grunt) { var os = require('os'); var config = { pkg: grunt.file.readJSON('package.json'), @@ -47,18 +47,20 @@ module.exports = function (grunt) { // Utility function to load plugin settings into config function loadConfig(config, path) { - require('glob').sync('*', {cwd: path}).forEach(function(option) { - var key = option.replace(/\.js$/,''); - // If key already exists, extend it. It is your responsibility to avoid naming collisions - config[key] = config[key] || {}; - grunt.util._.extend(config[key], require(path + option)(config,grunt)); - }); + require('glob') + .sync('*', { cwd: path }) + .forEach(function(option) { + var key = option.replace(/\.js$/, ''); + // If key already exists, extend it. It is your responsibility to avoid naming collisions + config[key] = config[key] || {}; + grunt.util._.extend(config[key], require(path + option)(config, grunt)); + }); // technically not required return config; } // Merge that object with what with whatever we have here - loadConfig(config,'./scripts/grunt/options/'); + loadConfig(config, './scripts/grunt/options/'); // pass the config to grunt grunt.initConfig(config); }; diff --git a/devenv/docker/loadtest/annotations_by_tag_test.js b/devenv/docker/loadtest/annotations_by_tag_test.js index f9bd63bbb39..d127b98f53b 100644 --- a/devenv/docker/loadtest/annotations_by_tag_test.js +++ b/devenv/docker/loadtest/annotations_by_tag_test.js @@ -3,7 +3,7 @@ import { createClient, createBasicAuthClient } from './modules/client.js'; import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js'; export let options = { - noCookiesReset: true + noCookiesReset: true, }; let endpoint = __ENV.URL || 'http://localhost:3000'; @@ -18,35 +18,38 @@ export const setup = () => { orgId: orgId, datasourceId: datasourceId, }; -} +}; -export default (data) => { - group("annotation by tag test", () => { +export default data => { + group('annotation by tag test', () => { if (__ITER === 0) { - group("user authenticates thru ui with username and password", () => { + group('user authenticates thru ui with username and password', () => { let res = client.ui.login('admin', 'admin'); check(res, { - 'response status is 200': (r) => r.status === 200, - 'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32, + 'response status is 200': r => r.status === 200, + "response has cookie 'grafana_session' with 32 characters": r => + r.cookies.grafana_session[0].value.length === 32, }); }); } if (__ITER !== 0) { - group("batch tsdb requests with annotations by tag", () => { + group('batch tsdb requests with annotations by tag', () => { const batchCount = 20; const requests = []; const payload = { from: '1547765247624', to: '1547768847624', - queries: [{ - refId: 'A', - scenarioId: 'random_walk', - intervalMs: 10000, - maxDataPoints: 433, - datasourceId: data.datasourceId, - }] + queries: [ + { + refId: 'A', + scenarioId: 'random_walk', + intervalMs: 10000, + maxDataPoints: 433, + datasourceId: data.datasourceId, + }, + ], }; requests.push({ method: 'GET', url: '/api/annotations?from=1580825186534&to=1580846786535' }); @@ -58,14 +61,14 @@ export default (data) => { let responses = client.batch(requests); for (let n = 0; n < batchCount; n++) { check(responses[n], { - 'response status is 200': (r) => r.status === 200, + 'response status is 200': r => r.status === 200, }); } }); } }); - sleep(5) -} + sleep(5); +}; -export const teardown = (data) => {} +export const teardown = data => {}; diff --git a/devenv/docker/loadtest/auth_proxy_test.js b/devenv/docker/loadtest/auth_proxy_test.js index f506701e44e..e3319b4063d 100644 --- a/devenv/docker/loadtest/auth_proxy_test.js +++ b/devenv/docker/loadtest/auth_proxy_test.js @@ -2,7 +2,7 @@ import { sleep, check, group } from 'k6'; import { createBasicAuthClient } from './modules/client.js'; export let options = { - noCookiesReset: true + noCookiesReset: true, }; let endpoint = __ENV.URL || 'http://localhost:10080/grafana'; @@ -19,17 +19,17 @@ export const setup = () => { return { datasourceId: res.json().id, }; -} +}; -export default (data) => { - group("auth proxy test", () => { - group("batch proxy requests", () => { +export default data => { + group('auth proxy test', () => { + group('batch proxy requests', () => { const d = new Date(); const batchCount = 300; const requests = []; const query = encodeURI('topk(5, max(scrape_duration_seconds) by (job))'); - const start = (d.getTime() / 1000) - 3600; - const end = (d.getTime() / 1000); + const start = d.getTime() / 1000 - 3600; + const end = d.getTime() / 1000; const step = 20; requests.push({ method: 'GET', url: '/api/annotations?dashboardId=8&from=1558670300607&to=1558691900607' }); @@ -44,13 +44,13 @@ export default (data) => { let responses = client.batch(requests); for (let n = 0; n < batchCount; n++) { check(responses[n], { - 'response status is 200': (r) => r.status === 200, + 'response status is 200': r => r.status === 200, }); } }); }); - sleep(5) -} + sleep(5); +}; -export const teardown = (data) => {} +export const teardown = data => {}; diff --git a/devenv/docker/loadtest/auth_token_slow_test.js b/devenv/docker/loadtest/auth_token_slow_test.js index 2350016075e..f762a67794f 100644 --- a/devenv/docker/loadtest/auth_token_slow_test.js +++ b/devenv/docker/loadtest/auth_token_slow_test.js @@ -3,11 +3,11 @@ import { createClient, createBasicAuthClient } from './modules/client.js'; import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js'; export let options = { - noCookiesReset: true + noCookiesReset: true, }; let endpoint = __ENV.URL || 'http://localhost:3000'; -const slowQuery = (__ENV.SLOW_QUERY && __ENV.SLOW_QUERY.length > 0) ? parseInt(__ENV.SLOW_QUERY, 10) : 5; +const slowQuery = __ENV.SLOW_QUERY && __ENV.SLOW_QUERY.length > 0 ? parseInt(__ENV.SLOW_QUERY, 10) : 5; const client = createClient(endpoint); export const setup = () => { @@ -19,17 +19,18 @@ export const setup = () => { orgId: orgId, datasourceId: datasourceId, }; -} +}; -export default (data) => { +export default data => { group(`user auth token slow test (queries between 1 and ${slowQuery} seconds)`, () => { if (__ITER === 0) { - group("user authenticates thru ui with username and password", () => { + group('user authenticates thru ui with username and password', () => { let res = client.ui.login('admin', 'admin'); check(res, { - 'response status is 200': (r) => r.status === 200, - 'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32, + 'response status is 200': r => r.status === 200, + "response has cookie 'grafana_session' with 32 characters": r => + r.cookies.grafana_session[0].value.length === 32, }); }); } @@ -41,14 +42,16 @@ export default (data) => { const payload = { from: '1547765247624', to: '1547768847624', - queries: [{ - refId: 'A', - scenarioId: 'slow_query', - stringInput: `${Math.floor(Math.random() * slowQuery) + 1}s`, - intervalMs: 10000, - maxDataPoints: 433, - datasourceId: data.datasourceId, - }] + queries: [ + { + refId: 'A', + scenarioId: 'slow_query', + stringInput: `${Math.floor(Math.random() * slowQuery) + 1}s`, + intervalMs: 10000, + maxDataPoints: 433, + datasourceId: data.datasourceId, + }, + ], }; requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' }); @@ -60,14 +63,14 @@ export default (data) => { let responses = client.batch(requests); for (let n = 0; n < batchCount; n++) { check(responses[n], { - 'response status is 200': (r) => r.status === 200, + 'response status is 200': r => r.status === 200, }); } }); } }); - sleep(5) -} + sleep(5); +}; -export const teardown = (data) => {} +export const teardown = data => {}; diff --git a/devenv/docker/loadtest/auth_token_test.js b/devenv/docker/loadtest/auth_token_test.js index 2742f24e0e1..1e8082cadba 100644 --- a/devenv/docker/loadtest/auth_token_test.js +++ b/devenv/docker/loadtest/auth_token_test.js @@ -3,7 +3,7 @@ import { createClient, createBasicAuthClient } from './modules/client.js'; import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js'; export let options = { - noCookiesReset: true + noCookiesReset: true, }; let endpoint = __ENV.URL || 'http://localhost:3000'; @@ -18,35 +18,38 @@ export const setup = () => { orgId: orgId, datasourceId: datasourceId, }; -} +}; -export default (data) => { - group("user auth token test", () => { +export default data => { + group('user auth token test', () => { if (__ITER === 0) { - group("user authenticates thru ui with username and password", () => { + group('user authenticates thru ui with username and password', () => { let res = client.ui.login('admin', 'admin'); check(res, { - 'response status is 200': (r) => r.status === 200, - 'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32, + 'response status is 200': r => r.status === 200, + "response has cookie 'grafana_session' with 32 characters": r => + r.cookies.grafana_session[0].value.length === 32, }); }); } if (__ITER !== 0) { - group("batch tsdb requests", () => { + group('batch tsdb requests', () => { const batchCount = 20; const requests = []; const payload = { from: '1547765247624', to: '1547768847624', - queries: [{ - refId: 'A', - scenarioId: 'random_walk', - intervalMs: 10000, - maxDataPoints: 433, - datasourceId: data.datasourceId, - }] + queries: [ + { + refId: 'A', + scenarioId: 'random_walk', + intervalMs: 10000, + maxDataPoints: 433, + datasourceId: data.datasourceId, + }, + ], }; requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' }); @@ -58,14 +61,14 @@ export default (data) => { let responses = client.batch(requests); for (let n = 0; n < batchCount; n++) { check(responses[n], { - 'response status is 200': (r) => r.status === 200, + 'response status is 200': r => r.status === 200, }); } }); } }); - sleep(5) -} + sleep(5); +}; -export const teardown = (data) => {} +export const teardown = data => {}; diff --git a/devenv/docker/loadtest/modules/client.js b/devenv/docker/loadtest/modules/client.js index 30e72f6bdaf..059d8e76f0a 100644 --- a/devenv/docker/loadtest/modules/client.js +++ b/devenv/docker/loadtest/modules/client.js @@ -1,4 +1,4 @@ -import http from "k6/http"; +import http from 'k6/http'; import encoding from 'k6/encoding'; export const UIEndpoint = class UIEndpoint { @@ -10,7 +10,7 @@ export const UIEndpoint = class UIEndpoint { const payload = { user: username, password: pwd }; return this.httpClient.formPost('/login', payload); } -} +}; export const DatasourcesEndpoint = class DatasourcesEndpoint { constructor(httpClient) { @@ -32,7 +32,7 @@ export const DatasourcesEndpoint = class DatasourcesEndpoint { delete(id) { return this.httpClient.delete(`/datasources/${id}`); } -} +}; export const OrganizationsEndpoint = class OrganizationsEndpoint { constructor(httpClient) { @@ -57,7 +57,7 @@ export const OrganizationsEndpoint = class OrganizationsEndpoint { delete(id) { return this.httpClient.delete(`/orgs/${id}`); } -} +}; export const GrafanaClient = class GrafanaClient { constructor(httpClient) { @@ -79,10 +79,10 @@ export const GrafanaClient = class GrafanaClient { onBeforeRequest(params) { if (this.orgId && this.orgId > 0) { params = params.headers || {}; - params.headers["X-Grafana-Org-Id"] = this.orgId; + params.headers['X-Grafana-Org-Id'] = this.orgId; } } -} +}; export const BaseClient = class BaseClient { constructor(url, subUrl) { @@ -99,14 +99,12 @@ export const BaseClient = class BaseClient { } withUrl(subUrl) { - let c = new BaseClient(this.url, subUrl); + let c = new BaseClient(this.url, subUrl); c.onBeforeRequest = this.onBeforeRequest; return c; } - beforeRequest(params) { - - } + beforeRequest(params) {} get(url, params) { params = params || {}; @@ -156,7 +154,7 @@ export const BaseClient = class BaseClient { return http.batch(requests); } -} +}; export class BasicAuthClient extends BaseClient { constructor(url, subUrl, username, password) { @@ -166,7 +164,7 @@ export class BasicAuthClient extends BaseClient { } withUrl(subUrl) { - let c = new BasicAuthClient(this.url, subUrl, this.username, this.password); + let c = new BasicAuthClient(this.url, subUrl, this.username, this.password); c.onBeforeRequest = this.onBeforeRequest; return c; } @@ -179,10 +177,10 @@ export class BasicAuthClient extends BaseClient { } } -export const createClient = (url) => { +export const createClient = url => { return new GrafanaClient(new BaseClient(url, '')); -} +}; export const createBasicAuthClient = (url, username, password) => { return new GrafanaClient(new BasicAuthClient(url, '', username, password)); -} +}; diff --git a/devenv/docker/loadtest/modules/util.js b/devenv/docker/loadtest/modules/util.js index af6d4cdac09..2d03a9136f8 100644 --- a/devenv/docker/loadtest/modules/util.js +++ b/devenv/docker/loadtest/modules/util.js @@ -1,4 +1,4 @@ -export const createTestOrgIfNotExists = (client) => { +export const createTestOrgIfNotExists = client => { let orgId = 0; let res = client.orgs.getByName('k6'); if (res.status === 404) { @@ -13,9 +13,9 @@ export const createTestOrgIfNotExists = (client) => { client.withOrgId(orgId); return orgId; -} +}; -export const createTestdataDatasourceIfNotExists = (client) => { +export const createTestdataDatasourceIfNotExists = client => { const payload = { access: 'proxy', isDefault: false, @@ -32,4 +32,4 @@ export const createTestdataDatasourceIfNotExists = (client) => { } return res.json().id; -} +}; diff --git a/devenv/e2e-api-tests/jest.js b/devenv/e2e-api-tests/jest.js index b32573115b7..2471c87cee2 100644 --- a/devenv/e2e-api-tests/jest.js +++ b/devenv/e2e-api-tests/jest.js @@ -1,19 +1,15 @@ module.exports = { verbose: true, - "globals": { - "ts-jest": { - "tsConfigFile": "tsconfig.json" - } + globals: { + 'ts-jest': { + tsConfigFile: 'tsconfig.json', + }, }, - "transform": { - "^.+\\.tsx?$": "/../../node_modules/ts-jest/preprocessor.js" + transform: { + '^.+\\.tsx?$': '/../../node_modules/ts-jest/preprocessor.js', }, - "moduleDirectories": ["node_modules"], - "testRegex": "(\\.|/)(test)\\.ts$", - "testEnvironment": "node", - "moduleFileExtensions": [ - "ts", - "js", - "json" - ], + moduleDirectories: ['node_modules'], + testRegex: '(\\.|/)(test)\\.ts$', + testEnvironment: 'node', + moduleFileExtensions: ['ts', 'js', 'json'], }; diff --git a/emails/grunt/assemble.js b/emails/grunt/assemble.js index a4a6390c4c2..fc15c61304f 100644 --- a/emails/grunt/assemble.js +++ b/emails/grunt/assemble.js @@ -1,16 +1,16 @@ module.exports = function() { 'use strict'; - return { + return { options: { layout: 'templates/layouts/default.html', partials: ['templates/partials/*.hbs'], helpers: ['templates/helpers/**/*.js'], data: [], - flatten: true + flatten: true, }, pages: { src: ['templates/*.html'], - dest: 'dist/' - } + dest: 'dist/', + }, }; }; diff --git a/emails/grunt/premailer.js b/emails/grunt/premailer.js index c50ca1af015..34671a76a13 100644 --- a/emails/grunt/premailer.js +++ b/emails/grunt/premailer.js @@ -1,14 +1,16 @@ module.exports = { - main: { - options: { - verbose: true, - removeComments: true - }, - files: [{ - expand: true, // Enable dynamic expansion. - cwd: 'dist', // Src matches are relative to this path. + main: { + options: { + verbose: true, + removeComments: true, + }, + files: [ + { + expand: true, // Enable dynamic expansion. + cwd: 'dist', // Src matches are relative to this path. src: ['*.html'], // Actual pattern(s) to match. - dest: '../public/emails/', // Destination path prefix. - }], - } + dest: '../public/emails/', // Destination path prefix. + }, + ], + }, }; diff --git a/emails/grunt/processhtml.js b/emails/grunt/processhtml.js index efe34626a49..777b2d27d73 100644 --- a/emails/grunt/processhtml.js +++ b/emails/grunt/processhtml.js @@ -1,10 +1,12 @@ module.exports = { - dist: { - files: [{ - expand: true, // Enable dynamic expansion. - cwd: 'dist', // Src matches are relative to this path. - src: ['*.html'], // Actual pattern(s) to match. - dest: 'dist/', // Destination path prefix. - }], - } + dist: { + files: [ + { + expand: true, // Enable dynamic expansion. + cwd: 'dist', // Src matches are relative to this path. + src: ['*.html'], // Actual pattern(s) to match. + dest: 'dist/', // Destination path prefix. + }, + ], + }, }; diff --git a/emails/grunt/replace.js b/emails/grunt/replace.js index 7038802d34e..dff1639794f 100644 --- a/emails/grunt/replace.js +++ b/emails/grunt/replace.js @@ -1,13 +1,16 @@ module.exports = { - dist: { + dist: { overwrite: true, src: ['dist/*.html'], - replacements: [{ - from: '[[', - to: '{{' - }, { - from: ']]', - to: '}}' - }] - } + replacements: [ + { + from: '[[', + to: '{{', + }, + { + from: ']]', + to: '}}', + }, + ], + }, }; diff --git a/emails/grunt/uncss.js b/emails/grunt/uncss.js index 114af6942c5..c1ec535e1bb 100644 --- a/emails/grunt/uncss.js +++ b/emails/grunt/uncss.js @@ -1,9 +1,9 @@ module.exports = { - dist: { - src: ['dist/*.html'], - dest: 'dist/css/tidy.css', - options: { - report: 'min' // optional: include to report savings - } - } + dist: { + src: ['dist/*.html'], + dest: 'dist/css/tidy.css', + options: { + report: 'min', // optional: include to report savings + }, + }, }; diff --git a/emails/grunt/watch.js b/emails/grunt/watch.js index 65b3970da7f..8596d0b5b5a 100644 --- a/emails/grunt/watch.js +++ b/emails/grunt/watch.js @@ -1,16 +1,15 @@ module.exports = { - src: { - files: [ - //what are the files that we want to watch - 'assets/css/*.css', - 'templates/**/*.html', - 'grunt/*.js', - ], - tasks: ['default'], - options: { - nospawn: true, - livereload: false, - } - } - + src: { + files: [ + //what are the files that we want to watch + 'assets/css/*.css', + 'templates/**/*.html', + 'grunt/*.js', + ], + tasks: ['default'], + options: { + nospawn: true, + livereload: false, + }, + }, }; diff --git a/emails/gruntfile.js b/emails/gruntfile.js index b6d54cf651b..4849701e0fb 100644 --- a/emails/gruntfile.js +++ b/emails/gruntfile.js @@ -1,6 +1,4 @@ module.exports = function(grunt) { - // load grunt config require('load-grunt-config')(grunt); - }; diff --git a/package.json b/package.json index ac2af117843..4a978009585 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,12 @@ "e2e:debug": "./e2e/start-and-run-suite debug", "e2e:dev": "./e2e/start-and-run-suite dev", "jest": "jest --notify --watch", + "lint": "eslint . --ext .js,.tsx,.ts --cache --ignore-path .gitignore --ignore-pattern devenv", "jest-ci": "mkdir -p reports/junit && export JEST_JUNIT_OUTPUT_DIR=reports/junit && jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}", - "lint": "eslint public/app e2e/suite1 public/test --ext=.js,.ts,.tsx", "lint:fix": "yarn lint --fix", "packages:build": "lerna run clean && lerna run build --ignore @grafana-plugins/input-datasource", "packages:docsExtract": "rm -rf ./reports/docs && lerna run docsExtract", "packages:docsToMarkdown": "api-documenter markdown --input-folder ./reports/docs/ --output-folder ./docs/sources/packages_api/ --hugo", - "packages:lint": "lerna run lint", "packages:prepare": "lerna version --no-push --no-git-tag-version --force-publish --exact", "packages:publish": "lerna publish from-package --contents dist", "packages:publishCanary": "lerna publish from-package --contents dist --dist-tag canary --yes", @@ -53,7 +52,10 @@ } }, "lint-staged": { - "*.{ts,tsx,json,scss}": [ + "*.{js,ts,tsx}": [ + "eslint --ext .js,.tsx,.ts --cache --fix" + ], + "*.{json,scss}": [ "prettier --write" ], "*pkg/**/*.go": [ @@ -70,6 +72,7 @@ "@babel/preset-typescript": "7.8.3", "@emotion/core": "10.0.27", "@grafana/api-documenter": "0.9.3", + "@grafana/eslint-config": "2.0.0", "@microsoft/api-extractor": "7.8.2-pr1796.0", "@rtsao/plugin-proposal-class-properties": "7.0.1-patch.1", "@testing-library/react-hooks": "^3.2.1", @@ -111,8 +114,8 @@ "@types/slate-react": "0.22.5", "@types/testing-library__react-hooks": "^3.2.0", "@types/tinycolor2": "1.4.2", - "@typescript-eslint/eslint-plugin": "2.19.0", - "@typescript-eslint/parser": "2.19.0", + "@typescript-eslint/eslint-plugin": "3.6.0", + "@typescript-eslint/parser": "3.6.0", "angular-mocks": "1.6.6", "autoprefixer": "9.7.4", "axios": "0.19.2", @@ -127,11 +130,11 @@ "enzyme-to-json": "3.4.4", "es6-promise": "4.2.8", "es6-shim": "0.35.5", - "eslint": "6.8.0", - "eslint-config-prettier": "6.10.0", - "eslint-plugin-jsdoc": "22.1.0", - "eslint-plugin-prettier": "3.1.2", - "eslint-plugin-react": "7.18.3", + "eslint": "7.4.0", + "eslint-config-prettier": "6.11.0", + "eslint-plugin-jsdoc": "28.6.1", + "eslint-plugin-prettier": "3.1.4", + "eslint-plugin-react-hooks": "4.0.5", "expect.js": "0.3.1", "expose-loader": "0.7.5", "file-loader": "5.0.2", diff --git a/packages/grafana-data/.eslintrc b/packages/grafana-data/.eslintrc index a0ebe163503..932cc0fa3d8 100644 --- a/packages/grafana-data/.eslintrc +++ b/packages/grafana-data/.eslintrc @@ -1,6 +1,13 @@ { - "extends": ["@grafana/eslint-config"], "rules": { - "no-restricted-imports": [2, "^@grafana/data.*", "^@grafana/runtime.*", "^@grafana/ui.*"] - } + "no-restricted-imports": ["error", { "patterns": ["@grafana/runtime", "@grafana/ui", "@grafana/data"] }] + }, + "overrides": [ + { + "files": ["**/*.test.{ts,tsx}"], + "rules": { + "no-restricted-imports": "off" + } + } + ] } diff --git a/packages/grafana-data/index.js b/packages/grafana-data/index.js index d1a4363350e..5d1c92525d2 100644 --- a/packages/grafana-data/index.js +++ b/packages/grafana-data/index.js @@ -1,4 +1,4 @@ -'use strict' +'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./index.production.js'); diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index 0799deb0e71..158e0c3f7fd 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -19,7 +19,6 @@ "bundle": "rollup -c rollup.config.ts", "clean": "rimraf ./dist ./compiled", "docsExtract": "mkdir -p ../../reports/docs && api-extractor run 2>&1 | tee ../../reports/docs/$(basename $(pwd)).log", - "lint": "eslint src/ --ext=.js,.ts,.tsx", "typecheck": "tsc --noEmit" }, "dependencies": { @@ -30,7 +29,6 @@ "xss": "1.0.6" }, "devDependencies": { - "@grafana/eslint-config": "^1.0.0-rc1", "@grafana/tsconfig": "^1.0.0-rc1", "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "4.0.3", diff --git a/packages/grafana-e2e-selectors/package.json b/packages/grafana-e2e-selectors/package.json index 3ccd780c7d1..4f552bff9c8 100644 --- a/packages/grafana-e2e-selectors/package.json +++ b/packages/grafana-e2e-selectors/package.json @@ -21,7 +21,6 @@ "bundle": "rollup -c rollup.config.ts", "clean": "rimraf ./dist ./compiled", "docsExtract": "mkdir -p ../../reports/docs && api-extractor run 2>&1 | tee ../../reports/docs/$(basename $(pwd)).log", - "lint": "eslint src/ --ext=.js,.ts,.tsx", "typecheck": "tsc --noEmit" }, "devDependencies": { diff --git a/packages/grafana-e2e/package.json b/packages/grafana-e2e/package.json index 5c0c7ff7299..123d0294ea1 100644 --- a/packages/grafana-e2e/package.json +++ b/packages/grafana-e2e/package.json @@ -24,7 +24,6 @@ "bundle": "rollup -c rollup.config.ts", "clean": "rimraf ./dist ./compiled", "docsExtract": "mkdir -p ../../reports/docs && api-extractor run 2>&1 | tee ../../reports/docs/$(basename $(pwd)).log", - "lint": "eslint cypress/ src/ --ext=.js,.ts,.tsx", "open": "cypress open", "start": "cypress run --headless --browser chrome", "test": "pushd test && node ../dist/bin/grafana-e2e.js run", diff --git a/packages/grafana-runtime/.eslintrc b/packages/grafana-runtime/.eslintrc index c4cc0c0304a..b12d2a226c9 100644 --- a/packages/grafana-runtime/.eslintrc +++ b/packages/grafana-runtime/.eslintrc @@ -1,6 +1,5 @@ { - "extends": ["@grafana/eslint-config"], "rules": { - "no-restricted-imports": [2, "^@grafana/runtime.*"] + "no-restricted-imports": ["error", { "patterns": ["@grafana/runtime"] }] } } diff --git a/packages/grafana-runtime/index.js b/packages/grafana-runtime/index.js index d1a4363350e..5d1c92525d2 100644 --- a/packages/grafana-runtime/index.js +++ b/packages/grafana-runtime/index.js @@ -1,4 +1,4 @@ -'use strict' +'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./index.production.js'); diff --git a/packages/grafana-runtime/package.json b/packages/grafana-runtime/package.json index ac60b507f93..43981cbd9d9 100644 --- a/packages/grafana-runtime/package.json +++ b/packages/grafana-runtime/package.json @@ -19,7 +19,6 @@ "bundle": "rollup -c rollup.config.ts", "clean": "rimraf ./dist ./compiled", "docsExtract": "mkdir -p ../../reports/docs && api-extractor run 2>&1 | tee ../../reports/docs/$(basename $(pwd)).log", - "lint": "eslint src/ --ext=.js,.ts,.tsx", "typecheck": "tsc --noEmit" }, "dependencies": { diff --git a/packages/grafana-toolkit/.eslintrc b/packages/grafana-toolkit/.eslintrc index c4cc0c0304a..b12d2a226c9 100644 --- a/packages/grafana-toolkit/.eslintrc +++ b/packages/grafana-toolkit/.eslintrc @@ -1,6 +1,5 @@ { - "extends": ["@grafana/eslint-config"], "rules": { - "no-restricted-imports": [2, "^@grafana/runtime.*"] + "no-restricted-imports": ["error", { "patterns": ["@grafana/runtime"] }] } } diff --git a/packages/grafana-toolkit/docker/grafana-plugin-ci-alpine/install/bin/githubRelease.js b/packages/grafana-toolkit/docker/grafana-plugin-ci-alpine/install/bin/githubRelease.js index 0953683c85d..43115feee24 100644 --- a/packages/grafana-toolkit/docker/grafana-plugin-ci-alpine/install/bin/githubRelease.js +++ b/packages/grafana-toolkit/docker/grafana-plugin-ci-alpine/install/bin/githubRelease.js @@ -1,121 +1,153 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = require("tslib"); -var getPluginId_1 = require("../../config/utils/getPluginId"); -var pluginValidation_1 = require("../../config/utils/pluginValidation"); -var env_1 = require("../../plugins/env"); -var path = require("path"); -var fs = require("fs"); +'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); +var tslib_1 = require('tslib'); +var getPluginId_1 = require('../../config/utils/getPluginId'); +var pluginValidation_1 = require('../../config/utils/pluginValidation'); +var env_1 = require('../../plugins/env'); +var path = require('path'); +var fs = require('fs'); // @ts-ignore // import execa = require('execa'); -var githubClient_1 = tslib_1.__importDefault(require("./githubClient")); -var resolveContentType = function (extension) { - if (extension.startsWith('.')) { - extension = extension.substr(1); - } - switch (extension) { - case 'zip': - return 'application/zip'; - case 'json': - return 'application/json'; - case 'sha1': - return 'text/plain'; - default: - return 'application/octet-stream'; - } +var githubClient_1 = tslib_1.__importDefault(require('./githubClient')); +var resolveContentType = function(extension) { + if (extension.startsWith('.')) { + extension = extension.substr(1); + } + switch (extension) { + case 'zip': + return 'application/zip'; + case 'json': + return 'application/json'; + case 'sha1': + return 'text/plain'; + default: + return 'application/octet-stream'; + } }; -var GitHubRelease = /** @class */ (function () { - function GitHubRelease(token, username, repository, releaseNotes, commitHash) { - this.token = token; - this.username = username; - this.repository = repository; - this.releaseNotes = releaseNotes; - this.commitHash = commitHash; - this.git = new githubClient_1.default({ - required: true, - repo: repository, +var GitHubRelease = /** @class */ (function() { + function GitHubRelease(token, username, repository, releaseNotes, commitHash) { + this.token = token; + this.username = username; + this.repository = repository; + this.releaseNotes = releaseNotes; + this.commitHash = commitHash; + this.git = new githubClient_1.default({ + required: true, + repo: repository, + }); + } + GitHubRelease.prototype.publishAssets = function(srcLocation, destUrl) { + var _this = this; + // Add the assets. Loop through files in the ci/dist folder and upload each asset. + var files = fs.readdirSync(srcLocation); + return files.map(function(file) { + return tslib_1.__awaiter(_this, void 0, void 0, function() { + var fileStat, fileData; + return tslib_1.__generator(this, function(_a) { + fileStat = fs.statSync(srcLocation + '/' + file); + fileData = fs.readFileSync(srcLocation + '/' + file); + return [ + 2 /*return*/, + this.git.client.post(destUrl + '?name=' + file, fileData, { + headers: { + 'Content-Type': resolveContentType(path.extname(file)), + 'Content-Length': fileStat.size, + }, + maxContentLength: fileStat.size * 2 * 1024 * 1024, + }), + ]; }); - } - GitHubRelease.prototype.publishAssets = function (srcLocation, destUrl) { - var _this = this; - // Add the assets. Loop through files in the ci/dist folder and upload each asset. - var files = fs.readdirSync(srcLocation); - return files.map(function (file) { return tslib_1.__awaiter(_this, void 0, void 0, function () { - var fileStat, fileData; - return tslib_1.__generator(this, function (_a) { - fileStat = fs.statSync(srcLocation + "/" + file); - fileData = fs.readFileSync(srcLocation + "/" + file); - return [2 /*return*/, this.git.client.post(destUrl + "?name=" + file, fileData, { - headers: { - 'Content-Type': resolveContentType(path.extname(file)), - 'Content-Length': fileStat.size, - }, - maxContentLength: fileStat.size * 2 * 1024 * 1024, - })]; - }); - }); }); - }; - GitHubRelease.prototype.release = function () { - var _a, _b, _c, _d; - return tslib_1.__awaiter(this, void 0, void 0, function () { - var ciDir, distDir, distContentDir, pluginJsonFile, pluginInfo, PUBLISH_DIR, commitHash, latestRelease, reason_1, newReleaseResponse, publishPromises, reason_2; - return tslib_1.__generator(this, function (_e) { - switch (_e.label) { - case 0: - ciDir = env_1.getCiFolder(); - distDir = path.resolve(ciDir, 'dist'); - distContentDir = path.resolve(distDir, getPluginId_1.getPluginId()); - pluginJsonFile = path.resolve(distContentDir, 'plugin.json'); - pluginInfo = pluginValidation_1.getPluginJson(pluginJsonFile).info; - PUBLISH_DIR = path.resolve(env_1.getCiFolder(), 'packages'); - commitHash = this.commitHash || ((_a = pluginInfo.build) === null || _a === void 0 ? void 0 : _a.hash); - _e.label = 1; - case 1: - _e.trys.push([1, 5, , 6]); - return [4 /*yield*/, this.git.client.get("releases/tags/v" + pluginInfo.version)]; - case 2: - latestRelease = _e.sent(); - if (!(latestRelease.data.tag_name === "v" + pluginInfo.version)) return [3 /*break*/, 4]; - return [4 /*yield*/, this.git.client.delete("releases/" + latestRelease.data.id)]; - case 3: - _e.sent(); - _e.label = 4; - case 4: return [3 /*break*/, 6]; - case 5: - reason_1 = _e.sent(); - if (reason_1.response.status !== 404) { - // 404 just means no release found. Not an error. Anything else though, re throw the error - throw reason_1; - } - return [3 /*break*/, 6]; - case 6: - _e.trys.push([6, 9, , 10]); - return [4 /*yield*/, this.git.client.post('releases', { - tag_name: "v" + pluginInfo.version, - target_commitish: commitHash, - name: "v" + pluginInfo.version, - body: this.releaseNotes, - draft: false, - prerelease: false, - })]; - case 7: - newReleaseResponse = _e.sent(); - publishPromises = this.publishAssets(PUBLISH_DIR, "https://uploads.github.com/repos/" + this.username + "/" + this.repository + "/releases/" + newReleaseResponse.data.id + "/assets"); - return [4 /*yield*/, Promise.all(publishPromises)]; - case 8: - _e.sent(); - return [3 /*break*/, 10]; - case 9: - reason_2 = _e.sent(); - console.log(reason_2); - // Rethrow the error so that we can trigger a non-zero exit code to circle-ci - throw reason_2; - case 10: return [2 /*return*/]; - } - }); - }); - }; - return GitHubRelease; -}()); + }); + }); + }; + GitHubRelease.prototype.release = function() { + var _a, _b, _c, _d; + return tslib_1.__awaiter(this, void 0, void 0, function() { + var ciDir, + distDir, + distContentDir, + pluginJsonFile, + pluginInfo, + PUBLISH_DIR, + commitHash, + latestRelease, + reason_1, + newReleaseResponse, + publishPromises, + reason_2; + return tslib_1.__generator(this, function(_e) { + switch (_e.label) { + case 0: + ciDir = env_1.getCiFolder(); + distDir = path.resolve(ciDir, 'dist'); + distContentDir = path.resolve(distDir, getPluginId_1.getPluginId()); + pluginJsonFile = path.resolve(distContentDir, 'plugin.json'); + pluginInfo = pluginValidation_1.getPluginJson(pluginJsonFile).info; + PUBLISH_DIR = path.resolve(env_1.getCiFolder(), 'packages'); + commitHash = this.commitHash || ((_a = pluginInfo.build) === null || _a === void 0 ? void 0 : _a.hash); + _e.label = 1; + case 1: + _e.trys.push([1, 5, , 6]); + return [4 /*yield*/, this.git.client.get('releases/tags/v' + pluginInfo.version)]; + case 2: + latestRelease = _e.sent(); + if (!(latestRelease.data.tag_name === 'v' + pluginInfo.version)) { + return [3 /*break*/, 4]; + } + return [4 /*yield*/, this.git.client.delete('releases/' + latestRelease.data.id)]; + case 3: + _e.sent(); + _e.label = 4; + case 4: + return [3 /*break*/, 6]; + case 5: + reason_1 = _e.sent(); + if (reason_1.response.status !== 404) { + // 404 just means no release found. Not an error. Anything else though, re throw the error + throw reason_1; + } + return [3 /*break*/, 6]; + case 6: + _e.trys.push([6, 9, , 10]); + return [ + 4 /*yield*/, + this.git.client.post('releases', { + tag_name: 'v' + pluginInfo.version, + target_commitish: commitHash, + name: 'v' + pluginInfo.version, + body: this.releaseNotes, + draft: false, + prerelease: false, + }), + ]; + case 7: + newReleaseResponse = _e.sent(); + publishPromises = this.publishAssets( + PUBLISH_DIR, + 'https://uploads.github.com/repos/' + + this.username + + '/' + + this.repository + + '/releases/' + + newReleaseResponse.data.id + + '/assets' + ); + return [4 /*yield*/, Promise.all(publishPromises)]; + case 8: + _e.sent(); + return [3 /*break*/, 10]; + case 9: + reason_2 = _e.sent(); + console.log(reason_2); + // Rethrow the error so that we can trigger a non-zero exit code to circle-ci + throw reason_2; + case 10: + return [2 /*return*/]; + } + }); + }); + }; + return GitHubRelease; +})(); exports.GitHubRelease = GitHubRelease; //# sourceMappingURL=githubRelease.js.map7027e10521e9 diff --git a/packages/grafana-toolkit/package.json b/packages/grafana-toolkit/package.json index 013a28b2d87..9c93cf4828a 100644 --- a/packages/grafana-toolkit/package.json +++ b/packages/grafana-toolkit/package.json @@ -21,7 +21,6 @@ "scripts": { "build": "grafana-toolkit toolkit:build", "clean": "rimraf ./dist ./compiled", - "lint": "eslint src/ --ext=.js,.ts,.tsx", "precommit": "npm run lint & npm run typecheck", "typecheck": "tsc --noEmit" }, @@ -30,7 +29,7 @@ "@babel/core": "7.9.0", "@babel/preset-env": "7.9.0", "@grafana/data": "next", - "@grafana/eslint-config": "^1.0.0-rc1", + "@grafana/eslint-config": "2.0.0", "@grafana/tsconfig": "^1.0.0-rc1", "@grafana/ui": "next", "@types/command-exists": "^1.2.0", @@ -48,8 +47,8 @@ "@types/semver": "^6.0.0", "@types/tmp": "^0.1.0", "@types/webpack": "4.41.7", - "@typescript-eslint/eslint-plugin": "2.24.0", - "@typescript-eslint/parser": "2.24.0", + "@typescript-eslint/eslint-plugin": "3.6.0", + "@typescript-eslint/parser": "3.6.0", "axios": "0.19.2", "babel-jest": "24.8.0", "babel-loader": "8.1.0", @@ -60,10 +59,11 @@ "concurrently": "4.1.0", "copy-webpack-plugin": "5.1.1", "css-loader": "^3.0.0", - "eslint": "6.8.0", - "eslint-config-prettier": "6.10.0", - "eslint-plugin-jsdoc": "22.1.0", - "eslint-plugin-prettier": "3.1.2", + "eslint": "7.4.0", + "eslint-config-prettier": "6.11.0", + "eslint-plugin-jsdoc": "28.6.1", + "eslint-plugin-prettier": "3.1.4", + "eslint-plugin-react-hooks": "4.0.5", "execa": "^1.0.0", "expect-puppeteer": "4.1.1", "file-loader": "^4.0.0", diff --git a/packages/grafana-ui/.eslintrc b/packages/grafana-ui/.eslintrc index 44ec986f8b9..d889d41b0bf 100644 --- a/packages/grafana-ui/.eslintrc +++ b/packages/grafana-ui/.eslintrc @@ -1,6 +1,13 @@ { - "extends": ["@grafana/eslint-config"], "rules": { - "no-restricted-imports": [2, "^@grafana/runtime.*", "^@grafana/ui.*", "^@grafana/e2e.*"] - } + "no-restricted-imports": ["error", { "patterns": ["@grafana/runtime", "@grafana/ui", "@grafana/e2e"] }] + }, + "overrides": [ + { + "files": ["**/*.{test,story}.{ts,tsx}"], + "rules": { + "no-restricted-imports": "off" + } + } + ] } diff --git a/packages/grafana-ui/index.js b/packages/grafana-ui/index.js index d1a4363350e..5d1c92525d2 100644 --- a/packages/grafana-ui/index.js +++ b/packages/grafana-ui/index.js @@ -1,4 +1,4 @@ -'use strict' +'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./index.production.js'); diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 00e8c36b817..2db66afc021 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -21,7 +21,6 @@ "bundle": "rollup -c rollup.config.ts", "clean": "rimraf ./dist ./compiled", "docsExtract": "mkdir -p ../../reports/docs && api-extractor run 2>&1 | tee ../../reports/docs/$(basename $(pwd)).log", - "lint": "eslint .storybook/ src/ --ext=.js,.ts,.tsx", "storybook": "start-storybook -p 9001 -c .storybook -s .storybook/static", "storybook:build": "build-storybook -o ./dist/storybook -c .storybook -s .storybook/static", "typecheck": "tsc --noEmit" diff --git a/packages/grafana-ui/src/utils/ansicolor.ts b/packages/grafana-ui/src/utils/ansicolor.ts index 574e389ac5c..78602895d30 100644 --- a/packages/grafana-ui/src/utils/ansicolor.ts +++ b/packages/grafana-ui/src/utils/ansicolor.ts @@ -357,6 +357,7 @@ export default class Colors { let bgColor: Color; function reset() { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions (color = new Color()), (bgColor = new Color(true /* background */)), (brightness = undefined), diff --git a/packages/jaeger-ui-components/.eslintrc b/packages/jaeger-ui-components/.eslintrc deleted file mode 100644 index bd11a76bc35..00000000000 --- a/packages/jaeger-ui-components/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": ["@grafana/eslint-config"], - "rules": { - "no-restricted-imports": [2, "^@grafana/runtime.*", "^@grafana/ui.*"] - } -} diff --git a/packages/jaeger-ui-components/src/ScrollManager.test.js b/packages/jaeger-ui-components/src/ScrollManager.test.js index 34e6b37241a..3b13e11a2f1 100644 --- a/packages/jaeger-ui-components/src/ScrollManager.test.js +++ b/packages/jaeger-ui-components/src/ScrollManager.test.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* eslint-disable import/first */ jest.mock('./scroll-page'); import { scrollBy, scrollTo } from './scroll-page'; @@ -179,8 +178,7 @@ describe('ScrollManager', () => { it('scrolls to last visible row when boundary is hidden', () => { const parentOfLastRowWithHiddenChildrenIndex = trace.spans.length - 2; accessors.getBottomRowIndexVisible.mockReturnValue(0); - accessors.getCollapsedChildren = () => - new Set([trace.spans[parentOfLastRowWithHiddenChildrenIndex].spanID]); + accessors.getCollapsedChildren = () => new Set([trace.spans[parentOfLastRowWithHiddenChildrenIndex].spanID]); accessors.getSearchedSpanIDs = () => new Set([trace.spans[0].spanID]); trace.spans[trace.spans.length - 1].references = getRefs( trace.spans[parentOfLastRowWithHiddenChildrenIndex].spanID diff --git a/packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/render-into-canvas.test.js b/packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/render-into-canvas.test.js index bc56e6ef3cd..4e891953742 100644 --- a/packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/render-into-canvas.test.js +++ b/packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/render-into-canvas.test.js @@ -27,8 +27,7 @@ import renderIntoCanvas, { const getCanvasWidth = () => window.innerWidth * 2; const getBgFillRect = items => ({ fillStyle: BG_COLOR, - height: - !items || items.length < MIN_TOTAL_HEIGHT ? MIN_TOTAL_HEIGHT : Math.min(MAX_TOTAL_HEIGHT, items.length), + height: !items || items.length < MIN_TOTAL_HEIGHT ? MIN_TOTAL_HEIGHT : Math.min(MAX_TOTAL_HEIGHT, items.length), width: getCanvasWidth(), x: 0, y: 0, @@ -125,8 +124,7 @@ describe('renderIntoCanvas()', () => { { input: items[1].serviceName, output: [1, 1, 1] }, { input: items[2].serviceName, output: [2, 2, 2] }, ]; - const cHeight = - items.length < MIN_TOTAL_HEIGHT ? MIN_TOTAL_HEIGHT : Math.min(items.length, MAX_TOTAL_HEIGHT); + const cHeight = items.length < MIN_TOTAL_HEIGHT ? MIN_TOTAL_HEIGHT : Math.min(items.length, MAX_TOTAL_HEIGHT); const expectedDrawings = [ getBgFillRect(), diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.test.js index e4db14fdb2f..a1f91f50ef5 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.test.js @@ -44,7 +44,6 @@ describe('', () => { } function Item(props) { - // eslint-disable-next-line react/prop-types const { children, ...rest } = props; return
{children}
; } diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/ReferencesButton.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/ReferencesButton.test.js index c62408f8c95..5c9a172fcb3 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/ReferencesButton.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/ReferencesButton.test.js @@ -71,7 +71,6 @@ describe(ReferencesButton, () => { // here const menuInstance = shallow( shallow(dropdown.first().props().overlay).prop('children')({ - // eslint-disable-next-line react/prop-types Menu: ({ children }) =>
{children}
, }) ); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js index 1223d387a07..ead7ceb8f64 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js @@ -49,7 +49,10 @@ describe('', () => { logs: [ { timestamp: 10, - fields: [{ key: 'message', value: 'oh the log message' }, { key: 'something', value: 'else' }], + fields: [ + { key: 'message', value: 'oh the log message' }, + { key: 'something', value: 'else' }, + ], }, { timestamp: 10, @@ -60,7 +63,10 @@ describe('', () => { }, { timestamp: 20, - fields: [{ key: 'message', value: 'oh the next log message' }, { key: 'more', value: 'stuff' }], + fields: [ + { key: 'message', value: 'oh the next log message' }, + { key: 'more', value: 'stuff' }, + ], }, ], }, diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js index 1043448e06f..e36db2ddc30 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js @@ -106,7 +106,10 @@ describe('', () => { props.span ); - const spanRow = shallow().dive().dive().dive(); + const spanRow = shallow() + .dive() + .dive() + .dive(); const refButton = spanRow.find(ReferencesButton); expect(refButton.length).toEqual(1); expect(refButton.at(0).props().tooltipText).toEqual('Contains multiple references'); @@ -128,7 +131,10 @@ describe('', () => { }, props.span ); - const spanRow = shallow().dive().dive().dive(); + const spanRow = shallow() + .dive() + .dive() + .dive(); const refButton = spanRow.find(ReferencesButton); expect(refButton.length).toEqual(1); expect(refButton.at(0).props().tooltipText).toEqual('This span is referenced by another span'); @@ -158,7 +164,10 @@ describe('', () => { }, props.span ); - const spanRow = shallow().dive().dive().dive(); + const spanRow = shallow() + .dive() + .dive() + .dive(); const refButton = spanRow.find(ReferencesButton); expect(refButton.length).toEqual(1); expect(refButton.at(0).props().tooltipText).toEqual('This span is referenced by multiple other spans'); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.js index 77aa9739415..41f36531b87 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.js @@ -19,7 +19,10 @@ import AccordianKeyValues, { KeyValuesSummary } from './AccordianKeyValues'; import * as markers from './AccordianKeyValues.markers'; import KeyValuesTable from './KeyValuesTable'; -const tags = [{ key: 'span.kind', value: 'client' }, { key: 'omg', value: 'mos-def' }]; +const tags = [ + { key: 'span.kind', value: 'client' }, + { key: 'omg', value: 'mos-def' }, +]; describe('', () => { let wrapper; diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.test.js index 8140f68d06b..c1d37ed98ba 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.test.js @@ -24,11 +24,17 @@ describe('', () => { const logs = [ { timestamp: 10, - fields: [{ key: 'message', value: 'oh the log message' }, { key: 'something', value: 'else' }], + fields: [ + { key: 'message', value: 'oh the log message' }, + { key: 'something', value: 'else' }, + ], }, { timestamp: 20, - fields: [{ key: 'message', value: 'oh the next log message' }, { key: 'more', value: 'stuff' }], + fields: [ + { key: 'message', value: 'oh the next log message' }, + { key: 'more', value: 'stuff' }, + ], }, ]; const props = { diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.test.js index 72731990554..8b23d30ac99 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.test.js @@ -112,7 +112,6 @@ describe('', () => { const overlay = shallow(dropdown.prop('overlay')); // We have some wrappers here that dynamically inject specific component so we need to traverse a bit // here - // eslint-disable-next-line react/prop-types const menu = shallow(overlay.prop('children')({ Menu: ({ children }) =>
{children}
})); const anchors = menu.find(LinkValue); expect(anchors).toHaveLength(2); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js index 811c6f5a3cb..7a9043a57f1 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js @@ -19,7 +19,10 @@ import TextList from './TextList'; describe('', () => { let wrapper; - const data = [{ key: 'span.kind', value: 'client' }, { key: 'omg', value: 'mos-def' }]; + const data = [ + { key: 'span.kind', value: 'client' }, + { key: 'omg', value: 'mos-def' }, + ]; beforeEach(() => { wrapper = shallow(); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.test.js index 7d73f00e6ae..5c45d76c679 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.test.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* eslint-disable import/first */ jest.mock('../utils'); import React from 'react'; @@ -53,11 +52,17 @@ describe('', () => { span.logs = [ { timestamp: 10, - fields: [{ key: 'message', value: 'oh the log message' }, { key: 'something', value: 'else' }], + fields: [ + { key: 'message', value: 'oh the log message' }, + { key: 'something', value: 'else' }, + ], }, { timestamp: 20, - fields: [{ key: 'message', value: 'oh the next log message' }, { key: 'more', value: 'stuff' }], + fields: [ + { key: 'message', value: 'oh the next log message' }, + { key: 'more', value: 'stuff' }, + ], }, ]; @@ -141,9 +146,7 @@ describe('', () => { }); it('renders the process tags', () => { - const target = ( - - ); + const target = ; expect(wrapper.containsMatchingElement(target)).toBe(true); wrapper.find({ data: span.process.tags }).simulate('toggle'); expect(props.processToggle).toHaveBeenLastCalledWith(span.spanID); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.test.js index defe5a3807a..e142ecf67b0 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.test.js @@ -48,7 +48,10 @@ describe('', () => { props.logsToggle.mockReset(); props.processToggle.mockReset(); props.tagsToggle.mockReset(); - wrapper = shallow().dive().dive().dive(); + wrapper = shallow() + .dive() + .dive() + .dive(); }); it('renders without exploding', () => { diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js index 9d6e4df5c19..b66d34235cb 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js @@ -19,7 +19,7 @@ import IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down'; import SpanTreeOffset, { getStyles } from './SpanTreeOffset'; import spanAncestorIdsSpy from '../utils/span-ancestor-ids'; -import {defaultTheme} from "../Theme"; +import { defaultTheme } from '../Theme'; jest.mock('../utils/span-ancestor-ids'); @@ -43,13 +43,19 @@ describe('SpanTreeOffset', () => { spanID: ownSpanID, }, }; - wrapper = shallow().dive().dive().dive(); + wrapper = shallow() + .dive() + .dive() + .dive(); }); describe('.SpanTreeOffset--indentGuide', () => { it('renders only one .SpanTreeOffset--indentGuide for entire trace if span has no ancestors', () => { spanAncestorIdsSpy.mockReturnValue([]); - wrapper = shallow().dive().dive().dive(); + wrapper = shallow() + .dive() + .dive() + .dive(); const indentGuides = wrapper.find('[data-test-id="SpanTreeOffset--indentGuide"]'); expect(indentGuides.length).toBe(1); expect(indentGuides.prop('data-ancestor-id')).toBe(specialRootID); @@ -65,7 +71,10 @@ describe('SpanTreeOffset', () => { it('adds .is-active to correct indentGuide', () => { props.hoverIndentGuideIds = new Set([parentSpanID]); - wrapper = shallow().dive().dive().dive(); + wrapper = shallow() + .dive() + .dive() + .dive(); const styles = getStyles(defaultTheme); const activeIndentGuide = wrapper.find(`.${styles.indentGuideActive}`); expect(activeIndentGuide.length).toBe(1); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.test.js index c069188306a..8c838a59d1c 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.test.js @@ -86,12 +86,8 @@ describe('', () => { it('does not render a dragging indicator when not dragging', () => { const styles = getStyles(); - expect(wrapper.find('[data-test-id="TimelineColumnResizer--dragger"]').prop('style').right).toBe( - undefined - ); - expect(wrapper.find('[data-test-id="TimelineColumnResizer--dragger"]').prop('className')).toBe( - styles.dragger - ); + expect(wrapper.find('[data-test-id="TimelineColumnResizer--dragger"]').prop('style').right).toBe(undefined); + expect(wrapper.find('[data-test-id="TimelineColumnResizer--dragger"]').prop('className')).toBe(styles.dragger); }); it('renders a dragging indicator when dragging', () => { diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.test.js index b2629b936de..d23a95fd330 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.test.js @@ -159,12 +159,7 @@ describe('', () => { .find('[data-test-id="Dragged"]') .prop('className') .indexOf( - cx( - styles.dragged, - styles.draggedDraggingLeft, - styles.draggedDraggingRight, - styles.draggedReframeDrag - ) + cx(styles.dragged, styles.draggedDraggingLeft, styles.draggedDraggingRight, styles.draggedReframeDrag) ) >= 0 ).toBe(true); }); @@ -178,12 +173,7 @@ describe('', () => { .find('[data-test-id="Dragged"]') .prop('className') .indexOf( - cx( - styles.dragged, - styles.draggedDraggingLeft, - styles.draggedDraggingRight, - styles.draggedShiftDrag - ) + cx(styles.dragged, styles.draggedDraggingLeft, styles.draggedDraggingRight, styles.draggedShiftDrag) ) >= 0 ).toBe(true); }); diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/index.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/index.test.js index ded54d66c3f..2cbfaf4da74 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/index.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/index.test.js @@ -49,7 +49,10 @@ describe('', () => { let wrapper; beforeEach(() => { - wrapper = shallow().dive().dive().dive(); + wrapper = shallow() + .dive() + .dive() + .dive(); }); it('it does not explode', () => { diff --git a/packages/jaeger-ui-components/src/TraceTimelineViewer/utils.test.js b/packages/jaeger-ui-components/src/TraceTimelineViewer/utils.test.js index e4fe7cf76ba..bb5327a10cb 100644 --- a/packages/jaeger-ui-components/src/TraceTimelineViewer/utils.test.js +++ b/packages/jaeger-ui-components/src/TraceTimelineViewer/utils.test.js @@ -85,8 +85,7 @@ describe('TraceTimelineViewer/utils', () => { describe('spanContainsErredSpan()', () => { it('returns true only when a descendant has an error tag', () => { const errorTag = { key: 'error', type: 'bool', value: true }; - const getTags = withError => - withError ? traceGenerator.tags().concat(errorTag) : traceGenerator.tags(); + const getTags = withError => (withError ? traceGenerator.tags().concat(errorTag) : traceGenerator.tags()); // Using a string to generate the test spans. Each line results in a span. The // left number indicates whether or not the generated span has a descendant diff --git a/packages/jaeger-ui-components/src/Tween.tsx b/packages/jaeger-ui-components/src/Tween.tsx index 72adf26cf19..5a49fb28ec6 100644 --- a/packages/jaeger-ui-components/src/Tween.tsx +++ b/packages/jaeger-ui-components/src/Tween.tsx @@ -16,12 +16,12 @@ import ease from 'tween-functions'; import { TNil } from './types'; -interface ITweenState { +interface TweenState { done: boolean; value: number; } -type TTweenCallback = (state: ITweenState) => void; +type TTweenCallback = (state: TweenState) => void; type TTweenOptions = { delay?: number; @@ -98,7 +98,7 @@ export default class Tween { this.callbackUpdate = undefined; } - getCurrent(): ITweenState { + getCurrent(): TweenState { const t = Date.now() - this.startTime; if (t <= 0) { // still in the delay period diff --git a/packages/jaeger-ui-components/src/common/UiFindInput.test.js b/packages/jaeger-ui-components/src/common/UiFindInput.test.js index d3973774e47..fc11116c597 100644 --- a/packages/jaeger-ui-components/src/common/UiFindInput.test.js +++ b/packages/jaeger-ui-components/src/common/UiFindInput.test.js @@ -17,7 +17,7 @@ import { shallow } from 'enzyme'; import debounceMock from 'lodash/debounce'; import UiFindInput from './UiFindInput'; -import {UIInput} from "../uiElementsContext"; +import { UIInput } from '../uiElementsContext'; jest.mock('lodash/debounce'); @@ -58,8 +58,8 @@ describe('UiFindInput', () => { }); it('renders props.uiFind when state.ownInputValue is `undefined`', () => { - wrapper.setProps({value: uiFind}); + wrapper.setProps({ value: uiFind }); expect(wrapper.find(UIInput).prop('value')).toBe(uiFind); }); - }) + }); }); diff --git a/packages/jaeger-ui-components/src/demo/trace-generators.js b/packages/jaeger-ui-components/src/demo/trace-generators.js index 5cd1782ca5d..764259ebb19 100644 --- a/packages/jaeger-ui-components/src/demo/trace-generators.js +++ b/packages/jaeger-ui-components/src/demo/trace-generators.js @@ -52,15 +52,14 @@ function getParentSpanId(span, levels) { function attachReferences(spans, depth, spansPerLevel) { let levels = [[getSpanId(spans[0])]]; - const duplicateLevelFilter = currentLevels => span => - !currentLevels.find(level => level.indexOf(span.spanID) >= 0); + const duplicateLevelFilter = currentLevels => span => !currentLevels.find(level => level.indexOf(span.spanID) >= 0); while (levels.length < depth) { const remainingSpans = spans.filter(duplicateLevelFilter(levels)); - if (remainingSpans.length <= 0) break; - const newLevel = chance - .pickset(remainingSpans, spansPerLevel || chance.integer({ min: 4, max: 8 })) - .map(getSpanId); + if (remainingSpans.length <= 0) { + break; + } + const newLevel = chance.pickset(remainingSpans, spansPerLevel || chance.integer({ min: 4, max: 8 })).map(getSpanId); levels.push(newLevel); } diff --git a/packages/jaeger-ui-components/src/model/ddg/PathElem.tsx b/packages/jaeger-ui-components/src/model/ddg/PathElem.tsx index 4a964a4952f..e3363f3e2a1 100644 --- a/packages/jaeger-ui-components/src/model/ddg/PathElem.tsx +++ b/packages/jaeger-ui-components/src/model/ddg/PathElem.tsx @@ -37,12 +37,16 @@ export default class PathElem { result.push(current); current = current.externalSideNeighbor; } - if (this.distance < 0) result.reverse(); + if (this.distance < 0) { + result.reverse(); + } return result; } get externalSideNeighbor(): PathElem | null | undefined { - if (!this.distance) return null; + if (!this.distance) { + return null; + } return this.memberOf.members[this.memberIdx + Math.sign(this.distance)]; } @@ -53,12 +57,16 @@ export default class PathElem { result.push(current); current = current.focalSideNeighbor; } - if (this.distance > 0) result.reverse(); + if (this.distance > 0) { + result.reverse(); + } return result; } get focalSideNeighbor(): PathElem | null { - if (!this.distance) return null; + if (!this.distance) { + return null; + } return this.memberOf.members[this.memberIdx - Math.sign(this.distance)]; } diff --git a/packages/jaeger-ui-components/src/model/ddg/sample-paths.test.resources.js b/packages/jaeger-ui-components/src/model/ddg/sample-paths.test.resources.js index d19de5b909f..0c2c1f93d06 100644 --- a/packages/jaeger-ui-components/src/model/ddg/sample-paths.test.resources.js +++ b/packages/jaeger-ui-components/src/model/ddg/sample-paths.test.resources.js @@ -49,21 +49,9 @@ export const afterPayloadElem = simplePayloadElemMaker('after'); export const lastPayloadElem = simplePayloadElemMaker('last'); export const shortPath = [beforePayloadElem, focalPayloadElem]; -export const simplePath = [ - firstPayloadElem, - beforePayloadElem, - focalPayloadElem, - afterPayloadElem, - lastPayloadElem, -]; +export const simplePath = [firstPayloadElem, beforePayloadElem, focalPayloadElem, afterPayloadElem, lastPayloadElem]; export const longSimplePath = pathLengthener(simplePath); -export const noFocalPath = [ - firstPayloadElem, - beforePayloadElem, - midPayloadElem, - afterPayloadElem, - lastPayloadElem, -]; +export const noFocalPath = [firstPayloadElem, beforePayloadElem, midPayloadElem, afterPayloadElem, lastPayloadElem]; export const doubleFocalPath = [ firstPayloadElem, beforePayloadElem, diff --git a/packages/jaeger-ui-components/src/model/link-patterns.test.js b/packages/jaeger-ui-components/src/model/link-patterns.test.js index a92961a6d49..2b99e80c66e 100644 --- a/packages/jaeger-ui-components/src/model/link-patterns.test.js +++ b/packages/jaeger-ui-components/src/model/link-patterns.test.js @@ -151,7 +151,10 @@ describe('createTestFunction()', () => { }); describe('getParameterInArray()', () => { - const data = [{ key: 'mykey', value: 'ok' }, { key: 'otherkey', value: 'v' }]; + const data = [ + { key: 'mykey', value: 'ok' }, + { key: 'otherkey', value: 'v' }, + ]; it('returns an entry that is present', () => { expect(getParameterInArray('mykey', data)).toBe(data[0]); @@ -224,12 +227,19 @@ describe('getParameterInAncestor()', () => { { key: 'd', value: 'd3' }, ], }, - tags: [{ key: 'a', value: 'a2' }, { key: 'b', value: 'b2' }, { key: 'c', value: 'c2' }], + tags: [ + { key: 'a', value: 'a2' }, + { key: 'b', value: 'b2' }, + { key: 'c', value: 'c2' }, + ], }, { depth: 2, process: { - tags: [{ key: 'a', value: 'a1' }, { key: 'b', value: 'b1' }], + tags: [ + { key: 'a', value: 'a1' }, + { key: 'b', value: 'b1' }, + ], }, tags: [{ key: 'a', value: 'a0' }], }, diff --git a/packages/jaeger-ui-components/src/scroll-page.test.js b/packages/jaeger-ui-components/src/scroll-page.test.js index f04f7aebf80..ee78b38c00b 100644 --- a/packages/jaeger-ui-components/src/scroll-page.test.js +++ b/packages/jaeger-ui-components/src/scroll-page.test.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* eslint-disable import/first */ jest.mock('./Tween'); import { scrollBy, scrollTo, cancel } from './scroll-page'; diff --git a/packages/jaeger-ui-components/src/scroll-page.tsx b/packages/jaeger-ui-components/src/scroll-page.tsx index 389d122e261..812ce171554 100644 --- a/packages/jaeger-ui-components/src/scroll-page.tsx +++ b/packages/jaeger-ui-components/src/scroll-page.tsx @@ -28,7 +28,7 @@ function _onTweenUpdate({ done, value }: { done: boolean; value: number }) { } } -export function scrollBy(yDelta: number, appendToLast: boolean = false) { +export function scrollBy(yDelta: number, appendToLast = false) { const { scrollY } = window; let targetFrom = scrollY; if (appendToLast && lastTween) { diff --git a/packages/jaeger-ui-components/src/selectors/span.js b/packages/jaeger-ui-components/src/selectors/span.js index a3c3b1dc1ca..f96b912d364 100644 --- a/packages/jaeger-ui-components/src/selectors/span.js +++ b/packages/jaeger-ui-components/src/selectors/span.js @@ -24,10 +24,7 @@ export const getSpanTimestamp = span => span.startTime; export const getSpanProcessId = span => span.processID; export const getSpanReferences = span => span.references || []; export const getSpanReferenceByType = createSelector( - createSelector( - ({ span }) => span, - getSpanReferences - ), + createSelector(({ span }) => span, getSpanReferences), ({ type }) => type, (references, type) => references.find(ref => ref.refType === type) ); @@ -49,10 +46,7 @@ export const getSpanProcess = span => { return span.process; }; -export const getSpanServiceName = createSelector( - getSpanProcess, - getProcessServiceName -); +export const getSpanServiceName = createSelector(getSpanProcess, getProcessServiceName); export const filterSpansForTimestamps = createSelector( ({ spans }) => spans, @@ -73,16 +67,14 @@ export const filterSpansForText = createSelector( .map(({ original }) => original) ); -const getTextFilterdSpansAsMap = createSelector( - filterSpansForText, - matchingSpans => - matchingSpans.reduce( - (obj, span) => ({ - ...obj, - [getSpanId(span)]: span, - }), - {} - ) +const getTextFilterdSpansAsMap = createSelector(filterSpansForText, matchingSpans => + matchingSpans.reduce( + (obj, span) => ({ + ...obj, + [getSpanId(span)]: span, + }), + {} + ) ); export const highlightSpansForTextFilter = createSelector( diff --git a/packages/jaeger-ui-components/src/selectors/span.test.js b/packages/jaeger-ui-components/src/selectors/span.test.js index 2ae05438136..11e2e28c388 100644 --- a/packages/jaeger-ui-components/src/selectors/span.test.js +++ b/packages/jaeger-ui-components/src/selectors/span.test.js @@ -42,9 +42,7 @@ it('getSpanTimestamp() should return the timestamp of the span', () => { }); it('getSpanReferences() should return the span reference array', () => { - expect(spanSelectors.getSpanReferences(generatedTrace.spans[0])).toEqual( - generatedTrace.spans[0].references - ); + expect(spanSelectors.getSpanReferences(generatedTrace.spans[0])).toEqual(generatedTrace.spans[0].references); }); it('getSpanReferences() should return empty array for null references', () => { diff --git a/packages/jaeger-ui-components/src/selectors/trace.fixture.js b/packages/jaeger-ui-components/src/selectors/trace.fixture.js index 8f99f996bfd..9c73a7a7bcb 100644 --- a/packages/jaeger-ui-components/src/selectors/trace.fixture.js +++ b/packages/jaeger-ui-components/src/selectors/trace.fixture.js @@ -13,7 +13,7 @@ // limitations under the License. // See https://github.com/jaegertracing/jaeger-ui/issues/115 for details. -// eslint-disable-next-line import/prefer-default-export + export const followsFromRef = { processes: { p1: { diff --git a/packages/jaeger-ui-components/src/selectors/trace.js b/packages/jaeger-ui-components/src/selectors/trace.js index 0c092f06daa..6dede42573a 100644 --- a/packages/jaeger-ui-components/src/selectors/trace.js +++ b/packages/jaeger-ui-components/src/selectors/trace.js @@ -42,9 +42,8 @@ const getSpanWithProcess = createSelector( }) ); -export const getTraceSpansAsMap = createSelector( - getTraceSpans, - spans => spans.reduce((map, span) => map.set(getSpanId(span), span), new Map()) +export const getTraceSpansAsMap = createSelector(getTraceSpans, spans => + spans.reduce((map, span) => map.set(getSpanId(span), span), new Map()) ); export const TREE_ROOT_ID = '__root__'; @@ -107,32 +106,23 @@ export const hydrateSpansWithProcesses = trace => { }; }; -export const getTraceSpanCount = createSelector( - getTraceSpans, - spans => spans.length +export const getTraceSpanCount = createSelector(getTraceSpans, spans => spans.length); + +export const getTraceTimestamp = createSelector(getTraceSpans, spans => + spans.reduce( + (prevTimestamp, span) => (prevTimestamp ? Math.min(prevTimestamp, getSpanTimestamp(span)) : getSpanTimestamp(span)), + null + ) ); -export const getTraceTimestamp = createSelector( - getTraceSpans, - spans => - spans.reduce( - (prevTimestamp, span) => - prevTimestamp ? Math.min(prevTimestamp, getSpanTimestamp(span)) : getSpanTimestamp(span), - null - ) -); - -export const getTraceDuration = createSelector( - getTraceSpans, - getTraceTimestamp, - (spans, timestamp) => - spans.reduce( - (prevDuration, span) => - prevDuration - ? Math.max(getSpanTimestamp(span) - timestamp + getSpanDuration(span), prevDuration) - : getSpanDuration(span), - null - ) +export const getTraceDuration = createSelector(getTraceSpans, getTraceTimestamp, (spans, timestamp) => + spans.reduce( + (prevDuration, span) => + prevDuration + ? Math.max(getSpanTimestamp(span) - timestamp + getSpanDuration(span), prevDuration) + : getSpanDuration(span), + null + ) ); export const getTraceEndTimestamp = createSelector( @@ -150,36 +140,22 @@ export const getParentSpan = createSelector( .sort((spanA, spanB) => numberSortComparator(getSpanTimestamp(spanA), getSpanTimestamp(spanB)))[0] ); -export const getTraceDepth = createSelector( - getTraceSpanIdsAsTree, - spanTree => spanTree.depth - 1 -); +export const getTraceDepth = createSelector(getTraceSpanIdsAsTree, spanTree => spanTree.depth - 1); export const getSpanDepthForTrace = createSelector( - createSelector( - state => state.trace, - getTraceSpanIdsAsTree - ), - createSelector( - state => state.span, - getSpanId - ), + createSelector(state => state.trace, getTraceSpanIdsAsTree), + createSelector(state => state.span, getSpanId), (node, spanID) => node.getPath(spanID).length - 1 ); -export const getTraceServices = createSelector( - getTraceProcesses, - processes => - Object.keys(processes).reduce( - (services, processID) => services.add(getProcessServiceName(processes[processID])), - new Set() - ) +export const getTraceServices = createSelector(getTraceProcesses, processes => + Object.keys(processes).reduce( + (services, processID) => services.add(getProcessServiceName(processes[processID])), + new Set() + ) ); -export const getTraceServiceCount = createSelector( - getTraceServices, - services => services.size -); +export const getTraceServiceCount = createSelector(getTraceServices, services => services.size); // establish constants to determine how math should be handled // for nanosecond-to-millisecond conversions. @@ -188,9 +164,8 @@ export const DURATION_FORMATTERS = { s: formatSecondTime, }; -const getDurationFormatterForTrace = createSelector( - getTraceDuration, - totalDuration => (totalDuration >= ONE_SECOND ? DURATION_FORMATTERS.s : DURATION_FORMATTERS.ms) +const getDurationFormatterForTrace = createSelector(getTraceDuration, totalDuration => + totalDuration >= ONE_SECOND ? DURATION_FORMATTERS.s : DURATION_FORMATTERS.ms ); export const formatDurationForUnit = createSelector( @@ -201,10 +176,7 @@ export const formatDurationForUnit = createSelector( export const formatDurationForTrace = createSelector( ({ duration }) => duration, - createSelector( - ({ trace }) => trace, - getDurationFormatterForTrace - ), + createSelector(({ trace }) => trace, getDurationFormatterForTrace), (duration, formatter) => formatter(duration) ); @@ -216,25 +188,16 @@ export const getSortedSpans = createSelector( [...spans].sort((spanA, spanB) => dir * comparator(selector(spanA, trace), selector(spanB, trace))) ); -const getTraceSpansByHierarchyPosition = createSelector( - getTraceSpanIdsAsTree, - tree => { - const hierarchyPositionMap = new Map(); - let i = 0; - tree.walk(spanID => hierarchyPositionMap.set(spanID, i++)); - return hierarchyPositionMap; - } -); +const getTraceSpansByHierarchyPosition = createSelector(getTraceSpanIdsAsTree, tree => { + const hierarchyPositionMap = new Map(); + let i = 0; + tree.walk(spanID => hierarchyPositionMap.set(spanID, i++)); + return hierarchyPositionMap; +}); export const getTreeSizeForTraceSpan = createSelector( - createSelector( - state => state.trace, - getTraceSpanIdsAsTree - ), - createSelector( - state => state.span, - getSpanId - ), + createSelector(state => state.trace, getTraceSpanIdsAsTree), + createSelector(state => state.span, getSpanId), (tree, spanID) => { const node = tree.find(spanID); if (!node) { @@ -245,20 +208,14 @@ export const getTreeSizeForTraceSpan = createSelector( ); export const getSpanHierarchySortPositionForTrace = createSelector( - createSelector( - ({ trace }) => trace, - getTraceSpansByHierarchyPosition - ), + createSelector(({ trace }) => trace, getTraceSpansByHierarchyPosition), ({ span }) => span, (hierarchyPositionMap, span) => hierarchyPositionMap.get(getSpanId(span)) ); export const getTraceName = createSelector( createSelector( - createSelector( - hydrateSpansWithProcesses, - getParentSpan - ), + createSelector(hydrateSpansWithProcesses, getParentSpan), createStructuredSelector({ name: getSpanName, serviceName: getSpanServiceName, @@ -269,10 +226,7 @@ export const getTraceName = createSelector( export const omitCollapsedSpans = createSelector( ({ spans }) => spans, - createSelector( - ({ trace }) => trace, - getTraceSpanIdsAsTree - ), + createSelector(({ trace }) => trace, getTraceSpanIdsAsTree), ({ collapsed }) => collapsed, (spans, tree, collapse) => { const hiddenSpanIds = collapse.reduce((result, collapsedSpanId) => { @@ -313,9 +267,7 @@ export const enforceUniqueSpanIds = createSelector( return { ...trace, spans: spans.reduce((result, span) => { - const spanID = map.has(getSpanId(span)) - ? `${getSpanId(span)}_${map.get(getSpanId(span))}` - : getSpanId(span); + const spanID = map.has(getSpanId(span)) ? `${getSpanId(span)}_${map.get(getSpanId(span))}` : getSpanId(span); const updatedSpan = { ...span, spanID }; if (spanID !== getSpanId(span)) { diff --git a/packages/jaeger-ui-components/src/types/api-error.tsx b/packages/jaeger-ui-components/src/types/api-error.tsx index 1cccaf6e2e9..fd72371e34f 100644 --- a/packages/jaeger-ui-components/src/types/api-error.tsx +++ b/packages/jaeger-ui-components/src/types/api-error.tsx @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -export type ApiError = // eslint-disable-line import/prefer-default-export +export type ApiError = | string | { message: string; diff --git a/packages/jaeger-ui-components/src/types/config.tsx b/packages/jaeger-ui-components/src/types/config.tsx index d0fc4a3f5eb..6bd91da7c99 100644 --- a/packages/jaeger-ui-components/src/types/config.tsx +++ b/packages/jaeger-ui-components/src/types/config.tsx @@ -41,15 +41,15 @@ export type Config = { archiveEnabled?: boolean; deepDependencies?: { menuEnabled?: boolean }; dependencies?: { dagMaxServicesLen?: number; menuEnabled?: boolean }; - menu: (ConfigMenuGroup | ConfigMenuItem)[]; + menu: Array; search?: { maxLookback: { label: string; value: string }; maxLimit: number }; scripts?: TScript[]; topTagPrefixes?: string[]; tracking?: { - cookieToDimension?: { + cookieToDimension?: Array<{ cookie: string; dimension: string; - }[]; + }>; gaID: string | TNil; trackErrors: boolean | TNil; }; diff --git a/packages/jaeger-ui-components/src/types/embedded.tsx b/packages/jaeger-ui-components/src/types/embedded.tsx index cedc458a50a..e7f87776df5 100644 --- a/packages/jaeger-ui-components/src/types/embedded.tsx +++ b/packages/jaeger-ui-components/src/types/embedded.tsx @@ -22,4 +22,4 @@ type EmbeddedStateV0 = { }; }; -export type EmbeddedState = EmbeddedStateV0; // eslint-disable-line import/prefer-default-export +export type EmbeddedState = EmbeddedStateV0; diff --git a/packages/jaeger-ui-components/src/types/search.tsx b/packages/jaeger-ui-components/src/types/search.tsx index 5747876ee59..380d4316ddc 100644 --- a/packages/jaeger-ui-components/src/types/search.tsx +++ b/packages/jaeger-ui-components/src/types/search.tsx @@ -42,7 +42,7 @@ export type TraceSummary = { traceID: string; numberOfErredSpans: number; numberOfSpans: number; - services: { name: string; numberOfSpans: number }[]; + services: Array<{ name: string; numberOfSpans: number }>; }; export type TraceSummaries = { diff --git a/packages/jaeger-ui-components/src/utils/DraggableManager/DraggableManager.test.js b/packages/jaeger-ui-components/src/utils/DraggableManager/DraggableManager.test.js index 9821c6a0079..a9a2acec691 100644 --- a/packages/jaeger-ui-components/src/utils/DraggableManager/DraggableManager.test.js +++ b/packages/jaeger-ui-components/src/utils/DraggableManager/DraggableManager.test.js @@ -174,9 +174,7 @@ describe('DraggableManager', () => { const { type, handler, callback, updateType } = testCase; const event = { ...baseMouseEvt, type }; handler(event); - expect(callback.mock.calls).toEqual([ - [{ event, tag, value, x, manager: instance, type: updateType }], - ]); + expect(callback.mock.calls).toEqual([[{ event, tag, value, x, manager: instance, type: updateType }]]); }); }); }); @@ -294,9 +292,7 @@ describe('DraggableManager', () => { const { type, handler, callback, updateType } = testCase; const event = { ...baseMouseEvt, type }; handler(event); - expect(callback.mock.calls).toEqual([ - [{ event, tag, value, x, manager: instance, type: updateType }], - ]); + expect(callback.mock.calls).toEqual([[{ event, tag, value, x, manager: instance, type: updateType }]]); }); }); }); diff --git a/packages/jaeger-ui-components/src/utils/date.tsx b/packages/jaeger-ui-components/src/utils/date.tsx index ad5805b79b7..58ea64a11b3 100644 --- a/packages/jaeger-ui-components/src/utils/date.tsx +++ b/packages/jaeger-ui-components/src/utils/date.tsx @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import moment from 'moment'; +import moment from 'moment-timezone'; import _round from 'lodash/round'; import { toFloatPrecision } from './number'; diff --git a/packages/jaeger-ui-components/src/utils/sort.test.js b/packages/jaeger-ui-components/src/utils/sort.test.js index 5f49a279dd9..43bede4d91c 100644 --- a/packages/jaeger-ui-components/src/utils/sort.test.js +++ b/packages/jaeger-ui-components/src/utils/sort.test.js @@ -84,9 +84,7 @@ it('createSortClickHandler() should return a function', () => { const currentSortDir = 1; const updateSort = sinon.spy(); - expect(typeof sortUtils.createSortClickHandler(column, currentSortKey, currentSortDir, updateSort)).toBe( - 'function' - ); + expect(typeof sortUtils.createSortClickHandler(column, currentSortKey, currentSortDir, updateSort)).toBe('function'); }); it('createSortClickHandler() should call updateSort with the new sort vals', () => { diff --git a/packages/jaeger-ui-components/typings/index.d.ts b/packages/jaeger-ui-components/typings/index.d.ts deleted file mode 100644 index acad0a02e07..00000000000 --- a/packages/jaeger-ui-components/typings/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/// diff --git a/public/app/features/variables/state/processVariable.test.ts b/public/app/features/variables/state/processVariable.test.ts index 32e3aaa30bb..f9b7ddbf2e8 100644 --- a/public/app/features/variables/state/processVariable.test.ts +++ b/public/app/features/variables/state/processVariable.test.ts @@ -13,8 +13,6 @@ import { VariableRefresh } from '../types'; import { updateVariableOptions } from '../query/reducer'; import { customBuilder, queryBuilder } from '../shared/testing/builders'; -'../shared/testing/builders'; - jest.mock('app/features/dashboard/services/TimeSrv', () => ({ getTimeSrv: jest.fn().mockReturnValue({ timeRange: jest.fn().mockReturnValue({ diff --git a/public/app/plugins/datasource/cloud-monitoring/functions.ts b/public/app/plugins/datasource/cloud-monitoring/functions.ts index 8e832623481..585409abe8b 100644 --- a/public/app/plugins/datasource/cloud-monitoring/functions.ts +++ b/public/app/plugins/datasource/cloud-monitoring/functions.ts @@ -120,7 +120,7 @@ export const formatCloudMonitoringError = (error: any) => { try { message = JSON.parse(error.data.message).error.message; } catch (err) { - error.error; + error.error = err; } } return message; diff --git a/public/app/plugins/datasource/cloudwatch/utils/query/ScrollQLParser.js b/public/app/plugins/datasource/cloudwatch/utils/query/ScrollQLParser.js index a6412434e52..1d6b27eead3 100644 --- a/public/app/plugins/datasource/cloudwatch/utils/query/ScrollQLParser.js +++ b/public/app/plugins/datasource/cloudwatch/utils/query/ScrollQLParser.js @@ -1,4 +1,5 @@ // Generated from ScrollQLParser.g4 by ANTLR 4.8 +/* eslint-disable */ // jshint ignore: start // @ts-nocheck var antlr4 = require('antlr4/index'); diff --git a/public/app/plugins/panel/gettingstarted/types.ts b/public/app/plugins/panel/gettingstarted/types.ts index 7903d5ba1df..24a1814d324 100644 --- a/public/app/plugins/panel/gettingstarted/types.ts +++ b/public/app/plugins/panel/gettingstarted/types.ts @@ -24,6 +24,6 @@ export interface SetupStep { subheading: string; title: string; info: string; - cards: (Card | TutorialCardType)[]; + cards: Array; done: boolean; } diff --git a/public/dashboards/scripted.js b/public/dashboards/scripted.js index d78e2a688d8..106f04202fd 100644 --- a/public/dashboards/scripted.js +++ b/public/dashboards/scripted.js @@ -20,11 +20,12 @@ var window, document, ARGS, $, jQuery, moment, kbn; var dashboard; // All url parameters are available via the ARGS object +// eslint-disable-next-line no-redeclare var ARGS; // Initialize a skeleton with nothing but a rows array and service object dashboard = { - rows : [], + rows: [], }; // Set a title @@ -34,23 +35,22 @@ dashboard.title = 'Scripted dash'; // time can be overridden in the url using from/to parameters, but this is // handled automatically in grafana core during dashboard initialization dashboard.time = { - from: "now-6h", - to: "now" + from: 'now-6h', + to: 'now', }; var rows = 1; var seriesName = 'argName'; -if(!_.isUndefined(ARGS.rows)) { +if (!_.isUndefined(ARGS.rows)) { rows = parseInt(ARGS.rows, 10); } -if(!_.isUndefined(ARGS.name)) { +if (!_.isUndefined(ARGS.name)) { seriesName = ARGS.name; } for (var i = 0; i < rows; i++) { - dashboard.rows.push({ title: 'Chart', height: '300px', @@ -63,27 +63,26 @@ for (var i = 0; i < rows; i++) { linewidth: 2, targets: [ { - 'target': "randomWalk('" + seriesName + "')" + target: "randomWalk('" + seriesName + "')", }, { - 'target': "randomWalk('random walk2')" - } + target: "randomWalk('random walk2')", + }, ], seriesOverrides: [ { alias: '/random/', yaxis: 2, fill: 0, - linewidth: 5 - } + linewidth: 5, + }, ], tooltip: { - shared: true - } - } - ] + shared: true, + }, + }, + ], }); } - return dashboard; diff --git a/public/dashboards/scripted_async.js b/public/dashboards/scripted_async.js index 7a1ab1e12e3..b40f46cb5a5 100644 --- a/public/dashboards/scripted_async.js +++ b/public/dashboards/scripted_async.js @@ -20,14 +20,13 @@ var window, document, ARGS, $, jQuery, moment, kbn; return function(callback) { - // Setup some variables var dashboard; // Initialize a skeleton with nothing but a rows array and service object dashboard = { - rows : [], - services : {} + rows: [], + services: {}, }; // Set a title @@ -37,27 +36,25 @@ return function(callback) { // time can be overridden in the url using from/to parameters, but this is // handled automatically in grafana core during dashboard initialization dashboard.time = { - from: "now-6h", - to: "now" + from: 'now-6h', + to: 'now', }; var rows = 1; var seriesName = 'argName'; - if(!_.isUndefined(ARGS.rows)) { + if (!_.isUndefined(ARGS.rows)) { rows = parseInt(ARGS.rows, 10); } - if(!_.isUndefined(ARGS.name)) { + if (!_.isUndefined(ARGS.name)) { seriesName = ARGS.name; } $.ajax({ method: 'GET', - url: '/' - }) - .done(function(result) { - + url: '/', + }).done(function(result) { dashboard.rows.push({ title: 'Chart', height: '300px', @@ -67,14 +64,13 @@ return function(callback) { type: 'text', span: 12, fill: 1, - content: '# Async test' - } - ] + content: '# Async test', + }, + ], }); // when dashboard is composed call the callback // function and pass the dashboard callback(dashboard); - }); -} +}; diff --git a/public/dashboards/scripted_templated.js b/public/dashboards/scripted_templated.js index f1b0b115fa1..ecfb60afa17 100644 --- a/public/dashboards/scripted_templated.js +++ b/public/dashboards/scripted_templated.js @@ -20,15 +20,15 @@ var window, document, ARGS, $, jQuery, moment, kbn; var dashboard; // All url parameters are available via the ARGS object +// eslint-disable-next-line no-redeclare var ARGS; // Initialize a skeleton with nothing but a rows array and service object dashboard = { - rows : [], + rows: [], schemaVersion: 13, }; - // Set a title dashboard.title = 'Scripted and templated dash'; @@ -36,8 +36,8 @@ dashboard.title = 'Scripted and templated dash'; // time can be overridden in the url using from/to parameters, but this is // handled automatically in grafana core during dashboard initialization dashboard.time = { - from: "now-6h", - to: "now" + from: 'now-6h', + to: 'now', }; dashboard.templating = { @@ -57,23 +57,22 @@ dashboard.templating = { type: 'query', datasource: null, hide: 2, - } - ] + }, + ], }; var rows = 1; var seriesName = 'argName'; -if(!_.isUndefined(ARGS.rows)) { +if (!_.isUndefined(ARGS.rows)) { rows = parseInt(ARGS.rows, 10); } -if(!_.isUndefined(ARGS.name)) { +if (!_.isUndefined(ARGS.name)) { seriesName = ARGS.name; } for (var i = 0; i < rows; i++) { - dashboard.rows.push({ title: 'Chart', height: '300px', @@ -86,16 +85,15 @@ for (var i = 0; i < rows; i++) { linewidth: 2, targets: [ { - 'target': "randomWalk('" + seriesName + "')" + target: "randomWalk('" + seriesName + "')", }, { - 'target': "randomWalk('[[test2]]')" - } + target: "randomWalk('[[test2]]')", + }, ], - } - ] + }, + ], }); } - return dashboard; diff --git a/scripts/grunt/build_task.js b/scripts/grunt/build_task.js index 41f9b679e9b..0cdbbafd3c3 100644 --- a/scripts/grunt/build_task.js +++ b/scripts/grunt/build_task.js @@ -1,12 +1,6 @@ - module.exports = function(grunt) { - "use strict"; + 'use strict'; // Concat and Minify the src directory into dist - grunt.registerTask('build', [ - 'clean:release', - 'clean:build', - 'exec:webpack', - ]); - + grunt.registerTask('build', ['clean:release', 'clean:build', 'exec:webpack']); }; diff --git a/scripts/grunt/default_task.js b/scripts/grunt/default_task.js index 5bad737561b..6f92d35221e 100644 --- a/scripts/grunt/default_task.js +++ b/scripts/grunt/default_task.js @@ -19,8 +19,7 @@ module.exports = function(grunt) { // prettier-ignore grunt.registerTask('eslint', [ - 'newer:exec:eslintPackages', - 'newer:exec:eslintRoot' + 'newer:exec:eslint' ]); // prettier-ignore diff --git a/scripts/grunt/options/clean.js b/scripts/grunt/options/clean.js index cd9d5ca2d25..35cd9c2abd2 100644 --- a/scripts/grunt/options/clean.js +++ b/scripts/grunt/options/clean.js @@ -5,7 +5,6 @@ module.exports = function(config) { release: ['<%= destDir %>', '<%= tempDir %>', '<%= genDir %>'], build: ['<%= srcDir %>/build'], temp: ['<%= tempDir %>'], - packaging: [ - ], + packaging: [], }; }; diff --git a/scripts/grunt/options/compress.js b/scripts/grunt/options/compress.js index 2f68108ef6f..461d997f238 100644 --- a/scripts/grunt/options/compress.js +++ b/scripts/grunt/options/compress.js @@ -4,9 +4,10 @@ module.exports = function(config) { var task = { release: { options: { - archive: '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %><%= libc ? "-" + libc : "" %>.tar.gz' + archive: + '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %><%= libc ? "-" + libc : "" %>.tar.gz', }, - files : [ + files: [ { expand: true, cwd: '<%= tempDir %>', @@ -17,13 +18,14 @@ module.exports = function(config) { expand: true, src: ['LICENSE', 'README.md', 'NOTICE.md'], dest: '<%= pkg.name %>-<%= pkg.version %>/', - } - ] - } + }, + ], + }, }; if (config.platform === 'windows') { - task.release.options.archive = '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.zip'; + task.release.options.archive = + '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.zip'; } return task; diff --git a/scripts/grunt/options/exec.js b/scripts/grunt/options/exec.js index 527f6721b0e..19d7f1d0c57 100644 --- a/scripts/grunt/options/exec.js +++ b/scripts/grunt/options/exec.js @@ -2,10 +2,7 @@ module.exports = function(config, grunt) { 'use strict'; return { - eslintPackages: { - command: 'yarn packages:lint', - }, - eslintRoot: { + eslint: { command: 'yarn lint', }, typecheckPackages: { diff --git a/scripts/grunt/options/sasslint.js b/scripts/grunt/options/sasslint.js index 08d9d13de9d..7823429f1f6 100644 --- a/scripts/grunt/options/sasslint.js +++ b/scripts/grunt/options/sasslint.js @@ -4,10 +4,6 @@ module.exports = function(config) { options: { configFile: 'public/sass/.sass-lint.yml', }, - src: [ - 'public/sass/**/*.scss', - 'packages/**/*.scss', - '!**/node_modules/**/*.scss' - ], + src: ['public/sass/**/*.scss', 'packages/**/*.scss', '!**/node_modules/**/*.scss'], }; }; diff --git a/scripts/grunt/options/webpack.js b/scripts/grunt/options/webpack.js index 1f512fad8f3..1d8a6d08147 100644 --- a/scripts/grunt/options/webpack.js +++ b/scripts/grunt/options/webpack.js @@ -8,6 +8,6 @@ module.exports = function() { stats: false, }, dev: dev, - prod: prod + prod: prod, }; }; diff --git a/scripts/grunt/release_task.js b/scripts/grunt/release_task.js index d2b2a8fa2d4..a96877b7ca4 100644 --- a/scripts/grunt/release_task.js +++ b/scripts/grunt/release_task.js @@ -1,21 +1,13 @@ var path = require('path'); module.exports = function(grunt) { - "use strict"; + 'use strict'; // build then zip - grunt.registerTask('release', [ - 'build', - 'build-post-process', - 'compress:release' - ]); + grunt.registerTask('release', ['build', 'build-post-process', 'compress:release']); // package into archives - grunt.registerTask('package', [ - 'clean:temp', - 'build-post-process', - 'compress:release' - ]); + grunt.registerTask('package', ['clean:temp', 'build-post-process', 'compress:release']); grunt.registerTask('build-post-process', function() { grunt.config('copy.public_to_temp', { @@ -28,14 +20,14 @@ module.exports = function(grunt) { cwd: 'bin/<%= platform %>-<%= arch %><%= libc ? "-" + libc : "" %>', expand: true, src: ['*'], - options: { mode: true}, - dest: '<%= tempDir %>/bin/' + options: { mode: true }, + dest: '<%= tempDir %>/bin/', }); grunt.config('copy.backend_files', { expand: true, src: ['conf/**', 'tools/**', 'scripts/*'], - options: { mode: true}, - dest: '<%= tempDir %>' + options: { mode: true }, + dest: '<%= tempDir %>', }); grunt.task.run('copy:public_to_temp'); diff --git a/scripts/grunt/style_guide_task.js b/scripts/grunt/style_guide_task.js index 5d9612e5eac..e27f8200b0c 100644 --- a/scripts/grunt/style_guide_task.js +++ b/scripts/grunt/style_guide_task.js @@ -1,8 +1,8 @@ module.exports = function(grunt) { - "use strict"; + 'use strict'; function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); } function extractColour(line) { @@ -12,8 +12,8 @@ module.exports = function(grunt) { } function extractVariable(line) { - var matches = line.match(/(\$[0-9a-zA-Z_-]+)\s*(!default|!default;)?/) - return matches ? matches[1] : matches + var matches = line.match(/(\$[0-9a-zA-Z_-]+)\s*(!default|!default;)?/); + return matches ? matches[1] : matches; } function readVars(file, obj) { @@ -33,7 +33,8 @@ module.exports = function(grunt) { grunt.registerTask('styleguide', function() { var data = { - dark: {}, light: {} + dark: {}, + light: {}, }; readVars('public/sass/_variables.dark.scss', data.dark); @@ -41,7 +42,5 @@ module.exports = function(grunt) { var styleGuideJson = grunt.config().srcDir + '/build/styleguide.json'; grunt.file.write(styleGuideJson, JSON.stringify(data, null, 4)); - }); - }; diff --git a/scripts/webpack/loaders/blobUrl.js b/scripts/webpack/loaders/blobUrl.js index 951cf3f5cc7..dd8fce3d1f6 100644 --- a/scripts/webpack/loaders/blobUrl.js +++ b/scripts/webpack/loaders/blobUrl.js @@ -2,5 +2,7 @@ const loaderUtils = require('loader-utils'); module.exports = function blobUrl(source) { const { type } = loaderUtils.getOptions(this) || {}; - return `module.exports = URL.createObjectURL(new Blob([${JSON.stringify(source)}]${type ? `, { type: ${JSON.stringify(type)} }` : ''}));`; + return `module.exports = URL.createObjectURL(new Blob([${JSON.stringify(source)}]${ + type ? `, { type: ${JSON.stringify(type)} }` : '' + }));`; }; diff --git a/scripts/webpack/loaders/compile.js b/scripts/webpack/loaders/compile.js index 1716fd00f73..d34fa3abbe1 100644 --- a/scripts/webpack/loaders/compile.js +++ b/scripts/webpack/loaders/compile.js @@ -40,7 +40,7 @@ module.exports.pitch = function pitch(remainingRequest) { // https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsApply.js new WebWorkerTemplatePlugin(outputOptions), new LoaderTargetPlugin('webworker'), - ...((this.target === 'web') || (this.target === 'webworker') ? [] : [new NodeTargetPlugin()]), + ...(this.target === 'web' || this.target === 'webworker' ? [] : [new NodeTargetPlugin()]), // https://github.com/webpack-contrib/worker-loader/issues/95#issuecomment-352856617 ...(compilerOptions.externals ? [new ExternalsPlugin(compilerOptions.externals)] : []), @@ -52,19 +52,29 @@ module.exports.pitch = function pitch(remainingRequest) { const subCache = `subcache ${__dirname} ${remainingRequest}`; - childCompiler.plugin('compilation', (compilation) => { - if (!compilation.cache) { return; } - if (!(subCache in compilation.cache)) { Object.assign(compilation.cache, { [subCache]: {} }); } + childCompiler.plugin('compilation', compilation => { + if (!compilation.cache) { + return; + } + if (!(subCache in compilation.cache)) { + Object.assign(compilation.cache, { [subCache]: {} }); + } Object.assign(compilation, { cache: compilation.cache[subCache] }); }); const callback = this.async(); childCompiler.runAsChild((error, entries, compilation) => { - if (error) { return callback(error); } - if (entries.length === 0) { return callback(null, null); } + if (error) { + return callback(error); + } + if (entries.length === 0) { + return callback(null, null); + } const mainFilename = entries[0].files[0]; - if (emit === false) { delete currentCompilation.assets[mainFilename]; } + if (emit === false) { + delete currentCompilation.assets[mainFilename]; + } callback(null, compilation.assets[mainFilename].source(), null, { [COMPILATION_METADATA]: entries[0].files, }); @@ -72,8 +82,12 @@ module.exports.pitch = function pitch(remainingRequest) { }; function getOutputFilename(options, { target }) { - if (!options) { return { filename: `[hash].${target}.js`, options: undefined }; } - if (typeof options === 'string') { return { filename: options, options: undefined }; } + if (!options) { + return { filename: `[hash].${target}.js`, options: undefined }; + } + if (typeof options === 'string') { + return { filename: options, options: undefined }; + } if (typeof options === 'object') { return { filename: options.filename, diff --git a/scripts/webpack/postcss.config.js b/scripts/webpack/postcss.config.js index 9066ecf444c..f51a6dae148 100644 --- a/scripts/webpack/postcss.config.js +++ b/scripts/webpack/postcss.config.js @@ -4,6 +4,6 @@ module.exports = () => { autoprefixer: {}, 'postcss-reporter': {}, 'postcss-browser-reporter': {}, - } + }, }; }; diff --git a/scripts/webpack/sass.rule.js b/scripts/webpack/sass.rule.js index 14a0f51bad2..41cc3edcd4b 100644 --- a/scripts/webpack/sass.rule.js +++ b/scripts/webpack/sass.rule.js @@ -12,7 +12,7 @@ module.exports = function(options) { options: { importLoaders: 2, url: options.preserveUrl, - sourceMap: options.sourceMap + sourceMap: options.sourceMap, }, }, { @@ -25,7 +25,7 @@ module.exports = function(options) { { loader: 'sass-loader', options: { - sourceMap: options.sourceMap + sourceMap: options.sourceMap, }, }, ], diff --git a/scripts/webpack/webpack.dev.js b/scripts/webpack/webpack.dev.js index acc64802d57..ff671686b1b 100644 --- a/scripts/webpack/webpack.dev.js +++ b/scripts/webpack/webpack.dev.js @@ -89,15 +89,7 @@ module.exports = (env = {}) => : new ForkTsCheckerWebpackPlugin({ eslint: { enabled: true, - files: [ - 'public/app/**/*.{ts,tsx}', - // this can't be written like this packages/**/src/**/*.ts because it throws an error - 'packages/grafana-ui/src/**/*.{ts,tsx}', - 'packages/grafana-data/src/**/*.{ts,tsx}', - 'packages/grafana-runtime/src/**/*.{ts,tsx}', - 'packages/grafana-e2e-selectors/src/**/*.{ts,tsx}', - 'packages/jaeger-ui-components/src/**/*.{ts,tsx}', - ], + files: ['public/app/**/*.{ts,tsx}', 'packages/*/src/**/*.{ts,tsx}'], options: { cache: true, }, diff --git a/scripts/webpack/webpack.prod.js b/scripts/webpack/webpack.prod.js index c8853cdf50c..244b788dcfd 100644 --- a/scripts/webpack/webpack.prod.js +++ b/scripts/webpack/webpack.prod.js @@ -89,15 +89,7 @@ module.exports = merge(common, { new ForkTsCheckerWebpackPlugin({ eslint: { enabled: true, - files: [ - 'public/app/**/*.{ts,tsx}', - // this can't be written like this packages/**/src/**/*.ts because it throws an error - 'packages/grafana-ui/src/**/*.{ts,tsx}', - 'packages/grafana-data/src/**/*.{ts,tsx}', - 'packages/grafana-runtime/src/**/*.{ts,tsx}', - 'packages/grafana-e2e-selectors/src/**/*.{ts,tsx}', - 'packages/jaeger-ui-components/src/**/*.{ts,tsx}', - ], + files: ['public/app/**/*.{ts,tsx}', 'packages/*/src/**/*.{ts,tsx}'], }, typescript: { mode: 'write-references', diff --git a/yarn.lock b/yarn.lock index 349dafb19b8..21f8827d965 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3331,10 +3331,10 @@ typescript "3.7.5" yaml "^1.8.3" -"@grafana/eslint-config@^1.0.0-rc1": - version "1.0.0-rc1" - resolved "https://registry.yarnpkg.com/@grafana/eslint-config/-/eslint-config-1.0.0-rc1.tgz#3b0a1abddfea900a57abc9526ad31abb1da2d42c" - integrity sha512-xmcJR6mUYw1llq3m8gT2kE7xoq6yLMUgNf2Mf1yZvDCx2cXFSyaLlGs1dqjFWjJDbV46GdhYRAyRbyGR+J9QKg== +"@grafana/eslint-config@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@grafana/eslint-config/-/eslint-config-2.0.0.tgz#6e2b03e6d9f2afe3a0afa68560184be4e47abcd8" + integrity sha512-AktBgoo/WzaPgjITkemP/ItcAc5E7Ga0mgjflP/fUGsHnx+d4C2Lxxxpf9BjhNgqj3G82Db8tjXDFHEqWW19hQ== "@grafana/slate-react@0.22.9-grafana": version "0.22.9-grafana" @@ -6808,91 +6808,65 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.0.tgz#bf743448a4633e4b52bee0c40148ba072ab3adbd" - integrity sha512-u7IcQ9qwsB6U806LupZmINRnQjC+RJyv36sV/ugaFWMHTbFm/hlLTRx3gGYJgHisxcGSTnf+I/fPDieRMhPSQQ== - dependencies: - "@typescript-eslint/experimental-utils" "2.19.0" - eslint-utils "^1.4.3" - functional-red-black-tree "^1.0.1" - regexpp "^3.0.0" - tsutils "^3.17.1" - -"@typescript-eslint/eslint-plugin@2.24.0": - version "2.24.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz#a86cf618c965a462cddf3601f594544b134d6d68" - integrity sha512-wJRBeaMeT7RLQ27UQkDFOu25MqFOBus8PtOa9KaT5ZuxC1kAsd7JEHqWt4YXuY9eancX0GK9C68i5OROnlIzBA== - dependencies: - "@typescript-eslint/experimental-utils" "2.24.0" - eslint-utils "^1.4.3" - functional-red-black-tree "^1.0.1" - regexpp "^3.0.0" - tsutils "^3.17.1" - -"@typescript-eslint/experimental-utils@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz#d5ca732f22c009e515ba09fcceb5f2127d841568" - integrity sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.19.0" - eslint-scope "^5.0.0" - -"@typescript-eslint/experimental-utils@2.24.0": - version "2.24.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.24.0.tgz#a5cb2ed89fedf8b59638dc83484eb0c8c35e1143" - integrity sha512-DXrwuXTdVh3ycNCMYmWhUzn/gfqu9N0VzNnahjiDJvcyhfBy4gb59ncVZVxdp5XzBC77dCncu0daQgOkbvPwBw== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.24.0" - eslint-scope "^5.0.0" - -"@typescript-eslint/parser@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.19.0.tgz#912160d9425395d09857dcd5382352bc98be11ae" - integrity sha512-s0jZoxAWjHnuidbbN7aA+BFVXn4TCcxEVGPV8lWMxZglSs3NRnFFAlL+aIENNmzB2/1jUJuySi6GiM6uACPmpg== - dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.19.0" - "@typescript-eslint/typescript-estree" "2.19.0" - eslint-visitor-keys "^1.1.0" - -"@typescript-eslint/parser@2.24.0": - version "2.24.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.24.0.tgz#2cf0eae6e6dd44d162486ad949c126b887f11eb8" - integrity sha512-H2Y7uacwSSg8IbVxdYExSI3T7uM1DzmOn2COGtCahCC3g8YtM1xYAPi2MAHyfPs61VKxP/J/UiSctcRgw4G8aw== - dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.24.0" - "@typescript-eslint/typescript-estree" "2.24.0" - eslint-visitor-keys "^1.1.0" - -"@typescript-eslint/typescript-estree@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz#6bd7310b9827e04756fe712909f26956aac4b196" - integrity sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w== +"@typescript-eslint/eslint-plugin@3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.6.0.tgz#ba2b6cae478b8fca3f2e58ff1313e4198eea2d8a" + integrity sha512-ubHlHVt1lsPQB/CZdEov9XuOFhNG9YRC//kuiS1cMQI6Bs1SsqKrEmZnpgRwthGR09/kEDtr9MywlqXyyYd8GA== dependencies: + "@typescript-eslint/experimental-utils" "3.6.0" debug "^4.1.1" + functional-red-black-tree "^1.0.1" + regexpp "^3.0.0" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/experimental-utils@3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.6.0.tgz#0138152d66e3e53a6340f606793fb257bf2d76a1" + integrity sha512-4Vdf2hvYMUnTdkCNZu+yYlFtL2v+N2R7JOynIOkFbPjf9o9wQvRwRkzUdWlFd2YiiUwJLbuuLnl5civNg5ykOQ== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/types" "3.6.0" + "@typescript-eslint/typescript-estree" "3.6.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/parser@3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.6.0.tgz#79b5232e1a2d06f1fc745942b690cd87aca7b60e" + integrity sha512-taghDxuLhbDAD1U5Fk8vF+MnR0yiFE9Z3v2/bYScFb0N1I9SK8eKHkdJl1DAD48OGFDMFTeOTX0z7g0W6SYUXw== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "3.6.0" + "@typescript-eslint/types" "3.6.0" + "@typescript-eslint/typescript-estree" "3.6.0" eslint-visitor-keys "^1.1.0" + +"@typescript-eslint/types@3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.6.0.tgz#4bd6eee55d2f9d35a4b36c4804be1880bf68f7bc" + integrity sha512-JwVj74ohUSt0ZPG+LZ7hb95fW8DFOqBuR6gE7qzq55KDI3BepqsCtHfBIoa0+Xi1AI7fq5nCu2VQL8z4eYftqg== + +"@typescript-eslint/typescript-estree@3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.6.0.tgz#9b4cab43f1192b64ff51530815b8919f166ce177" + integrity sha512-G57NDSABHjvob7zVV09ehWyD1K6/YUKjz5+AufObFyjNO4DVmKejj47MHjVHHlZZKgmpJD2yyH9lfCXHrPITFg== + dependencies: + "@typescript-eslint/types" "3.6.0" + "@typescript-eslint/visitor-keys" "3.6.0" + debug "^4.1.1" glob "^7.1.6" is-glob "^4.0.1" lodash "^4.17.15" - semver "^6.3.0" + semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@2.24.0": - version "2.24.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.24.0.tgz#38bbc8bb479790d2f324797ffbcdb346d897c62a" - integrity sha512-RJ0yMe5owMSix55qX7Mi9V6z2FDuuDpN6eR5fzRJrp+8in9UF41IGNQHbg5aMK4/PjVaEQksLvz0IA8n+Mr/FA== +"@typescript-eslint/visitor-keys@3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.6.0.tgz#44185eb0cc47651034faa95c5e2e8b314ecebb26" + integrity sha512-p1izllL2Ubwunite0ITjubuMQRBGgjdVYwyG7lXPX8GbrA6qF0uwSRz9MnXZaHMxID4948gX0Ez8v9tUDi/KfQ== dependencies: - debug "^4.1.1" eslint-visitor-keys "^1.1.0" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^6.3.0" - tsutils "^3.17.1" "@webassemblyjs/ast@1.8.5": version "1.8.5" @@ -7159,6 +7133,11 @@ acorn-jsx@^5.1.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + acorn-walk@^6.0.1, acorn-walk@^6.1.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" @@ -7199,7 +7178,7 @@ acorn@^7.1.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== -acorn@^7.1.1: +acorn@^7.1.1, acorn@^7.2.0: version "7.3.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== @@ -7415,6 +7394,11 @@ ansi-colors@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -7681,15 +7665,6 @@ array-includes@^3.0.3: define-properties "^1.1.2" es-abstract "^1.7.0" -array-includes@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" - integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0" - is-string "^1.0.5" - array-slice@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" @@ -9756,10 +9731,10 @@ commander@~2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== -comment-parser@^0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-0.7.2.tgz#baf6d99b42038678b81096f15b630d18142f4b8a" - integrity sha512-4Rjb1FnxtOcv9qsfuaNuVsmmVn4ooVoBHzYfyKteiXwIU84PClyGA5jASoFMwPV93+FPh9spwueXauxFJZkGAg== +comment-parser@^0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-0.7.5.tgz#06db157a3b34addf8502393743e41897e2c73059" + integrity sha512-iH9YA35ccw94nx5244GVkpyC9eVTsL71jZz6iz5w6RIf79JLF2AsXHXq9p6Oaohyl3sx5qSMnGsWUDFIAfWL4w== common-tags@1.8.0, common-tags@^1.8.0: version "1.8.0" @@ -10303,6 +10278,15 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypt@~0.0.1: version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" @@ -11124,7 +11108,7 @@ deep-freeze@^0.0.1: resolved "https://registry.yarnpkg.com/deep-freeze/-/deep-freeze-0.0.1.tgz#3a0b0005de18672819dfd38cd31f91179c893e84" integrity sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ= -deep-is@~0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= @@ -11409,13 +11393,6 @@ doctrine@^1.2.2: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -11777,6 +11754,13 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: memory-fs "^0.5.0" tapable "^1.0.0" +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + entities@^1.1.1, entities@^1.1.2, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -12121,48 +12105,37 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-prettier@6.10.0: - version "6.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f" - integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg== +eslint-config-prettier@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" -eslint-plugin-jsdoc@22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.1.0.tgz#dadfa62653fc0d87f900d810307f5ed07ef6ecd5" - integrity sha512-54NdbICM7KrxsGUqQsev9aIMqPXyvyBx2218Qcm0TQ16P9CtBI+YY4hayJR6adrxlq4Ej0JLpgfUXWaQVFqmQg== +eslint-plugin-jsdoc@28.6.1: + version "28.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-28.6.1.tgz#c9e9da59d0d3cef4fb45ffb91c0acde43af4e418" + integrity sha512-Z3y7hcNPDuhL339D1KOf9SY8pMAxYxhaG4QLtu3KVn20k/hNF1u6WQv44wvuSCb6OfPJ4say37RUlSNqIjR+mw== dependencies: - comment-parser "^0.7.2" + comment-parser "^0.7.5" debug "^4.1.1" - jsdoctypeparser "^6.1.0" + jsdoctypeparser "^7.0.0" lodash "^4.17.15" - regextras "^0.7.0" - semver "^6.3.0" - spdx-expression-parse "^3.0.0" + regextras "^0.7.1" + semver "^7.3.2" + spdx-expression-parse "^3.0.1" -eslint-plugin-prettier@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" - integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== +eslint-plugin-prettier@3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2" + integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg== dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-react@7.18.3: - version "7.18.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.18.3.tgz#8be671b7f6be095098e79d27ac32f9580f599bc8" - integrity sha512-Bt56LNHAQCoou88s8ViKRjMB2+36XRejCQ1VoLj716KI1MoE99HpTVvIThJ0rvFmG4E4Gsq+UgToEjn+j044Bg== - dependencies: - array-includes "^3.1.1" - doctrine "^2.1.0" - has "^1.0.3" - jsx-ast-utils "^2.2.3" - object.entries "^1.1.1" - object.fromentries "^2.0.2" - object.values "^1.1.1" - prop-types "^15.7.2" - resolve "^1.14.2" - string.prototype.matchall "^4.0.2" +eslint-plugin-react-hooks@4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.5.tgz#4879003aa38e5d05d0312175beb6e4a1f617bfcf" + integrity sha512-3YLSjoArsE2rUwL8li4Yxx1SUg3DQWp+78N3bcJQGWVZckcp+yeQGsap/MSq05+thJk57o+Ww4PtZukXGL02TQ== eslint-scope@^4.0.3: version "4.0.3" @@ -12180,10 +12153,18 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" - integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== +eslint-scope@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5" + integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: eslint-visitor-keys "^1.1.0" @@ -12192,22 +12173,28 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" - integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== +eslint-visitor-keys@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint@7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.4.0.tgz#4e35a2697e6c1972f9d6ef2b690ad319f80f206f" + integrity sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" - chalk "^2.1.0" - cross-spawn "^6.0.5" + chalk "^4.0.0" + cross-spawn "^7.0.2" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^5.0.0" - eslint-utils "^1.4.3" - eslint-visitor-keys "^1.1.0" - espree "^6.1.2" - esquery "^1.0.1" + enquirer "^2.3.5" + eslint-scope "^5.1.0" + eslint-utils "^2.0.0" + eslint-visitor-keys "^1.2.0" + espree "^7.1.0" + esquery "^1.2.0" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" @@ -12216,21 +12203,19 @@ eslint@6.8.0: ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^7.0.0" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" + levn "^0.4.1" lodash "^4.17.14" minimatch "^3.0.4" - mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.3" + optionator "^0.9.1" progress "^2.0.0" - regexpp "^2.0.1" - semver "^6.1.2" - strip-ansi "^5.2.0" - strip-json-comments "^3.0.1" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" table "^5.2.3" text-table "^0.2.0" v8-compile-cache "^2.0.3" @@ -12282,14 +12267,14 @@ espree@^3.1.6: acorn "^5.5.0" acorn-jsx "^3.0.0" -espree@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d" - integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA== +espree@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.1.0.tgz#a9c7f18a752056735bf1ba14cb1b70adc3a5ce1c" + integrity sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw== dependencies: - acorn "^7.1.0" - acorn-jsx "^5.1.0" - eslint-visitor-keys "^1.1.0" + acorn "^7.2.0" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.2.0" esprima@^3.1.3, esprima@~3.1.0: version "3.1.3" @@ -12308,12 +12293,12 @@ espurify@^1.6.0: dependencies: core-js "^2.0.0" -esquery@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" - integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== +esquery@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== dependencies: - estraverse "^4.0.0" + estraverse "^5.1.0" esrecurse@^4.1.0: version "4.2.1" @@ -12327,11 +12312,16 @@ esrever@^0.2.0: resolved "https://registry.yarnpkg.com/esrever/-/esrever-0.2.0.tgz#96e9d28f4f1b1a76784cd5d490eaae010e7407b8" integrity sha1-lunSj08bGnZ4TNXUkOquAQ50B7g= -estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" @@ -12720,7 +12710,7 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4, fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -16741,10 +16731,10 @@ jscodeshift@^0.7.0: temp "^0.8.1" write-file-atomic "^2.3.0" -jsdoctypeparser@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsdoctypeparser/-/jsdoctypeparser-6.1.0.tgz#acfb936c26300d98f1405cb03e20b06748e512a8" - integrity sha512-UCQBZ3xCUBv/PLfwKAJhp6jmGOSLFNKzrotXGNgbKhWvz27wPsCsVeP7gIcHPElQw2agBmynAitXqhxR58XAmA== +jsdoctypeparser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/jsdoctypeparser/-/jsdoctypeparser-7.0.0.tgz#957192fbcb8c574240092cca4635383a6ed706eb" + integrity sha512-6vWPn5qSy+MbgCVjXsQKVkRywhs+IxFU7Chw72DKsWoGueYp6QX8eTc55+EA0yPGYfhmglb1gfi283asXirfGQ== jsdom@^11.5.1: version "11.12.0" @@ -16968,14 +16958,6 @@ jsurl@^0.1.5: resolved "https://registry.yarnpkg.com/jsurl/-/jsurl-0.1.5.tgz#2a5c8741de39cacafc12f448908bf34e960dcee8" integrity sha1-KlyHQd45ysr8EvRIkIvzTpYNzug= -jsx-ast-utils@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz#8a9364e402448a3ce7f14d357738310d9248054f" - integrity sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA== - dependencies: - array-includes "^3.0.3" - object.assign "^4.1.0" - just-extend@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.0.2.tgz#f3f47f7dfca0f989c55410a7ebc8854b07108afc" @@ -17178,6 +17160,14 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + liftoff@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec" @@ -19274,17 +19264,17 @@ optionator@^0.8.1: type-check "~0.3.2" wordwrap "~1.0.0" -optionator@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" ora@^4.0.3: version "4.0.3" @@ -20791,6 +20781,11 @@ prefix-style@2.0.1: resolved "https://registry.yarnpkg.com/prefix-style/-/prefix-style-2.0.1.tgz#66bba9a870cfda308a5dc20e85e9120932c95a06" integrity sha1-ZrupqHDP2jCKXcIOhekSCTLJWgY= +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -22646,16 +22641,16 @@ regexp.prototype.flags@^1.3.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -regexpp@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" - integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== - regexpp@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== +regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + regexpu-core@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" @@ -22680,10 +22675,10 @@ regexpu-core@^4.7.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.2.0" -regextras@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/regextras/-/regextras-0.7.0.tgz#2298bef8cfb92b1b7e3b9b12aa8f69547b7d71e4" - integrity sha512-ds+fL+Vhl918gbAUb0k2gVKbTZLsg84Re3DI6p85Et0U0tYME3hyW4nMK8Px4dtDaBA2qNjvG5uWyW7eK5gfmw== +regextras@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/regextras/-/regextras-0.7.1.tgz#be95719d5f43f9ef0b9fa07ad89b7c606995a3b2" + integrity sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w== registry-auth-token@^3.0.1: version "3.4.0" @@ -23663,7 +23658,7 @@ semver@7.x, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -24269,6 +24264,14 @@ spdx-expression-parse@^3.0.0: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" +spdx-expression-parse@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + spdx-license-ids@^3.0.0: version "3.0.5" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" @@ -24607,7 +24610,7 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -"string.prototype.matchall@^4.0.0 || ^3.0.1", string.prototype.matchall@^4.0.2: +"string.prototype.matchall@^4.0.0 || ^3.0.1": version "4.0.2" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz#48bb510326fb9fdeb6a33ceaa81a6ea04ef7648e" integrity sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg== @@ -24808,10 +24811,10 @@ strip-json-comments@2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strip-json-comments@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" - integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== +strip-json-comments@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" + integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== strip-json-comments@~1.0.1: version "1.0.4" @@ -25724,6 +25727,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -26880,7 +26890,7 @@ wolfy87-eventemitter@~5.1.0: resolved "https://registry.yarnpkg.com/wolfy87-eventemitter/-/wolfy87-eventemitter-5.1.0.tgz#35c1ac0dd1ac0c15e35d981508fc22084a13a011" integrity sha1-NcGsDdGsDBXjXZgVCPwiCEoToBE= -word-wrap@~1.2.3: +word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==