diff options
author | 2022-08-12 19:54:46 +0200 | |
---|---|---|
committer | 2022-08-12 19:54:46 +0200 | |
commit | d22c3b0c257f5daf5b401988a35ab9ce981a2341 (patch) | |
tree | 0a661c927c37b52197326d1c05e211daf9bd19e5 /subprojects/frontend/src/xtext/ValidationService.ts | |
parent | fix(language): rule parsing test (diff) | |
download | refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.gz refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.zst refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.zip |
refactor(frontend): move from Webpack to Vite
Also overhaulds the building and linting for frontend assets.
Diffstat (limited to 'subprojects/frontend/src/xtext/ValidationService.ts')
-rw-r--r-- | subprojects/frontend/src/xtext/ValidationService.ts | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/subprojects/frontend/src/xtext/ValidationService.ts b/subprojects/frontend/src/xtext/ValidationService.ts index ff7d3700..a0b27251 100644 --- a/subprojects/frontend/src/xtext/ValidationService.ts +++ b/subprojects/frontend/src/xtext/ValidationService.ts | |||
@@ -1,10 +1,11 @@ | |||
1 | import type { Diagnostic } from '@codemirror/lint'; | 1 | import type { Diagnostic } from '@codemirror/lint'; |
2 | 2 | ||
3 | import type { EditorStore } from '../editor/EditorStore'; | 3 | import type EditorStore from '../editor/EditorStore'; |
4 | import type { UpdateService } from './UpdateService'; | ||
5 | import { validationResult } from './xtextServiceResults'; | ||
6 | 4 | ||
7 | export class ValidationService { | 5 | import type UpdateService from './UpdateService'; |
6 | import { ValidationResult } from './xtextServiceResults'; | ||
7 | |||
8 | export default class ValidationService { | ||
8 | private readonly store: EditorStore; | 9 | private readonly store: EditorStore; |
9 | 10 | ||
10 | private readonly updateService: UpdateService; | 11 | private readonly updateService: UpdateService; |
@@ -15,15 +16,10 @@ export class ValidationService { | |||
15 | } | 16 | } |
16 | 17 | ||
17 | onPush(push: unknown): void { | 18 | onPush(push: unknown): void { |
18 | const { issues } = validationResult.parse(push); | 19 | const { issues } = ValidationResult.parse(push); |
19 | const allChanges = this.updateService.computeChangesSinceLastUpdate(); | 20 | const allChanges = this.updateService.computeChangesSinceLastUpdate(); |
20 | const diagnostics: Diagnostic[] = []; | 21 | const diagnostics: Diagnostic[] = []; |
21 | issues.forEach(({ | 22 | issues.forEach(({ offset, length, severity, description }) => { |
22 | offset, | ||
23 | length, | ||
24 | severity, | ||
25 | description, | ||
26 | }) => { | ||
27 | if (severity === 'ignore') { | 23 | if (severity === 'ignore') { |
28 | return; | 24 | return; |
29 | } | 25 | } |