Skip to content

Commit b7c31ed

Browse files
committed
[chore] Upd deps, fix linter
1 parent 6759f4d commit b7c31ed

File tree

6 files changed

+2111
-1961
lines changed

6 files changed

+2111
-1961
lines changed

.eslintrc.js

+41-31
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,56 @@
11
module.exports = {
2-
parser: '@typescript-eslint/parser',
3-
parserOptions: {
4-
ecmaVersion: 2020,
5-
sourceType: 'module',
6-
//project: './tsconfig.json',
7-
ecmaFeatures: {
8-
jsx: true // Allows for the parsing of JSX
9-
10-
}
2+
env: {
3+
browser: true,
4+
es2021: true,
115
},
126
settings: {
137
react: {
14-
version: 'detect'
15-
}
8+
version: 'detect',
9+
},
10+
},
11+
extends: [
12+
'eslint:recommended',
13+
'plugin:react/recommended',
14+
'plugin:@typescript-eslint/recommended',
15+
'prettier',
16+
'plugin:prettier/recommended',
17+
'plugin:storybook/recommended',
18+
],
19+
parser: '@typescript-eslint/parser',
20+
parserOptions: {
21+
ecmaFeatures: {
22+
jsx: true,
23+
},
24+
ecmaVersion: 13,
25+
sourceType: 'module',
1626
},
17-
plugins: ['import', 'flowtype', 'jsx-a11y', 'react', 'react-hooks', 'prettier'],
18-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "react-app", "prettier", "plugin:prettier/recommended", "plugin:storybook/recommended"],
27+
plugins: ['import', 'flowtype', 'jsx-a11y', 'react', 'react-hooks', '@typescript-eslint', 'prettier'],
1928
rules: {
2029
'@typescript-eslint/no-use-before-define': 'off',
2130
'@typescript-eslint/no-explicit-any': 'off',
2231
'@typescript-eslint/no-empty-function': 'off',
2332
'@typescript-eslint/ban-ts-comment': 'off',
24-
'@typescript-eslint/ban-types': ['error', {
25-
extendDefaults: true,
26-
types: {
27-
'{}': false,
28-
Function: false
29-
}
30-
}],
33+
'@typescript-eslint/ban-types': [
34+
'error',
35+
{
36+
extendDefaults: true,
37+
types: {
38+
'{}': false,
39+
Function: false,
40+
},
41+
},
42+
],
43+
'@typescript-eslint/naming-convention': [
44+
'error',
45+
{
46+
selector: 'variableLike',
47+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
48+
},
49+
],
3150
'react/jsx-props-no-spreading': 'off',
3251
'react/prop-types': 'off',
52+
'react/display-name': 'off',
3353
'import/no-anonymous-default-export': 'off',
3454
'import/prefer-default-export': 'off',
35-
'@typescript-eslint/naming-convention': ['error', {
36-
selector: 'variableLike',
37-
format: ['camelCase', 'PascalCase', 'UPPER_CASE']
38-
}]
3955
},
40-
overrides: [{
41-
files: ['**/*.stories.*'],
42-
rules: {
43-
'import/no-anonymous-default-export': 'off'
44-
}
45-
}]
46-
};
56+
};

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"lint-staged": "lint-staged"
5353
},
5454
"peerDependencies": {
55-
"@agentlab/sparql-jsld-client": ">=5.0.6",
55+
"@agentlab/sparql-jsld-client": ">=5.0.7",
5656
"@ant-design/icons": ">=4.7.0",
5757
"@rdfjs/data-model": ">=1.3.4",
5858
"@tinymce/tinymce-react": ">=3.13.0",
@@ -83,7 +83,7 @@
8383
"uuid62": ">=1.0.2"
8484
},
8585
"dependencies": {
86-
"@agentlab/sparql-jsld-client": "^5.0.6",
86+
"@agentlab/sparql-jsld-client": "^5.0.7",
8787
"@ant-design/icons": "^4.7.0",
8888
"@tinymce/tinymce-react": "^3.13.0",
8989
"@types/react": "^17.0.38",
@@ -119,9 +119,9 @@
119119
"uri-js": "^4.4.1"
120120
},
121121
"devDependencies": {
122-
"@babel/core": "^7.16.5",
122+
"@babel/core": "^7.16.7",
123123
"@rollup/plugin-commonjs": "^21.0.1",
124-
"@rollup/plugin-node-resolve": "^13.1.1",
124+
"@rollup/plugin-node-resolve": "^13.1.2",
125125
"@rollup/plugin-typescript": "^8.3.0",
126126
"@storybook/addon-actions": "^6.4.9",
127127
"@storybook/addon-essentials": "^6.4.9",
@@ -134,7 +134,7 @@
134134
"@testing-library/jest-dom": "^5.16.1",
135135
"@testing-library/react": "^12.1.2",
136136
"@testing-library/user-event": "^13.5.0",
137-
"@types/jest": "^27.0.3",
137+
"@types/jest": "^27.4.0",
138138
"@typescript-eslint/eslint-plugin": "^5.8.1",
139139
"@typescript-eslint/parser": "^5.8.1",
140140
"autoprefixer": "^10.4.1",
@@ -150,7 +150,7 @@
150150
"eslint-plugin-cypress": "^2.12.1",
151151
"eslint-plugin-flowtype": "^8.0.3",
152152
"eslint-plugin-import": "^2.25.3",
153-
"eslint-plugin-jest": "^25.3.2",
153+
"eslint-plugin-jest": "^25.3.3",
154154
"eslint-plugin-jsx-a11y": "^6.5.1",
155155
"eslint-plugin-prettier": "^4.0.0",
156156
"eslint-plugin-react": "^7.28.0",

src/antd-controls/AntdSelect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const AntdSelect = React.memo((props: any /*EnumCellProps & WithClassname
2929
onChange={(value: any) => handleChange(path, value)}>
3030
{[
3131
<Select.Option value='' key={'empty'}>
32-
''
32+
{''}
3333
</Select.Option>,
3434
].concat(
3535
options.map((optionValue: any) => (

src/components/ContextMenu/ContextMenu.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const ContextMenu: React.FC<ContextMenuProps> = ({ record, selection, vis
2828
<ul className='popup' style={{ left: `${x}px`, top: `${y}px`, position: 'fixed' }}>
2929
{actionsMap.map(({ title, action }) => (
3030
<li
31+
key={title}
3132
onClick={() => {
3233
action(selection);
3334
onClick();

src/table/basetable/BaseTableMenu.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const BaseTableMenu: React.FC<BaseTablrMenu> = ({ record, selection, visi
4747
<ul className='popup' style={{ left: `${x}px`, top: `${y}px`, position: 'fixed' }}>
4848
{actionsMap.map(({ title, action }) => (
4949
<li
50+
key={title}
5051
onClick={() => {
5152
action(selection);
5253
onClick();

0 commit comments

Comments
 (0)