Skip to content

Commit

Permalink
Error when eslint fail. v5.11.16
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 11, 2023
1 parent 0a069d5 commit 336ad12
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build: npm build build-cn build-en

npm:
npm install
npm run lint

build: build-cn npm

Expand Down
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"start-zh": "env PUBLIC_URL=/mgmt REACT_APP_LOCALE=zh react-scripts start",
"start-en": "env PUBLIC_URL=/mgmt REACT_APP_LOCALE=en react-scripts start",
"build": "react-scripts build",
"lint": "eslint --max-warnings 0 ./src",
"test": "react-scripts test --watchAll=false",
"testWatch": "react-scripts test --watchAll=true",
"eject": "react-scripts eject"
Expand Down
7 changes: 7 additions & 0 deletions ui/src/components/SrsErrorBoundary.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test('renders with error desc', () => {

test('renders with auth', () => {
const TestError = () => {
// eslint-disable-next-line
throw {response: {data: {code: Errors.auth}}};
}

Expand All @@ -59,6 +60,7 @@ test('renders with auth', () => {

test('renders with code', () => {
const TestError = () => {
// eslint-disable-next-line
throw {response: {data: {code: 100}}};
}

Expand All @@ -71,6 +73,7 @@ test('renders with code', () => {

test('renders with status', () => {
const TestError = () => {
// eslint-disable-next-line
throw {response: {status: 500}};
}

Expand All @@ -83,6 +86,7 @@ test('renders with status', () => {

test('renders with object', () => {
const TestError = () => {
// eslint-disable-next-line
throw {key: 100};
}

Expand All @@ -95,6 +99,7 @@ test('renders with object', () => {

test('renders with array', () => {
const TestError = () => {
// eslint-disable-next-line
throw [1, 'a', {}];
}

Expand All @@ -107,6 +112,7 @@ test('renders with array', () => {

test('renders with funciton', () => {
const TestError = () => {
// eslint-disable-next-line
throw ()=>{};
}

Expand All @@ -119,6 +125,7 @@ test('renders with funciton', () => {

test('renders with string', () => {
const TestError = () => {
// eslint-disable-next-line
throw 'Hello World!';
}

Expand Down
2 changes: 0 additions & 2 deletions ui/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
//
'use strict';

const { createProxyMiddleware } = require('http-proxy-middleware');

console.log('setupProxy for development reactjs');
Expand Down
2 changes: 0 additions & 2 deletions ui/src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
//
'use strict';

import i18n from "i18next";
import { initReactI18next } from "react-i18next";

Expand Down

0 comments on commit 336ad12

Please sign in to comment.