Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web console: eslint@9, stylelint@16 #17365

Merged
merged 8 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5271,6 +5271,16 @@ license_file_path: licenses/bin/@types-prop-types.MIT

---

name: "@types/react-table"
license_category: binary
module: web-console
license_name: MIT License
copyright: Microsoft Corporation.
version: 6.8.5
license_file_path: licenses/bin/@types-react-table.MIT

---

name: "@types/react"
license_category: binary
module: web-console
Expand Down Expand Up @@ -5803,7 +5813,7 @@ license_category: binary
module: web-console
license_name: MIT License
copyright: Raynos
version: 1.1.1
version: 1.1.2
license_file_path: licenses/bin/function-bind.MIT

---
Expand All @@ -5828,13 +5838,13 @@ license_file_path: licenses/bin/has-own-prop.MIT

---

name: "has"
name: "hasown"
license_category: binary
module: web-console
license_name: MIT License
copyright: Thiago de Arruda
version: 1.0.3
license_file_path: licenses/bin/has.MIT
copyright: Jordan Harband
version: 2.0.2
license_file_path: licenses/bin/hasown.MIT

---

Expand Down Expand Up @@ -5932,7 +5942,7 @@ license_category: binary
module: web-console
license_name: MIT License
copyright: Jordan Harband
version: 2.10.0
version: 2.15.1
license_file_path: licenses/bin/is-core-module.MIT

---
Expand Down Expand Up @@ -6211,7 +6221,7 @@ license_category: binary
module: web-console
license_name: MIT License
copyright: Blake Embrey ([email protected])
version: 1.7.0
version: 1.9.0
license_file_path: licenses/bin/path-to-regexp.MIT

---
Expand All @@ -6231,7 +6241,7 @@ license_category: binary
module: web-console
license_name: MIT License
copyright: Facebook, Inc.
version: 15.7.2
version: 15.8.1
license_file_path: licenses/bin/prop-types.MIT

---
Expand Down Expand Up @@ -6311,7 +6321,7 @@ license_category: binary
module: web-console
license_name: MIT License
copyright: Facebook, Inc. and its affiliates.
version: 16.8.6
version: 16.13.1
license_file_path: licenses/bin/react-is.MIT

---
Expand Down Expand Up @@ -6361,7 +6371,7 @@ license_category: binary
module: web-console
license_name: MIT License
copyright: Tanner Linsley
version: 6.10.3
version: 6.11.5
license_file_path: licenses/bin/react-table.MIT

---
Expand Down
41 changes: 0 additions & 41 deletions web-console/.eslintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions web-console/console-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* limitations under the License.
*/

/* globals window */

window.consoleConfig = {
/* configs go here */
};
2 changes: 1 addition & 1 deletion web-console/e2e-tests/util/druid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const DRUID_EXAMPLES_QUICKSTART_TUTORIAL_DIR = path.join(
'tutorial',
);

export function runIndexTask(ingestionSpecPath: string, sedCommands: Array<string>) {
export function runIndexTask(ingestionSpecPath: string, sedCommands: string[]) {
const postIndexTask = path.join(DRUID_DIR, 'examples', 'bin', 'post-index-task');
const sedCommandsString = sedCommands.map(sedCommand => `-e '${sedCommand}'`).join(' ');
execSync(
Expand Down
2 changes: 1 addition & 1 deletion web-console/e2e-tests/util/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function retryIfJestAssertionError(
maxTries = 60,
) {
let i = 0;
// eslint-disable-next-line no-constant-condition

while (true) {
try {
await callback();
Expand Down
58 changes: 58 additions & 0 deletions web-console/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/

import awesomeCodeStyle, { configs } from '@awesome-code-style/eslint-config';
import awesomeCodeStyleReact, { reactConfigs } from '@awesome-code-style/eslint-config/react';
import notice from 'eslint-plugin-notice';
import globals from 'globals';

const TYPESCRIPT_FILES = ['**/*.ts', '**/*.tsx'];

export default [
{
ignores: ['public', 'target'],
},
...awesomeCodeStyle,
...awesomeCodeStyleReact,
...configs.typeChecked.map(config => ({ ...config, files: TYPESCRIPT_FILES })),
...reactConfigs.reactTypeChecked.map(config => ({ ...config, files: TYPESCRIPT_FILES })),
{
plugins: {
notice,
},
rules: {
'notice/notice': [2, { mustMatch: 'Licensed to the Apache Software Foundation \\(ASF\\).+' }],
'react/jsx-no-bind': [2, { allowArrowFunctions: true, allowFunctions: true }],
},
},
{
files: ['*.js', 'lib/*.js', 'script/*.js'],
languageOptions: {
globals: globals.node,
},
rules: {
'@typescript-eslint/no-require-imports': [0],
},
},
{
files: ['e2e-tests/**/*.ts'],
rules: {
'@typescript-eslint/no-unsafe-declaration-merging': [0],
},
},
];
Loading
Loading