Skip to content
Snippets Groups Projects
Commit c14fe71a authored by michael.minelli's avatar michael.minelli
Browse files

Package => Update eslint

parent 1277baa6
Branches
No related tags found
No related merge requests found
dist
node_modules
.gitlab-ci
\ No newline at end of file
{
"root" : true,
"parser" : "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
]
}
\ No newline at end of file
// @ts-check
// @formatter:off
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config({
ignores: [ 'dist/*', 'node_modules/*', '.gitlab-ci.yml', 'eslint.config.mjs' ]
}, eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, {
languageOptions: {
parserOptions: {
project: true, tsconfigRootDir: import.meta.dirname
}
}
}, {
plugins: {
'@typescript-eslint': tseslint.plugin
}, rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
}
});
\ No newline at end of file
This diff is collapsed.
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
"test" : "echo \"Error: no test specified\" && exit 1" "test" : "echo \"Error: no test specified\" && exit 1"
}, },
"dependencies" : { "dependencies" : {
"@eslint/js" : "^9.0.0",
"@gitbeaker/rest" : "^40.0.1", "@gitbeaker/rest" : "^40.0.1",
"axios" : "^1.6.5", "axios" : "^1.6.5",
"boxen" : "^5.1.2", "boxen" : "^5.1.2",
...@@ -52,13 +53,15 @@ ...@@ -52,13 +53,15 @@
"@types/js-yaml" : "^4.0.9", "@types/js-yaml" : "^4.0.9",
"@types/node" : "^18.19.8", "@types/node" : "^18.19.8",
"@types/tar-stream" : "^3.1.3", "@types/tar-stream" : "^3.1.3",
"@typescript-eslint/eslint-plugin": "^6.19.0", "@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser" : "^6.19.0", "@typescript-eslint/parser" : "^6.21.0",
"dotenv-vault" : "^1.25.0", "dotenv-vault" : "^1.25.0",
"eslint" : "^8.57.0",
"genversion" : "^3.2.0", "genversion" : "^3.2.0",
"pkg" : "^5.8.1", "pkg" : "^5.8.1",
"tiny-typed-emitter" : "^2.1.0", "tiny-typed-emitter" : "^2.1.0",
"tsx" : "^4.7.1", "tsx" : "^4.7.2",
"typescript" : "^5.4.3" "typescript" : "^5.4.5",
"typescript-eslint" : "^7.7.0"
} }
} }
...@@ -8,7 +8,7 @@ import Config from './config/Config.js'; ...@@ -8,7 +8,7 @@ import Config from './config/Config.js';
import Icon from './shared/types/Icon.js'; import Icon from './shared/types/Icon.js';
(async () => { void (async () => {
HttpManager.registerAxiosInterceptor(); HttpManager.registerAxiosInterceptor();
console.log(Styles.APP_NAME(`${ Config.appName } (version {{VERSION}})`)); console.log(Styles.APP_NAME(`${ Config.appName } (version {{VERSION}})`));
......
...@@ -37,7 +37,7 @@ class HttpManager { ...@@ -37,7 +37,7 @@ class HttpManager {
if ( config.url && (config.url.indexOf(ClientsSharedConfig.apiURL) !== -1) ) { if ( config.url && (config.url.indexOf(ClientsSharedConfig.apiURL) !== -1) ) {
config.headers['Accept-Encoding'] = 'gzip'; config.headers['Accept-Encoding'] = 'gzip';
if ( config.data && Object.keys(config.data).length > 0 ) { if ( config.data && Object.keys(config.data as { [key: string]: unknown }).length > 0 ) {
config.headers['Content-Type'] = 'multipart/form-data'; config.headers['Content-Type'] = 'multipart/form-data';
} }
...@@ -56,10 +56,10 @@ class HttpManager { ...@@ -56,10 +56,10 @@ class HttpManager {
const data: DojoBackendResponse<void> = error.response.data; const data: DojoBackendResponse<void> = error.response.data;
switch ( data.code ) { switch ( data.code ) {
case DojoStatusCode.CLIENT_NOT_SUPPORTED: case DojoStatusCode.CLIENT_NOT_SUPPORTED.valueOf():
this.requestError('Client not recognized by the server. Please contact the administrator.'); this.requestError('Client not recognized by the server. Please contact the administrator.');
break; break;
case DojoStatusCode.CLIENT_VERSION_NOT_SUPPORTED: case DojoStatusCode.CLIENT_VERSION_NOT_SUPPORTED.valueOf():
this.requestError(`AssignmentChecker version not supported by the server.\nPlease check that the CI/CD pipeline use the "${ Config.dockerhub.repositories.assignmentChecker }:latest" image.\nIf yes, try again later and if the problem persists, please contact the administrator.`); this.requestError(`AssignmentChecker version not supported by the server.\nPlease check that the CI/CD pipeline use the "${ Config.dockerhub.repositories.assignmentChecker }:latest" image.\nIf yes, try again later and if the problem persists, please contact the administrator.`);
break; break;
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment