1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

refactor: add eslint to merge check (#1022)

* refactor: fix eslint issues

* refactor: add eslint to merge check
This commit is contained in:
olav 2022-05-25 12:36:58 +02:00 committed by GitHub
parent 34f848ce8a
commit 20d738f725
6 changed files with 9 additions and 11 deletions

View File

@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
@ -15,8 +12,6 @@ jobs:
strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
@ -25,4 +20,5 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn run test
- run: yarn run lint
- run: yarn run fmt:check

View File

@ -25,7 +25,7 @@
"license": "Apache-2.0",
"scripts": {
"build": "tsc && vite build",
"lint": "eslint src",
"lint": "eslint src --max-warnings 0",
"start": "vite",
"start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start",
"start:enterprise": "UNLEASH_API=https://unleash4.herokuapp.com yarn run start",
@ -125,6 +125,9 @@
"react-app",
"react-app/jest"
],
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false
},
"rules": {
"no-restricted-globals": "off",
"no-useless-computed-key": "off",

View File

@ -1,9 +1,8 @@
import { useContext, VFC } from 'react';
import { VFC } from 'react';
import { useNavigate } from 'react-router-dom';
import { Button, IconButton, Tooltip, useMediaQuery } from '@mui/material';
import { useMediaQuery } from '@mui/material';
import { Add } from '@mui/icons-material';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import AccessContext from 'contexts/AccessContext';
import { CREATE_CONTEXT_FIELD } from 'component/providers/AccessProvider/permissions';
import PermissionButton from 'component/common/PermissionButton/PermissionButton';
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';

View File

@ -6,7 +6,6 @@ import {
import {
Edit,
Delete,
OfflineBolt,
DragIndicator,
PowerSettingsNew,
} from '@mui/icons-material';

View File

@ -158,6 +158,7 @@ export const StrategiesList = () => {
sortType: 'number',
},
],
// eslint-disable-next-line react-hooks/exhaustive-deps
[]
);

View File

@ -132,7 +132,7 @@ export const TagTypeList = () => {
disableSortBy: true,
},
],
[]
[navigate]
);
const initialState = useMemo(