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

Update dependency typescript to v5.6.2 #1288

Merged
merged 4 commits into from
Sep 23, 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
94 changes: 47 additions & 47 deletions openbas-front/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module.exports = {
"root": true,
root: true,
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:i18next/recommended'
'plugin:i18next/recommended',
],
settings: {
"react": {
"version": "detect"
}
react: {
version: 'detect',
},
},
parserOptions: {
ecmaVersion: 2020,
project: './tsconfig.json',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
parser: '@typescript-eslint/parser'
parser: '@typescript-eslint/parser',
},
env: {
browser: true,
},
overrides: [
{
"files": ["*.jsx", "*.js", "*.ts", "*.tsx"]
}
files: ['*.jsx', '*.js', '*.ts', '*.tsx'],
},
],
ignorePatterns: [
'**/builder/**',
Expand All @@ -37,7 +37,7 @@ module.exports = {
'**/__generated__/**',
'**/src/static/ext/**',
],
plugins: ["import-newlines", "i18next", "custom-rules"],
plugins: ['import-newlines', 'i18next', 'custom-rules'],
rules: {
'custom-rules/classes-rule': 1,
'no-restricted-syntax': 0,
Expand All @@ -48,61 +48,61 @@ module.exports = {
'arrow-body-style': 'off',
'max-len': [
'error', 180, 2, {
'ignoreUrls': true,
'ignoreComments': false,
'ignoreRegExpLiterals': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true
}
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
'no-restricted-imports': [
'error', {
patterns: [
{
group: ['@mui/material/*', '!@mui/material/locale', '!@mui/material/styles', '!@mui/material/colors', '!@mui/material/transitions'],
message: "Please use named import from @mui/material instead."
message: 'Please use named import from @mui/material instead.',
},
{
group: ['@mui/styles/*'],
message: "Please use named import from @mui/styles instead."
}
]
}
message: 'Please use named import from @mui/styles instead.',
},
],
},
],
'@typescript-eslint/naming-convention': ['error', {
'selector': 'variable',
'format': ['camelCase', 'UPPER_CASE'],
'leadingUnderscore': 'allow',
'trailingUnderscore': 'allow',
'filter': {
'regex': '/([^_]*)/',
'match': true
}
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
filter: {
regex: '/([^_]*)/',
match: true,
},
}],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_'
}
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'import-newlines/enforce': ['error', {items: 20, 'max-len': 180}],
'import-newlines/enforce': ['error', { items: 20, 'max-len': 180 }],
'react/jsx-indent': [2, 2],
'react/jsx-indent-props': [2, 2],
'react/jsx-closing-bracket-location': 'error',
"import/no-extraneous-dependencies": [
"error",
'import/no-extraneous-dependencies': [
'error',
{
"devDependencies": [
"**/*.test.tsx",
"**/*.test.ts",
"vite.config.ts",
"vitest.config.ts",
"playwright.config.ts",
]
}
]
}
}
devDependencies: [
'**/*.test.tsx',
'**/*.test.ts',
'vite.config.ts',
'vitest.config.ts',
'playwright.config.ts',
],
},
],
},
};
2 changes: 1 addition & 1 deletion openbas-front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"jsdom": "25.0.0",
"nyc": "17.0.0",
"swagger-typescript-api": "13.0.22",
"typescript": "5.4.5",
"typescript": "5.6.2",
"vite": "5.4.6",
"vite-plugin-istanbul": "6.0.2",
"vitest": "1.6.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ interface Props {
teamId: Team['team_id']
}

interface UserStoreExtended extends UserStore {
type UserStoreExtended = UserStore & {
organization_name: Organization['organization_name'];
organization_description: Organization['organization_description']
}
};

const TeamAddPlayers: React.FC<Props> = ({ addedUsersIds, teamId }) => {
const dispatch = useAppDispatch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ interface Props {
handleClose: () => void
}

interface UserStoreExtended extends UserStore {
type UserStoreExtended = UserStore & {
user_enabled: boolean;
}
};

const TeamPlayers: React.FC<Props> = ({ teamId, handleClose }) => {
// Standard hooks
Expand Down
1 change: 1 addition & 0 deletions openbas-front/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"builder/dev/build",
"builder/prod/build",
"src/static/ext/*",
"vite.config.ts",
"__generated__"
],
"references": [
Expand Down
3 changes: 2 additions & 1 deletion openbas-front/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"allowSyntheticDefaultImports": true
},
"include": [
"vite.config.ts"
"vite.config.ts",
".eslintrc.cjs"
]
}
18 changes: 9 additions & 9 deletions openbas-front/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12232,7 +12232,7 @@ __metadata:
rxjs: "npm:7.8.1"
seamless-immutable: "npm:7.1.4"
swagger-typescript-api: "npm:13.0.22"
typescript: "npm:5.4.5"
typescript: "npm:5.6.2"
usehooks-ts: "npm:3.1.0"
uuid: "npm:10.0.0"
vite: "npm:5.4.6"
Expand Down Expand Up @@ -15615,13 +15615,13 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:5.4.5":
version: 5.4.5
resolution: "typescript@npm:5.4.5"
"typescript@npm:5.6.2":
version: 5.6.2
resolution: "typescript@npm:5.6.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/2954022ada340fd3d6a9e2b8e534f65d57c92d5f3989a263754a78aba549f7e6529acc1921913560a4b816c46dce7df4a4d29f9f11a3dc0d4213bb76d043251e
checksum: 10c0/3ed8297a8c7c56b7fec282532503d1ac795239d06e7c4966b42d4330c6cf433a170b53bcf93a130a7f14ccc5235de5560df4f1045eb7f3550b46ebed16d3c5e5
languageName: node
linkType: hard

Expand All @@ -15645,13 +15645,13 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A5.4.5#optional!builtin<compat/typescript>":
version: 5.4.5
resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin<compat/typescript>::version=5.4.5&hash=5adc0c"
"typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>":
version: 5.6.2
resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=8c6c40"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/db2ad2a16ca829f50427eeb1da155e7a45e598eec7b086d8b4e8ba44e5a235f758e606d681c66992230d3fc3b8995865e5fd0b22a2c95486d0b3200f83072ec9
checksum: 10c0/94eb47e130d3edd964b76da85975601dcb3604b0c848a36f63ac448d0104e93819d94c8bdf6b07c00120f2ce9c05256b8b6092d23cf5cf1c6fa911159e4d572f
languageName: node
linkType: hard

Expand Down