diff --git a/zipkin-lens/.env.development b/zipkin-lens/.env.development index 14709776b01..f7b1d3f7aea 100644 --- a/zipkin-lens/.env.development +++ b/zipkin-lens/.env.development @@ -1,3 +1,2 @@ -# Browser may fail to start up due to something about the OS, but it causes the dev server to fail -# to startup completely. Just disable automatic browser startup instead. -BROWSER=none +BASE_PATH=/zipkin +API_BASE=http://localhost:9411/zipkin diff --git a/zipkin-lens/.env.production b/zipkin-lens/.env.production new file mode 100644 index 00000000000..969a6b0a05d --- /dev/null +++ b/zipkin-lens/.env.production @@ -0,0 +1,2 @@ +BASE_PATH=/zipkin +API_BASE=/zipkin diff --git a/zipkin-lens/.env.test b/zipkin-lens/.env.test new file mode 100644 index 00000000000..cfbb1ba49cf --- /dev/null +++ b/zipkin-lens/.env.test @@ -0,0 +1,2 @@ +BASE_PATH=/zipkin +API_BASE=http://localhost:51204/zipkin diff --git a/zipkin-lens/.eslintrc.js b/zipkin-lens/.eslintrc.js index 06088bf4808..ffb30c1a6fe 100644 --- a/zipkin-lens/.eslintrc.js +++ b/zipkin-lens/.eslintrc.js @@ -1,55 +1,31 @@ -/* - * Copyright 2015-2023 The OpenZipkin Authors - * - * 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. - */ module.exports = { - extends: ['plugin:prettier/recommended', 'react-app', 'react-app/jest'], - rules: { - 'import/no-anonymous-default-export': 'off', - 'import/prefer-default-export': 'off', - 'max-classes-per-file': 'off', - 'no-console': 0, - 'no-underscore-dangle': ['off'], - 'no-continue': ['off'], - 'prefer-destructuring': [ - 'error', - { - AssignmentExpression: { array: false, object: false }, - VariableDeclarator: { array: true, object: true }, - }, - ], - 'react/jsx-filename-extension': [ - 1, - { extensions: ['.js', '.jsx', '.tsx'] }, - ], - 'react/jsx-props-no-spreading': 'off', - 'react/no-array-index-key': 'off', - 'react/no-unescaped-entities': 'off', - 'react-hooks/exhaustive-deps': 'warn', - }, - globals: { - fetch: false, - document: false, + parser: '@typescript-eslint/parser', // Specifies the ESLint parser + extends: [ + 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react + 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin + 'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier + 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. + ], + parserOptions: { + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features + sourceType: 'module', // Allows for the use of imports + ecmaFeatures: { + jsx: true, // Allows for the parsing of JSX + }, }, - env: { - browser: true, - jquery: true, + rules: { + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs + // e.g. "@typescript-eslint/explicit-function-return-type": "off", + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + 'react/display-name': 'off', + "react/prop-types": "off" }, - overrides: [ - { - files: ['**/*.tsx'], - rules: { - 'react/prop-types': 'off', - }, + settings: { + react: { + version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use }, - ], + }, }; diff --git a/zipkin-lens/public/index.html b/zipkin-lens/index.html similarity index 83% rename from zipkin-lens/public/index.html rename to zipkin-lens/index.html index 48163f9f8e7..9eb0990496d 100644 --- a/zipkin-lens/public/index.html +++ b/zipkin-lens/index.html @@ -1,6 +1,6 @@