Skip to content

Commit

Permalink
Merge pull request #711 from axonivy/eslint-v9
Browse files Browse the repository at this point in the history
Update to eslint v9
  • Loading branch information
ivy-lli authored Jan 9, 2025
2 parents 38f2177 + 2762b08 commit 2b41de6
Show file tree
Hide file tree
Showing 184 changed files with 1,533 additions and 1,788 deletions.
9 changes: 0 additions & 9 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pipeline {
currentBuild.description = "<a href=${BUILD_URL}artifact/integration/standalone/build/index.html?server=dev.demo.ivyteam.io&app=demo-app-dev&pmv=workflow-demos&file=/processes/Humantask/ProcurementRequestParallel.p.json>Standalone</a><br>" +
"<a href=${BUILD_URL}artifact/integration/viewer/build/index.html?server=dev.demo.ivyteam.io&app=demo-app-dev&pmv=workflow-demos&file=/processes/Humantask/ProcurementRequestParallel.p.json>Viewer</a>"
withChecks('ESLint') {
recordIssues enabledForFailure: true, publishAllIssues: true, aggregatingResults: true, tools: [esLint(pattern: 'packages/**/eslint.xml,integration/**/eslint.xml', skipSymbolicLinks: true)], qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
recordIssues enabledForFailure: true, publishAllIssues: true, aggregatingResults: true, tools: [esLint(pattern: 'eslint.xml', skipSymbolicLinks: true)], qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
}
withChecks('Tests') {
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: 'report.xml'
Expand Down
46 changes: 0 additions & 46 deletions configs/base.eslintrc.json

This file was deleted.

29 changes: 29 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import tseslint from 'typescript-eslint';
import config from '@axonivy/eslint-config';

export default tseslint.config(
...config.base,
// TypeScript recommended configs
{
name: 'typescript-eslint',
languageOptions: {
parserOptions: {
project: true, // Uses tsconfig.json from current directory
tsconfigRootDir: import.meta.dirname
}
}
},
// Project specific configs
{
name: 'general',
rules: {
'@typescript-eslint/no-namespace': 'off'
}
},
{
name: 'packages/editor',
rules: {
'react/no-unknown-property': 'off'
}
}
);
9 changes: 0 additions & 9 deletions integration/eclipse/.eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions integration/eclipse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"type": "module",
"scripts": {
"clean": "rimraf lib build/* tsconfig.tsbuildinfo",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"type": "tsc --noEmit",
"build": "tsc --build",
"package": "vite build",
Expand Down
9 changes: 0 additions & 9 deletions integration/inscription/.eslintrc.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions integration/inscription/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@axonivy/process-editor-inscription-core": "~13.1.0-next",
"@axonivy/process-editor-inscription-view": "~13.1.0-next",
"@axonivy/ui-icons": "~13.1.0-next.415",
"@axonivy/ui-icons": "~13.1.0-next.419",
"path-browserify": "^1.0.1"
},
"devDependencies": {
Expand All @@ -27,8 +27,6 @@
"type": "module",
"scripts": {
"clean": "rimraf lib build tsconfig.tsbuildinfo",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"type": "tsc --noEmit",
"build": "tsc --build",
"package": "vite build",
Expand Down
6 changes: 5 additions & 1 deletion integration/inscription/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export async function start(): Promise<void> {
const pid = URLParams.pid();
const theme = URLParams.themeMode();
const queryClient = initQueryClient();
const root = createRoot(document.getElementById('root')!);
const rootElement = document.getElementById('root');
if (!rootElement) {
throw new Error('root element not found');
}
const root = createRoot(rootElement);

root.render(
<React.StrictMode>
Expand Down
6 changes: 5 additions & 1 deletion integration/inscription/src/mock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export async function start(): Promise<void> {
const readonly = URLParams.parameter('readonly') ? true : false;
const type = (URLParams.parameter('type') as ElementType) ?? undefined;
const theme = URLParams.themeMode();
const root = createRoot(document.getElementById('root')!);
const rootElement = document.getElementById('root');
if (!rootElement) {
throw new Error('root element not found');
}
const root = createRoot(rootElement);
const queryClient = initQueryClient();
const client = new InscriptionClientMock(readonly, type);
await MonacoEditorUtil.configureInstance({ theme, debug: true });
Expand Down
9 changes: 0 additions & 9 deletions integration/standalone/.eslintrc.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions integration/standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@axonivy/process-editor": "~13.1.0-next",
"@axonivy/process-editor-inscription": "~13.1.0-next",
"@axonivy/process-editor-inscription-view": "~13.1.0-next",
"@axonivy/ui-components": "~13.1.0-next.415",
"@axonivy/ui-components": "~13.1.0-next.419",
"@eclipse-glsp/client": "2.3.0"
},
"devDependencies": {
Expand All @@ -26,8 +26,6 @@
"type": "module",
"scripts": {
"clean": "rimraf lib build/* tsconfig.tsbuildinfo",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"type": "tsc --noEmit",
"build": "tsc --build",
"package": "vite build",
Expand Down
9 changes: 0 additions & 9 deletions integration/viewer/.eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions integration/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"type": "module",
"scripts": {
"clean": "rimraf lib build/* tsconfig.tsbuildinfo",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"type": "tsc --noEmit",
"build": "tsc --build",
"package": "vite build",
Expand Down
Loading

0 comments on commit 2b41de6

Please sign in to comment.