Skip to content

Commit 3a4e711

Browse files
chore: update eslint rules
1 parent 5467a81 commit 3a4e711

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

.eslintrc.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"react-hooks"
2626
],
2727
"rules":{
28+
"react/require-default-props":"off",
2829
"react/react-in-jsx-scope":"off",
29-
"no-use-before-define":"off",
30+
"no-use-before-define": ["error"],
3031
"@typescript-eslint/no-use-before-define":[
3132
"error"
3233
],
@@ -49,12 +50,7 @@
4950
}
5051
],
5152

52-
"@typescript-eslint/explicit-function-return-type":[
53-
"error",
54-
{
55-
"allowExpressions":true
56-
}
57-
],
53+
"@typescript-eslint/explicit-function-return-type":"off",
5854
"max-len":[
5955
"warn",
6056
{
@@ -65,6 +61,7 @@
6561
"react-hooks/exhaustive-deps":"warn",
6662
"import/prefer-default-export":"off",
6763
"react/prop-types":"off"
64+
6865
},
6966
"settings":{
7067
"import/resolver":{

src/actions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Action } from '../hooks/useActions';
21
import * as Actions from 'nmrium/lib/component/reducer/types/Types';
2+
import { Action } from '../hooks/useActions';
33
import peaksChangeHandler from './peaksChangeHandler';
44

55
export const ACTIONS: Action[] = [

src/actions/peaksChangeHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { State } from 'nmrium/lib/component/reducer/Reducer';
22

33
export default function peaksChangeHandler(data: State) {
44
if (window.parent && data.activeSpectrum?.id) {
5+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
56
const { peaks, info } = data.data[data.activeSpectrum.index] as any;
6-
console.log(peaks, info);
77
window.parent.postMessage(
88
{ type: 'peaks', data: peaks, layout: info.nucleus },
99
'*',

0 commit comments

Comments
 (0)