Skip to content

Commit ac1069a

Browse files
Bump eslint (#127)
1 parent ea2df98 commit ac1069a

File tree

333 files changed

+6074
-3848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+6074
-3848
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 25 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { defineConfig } from 'eslint/config';
2+
import { configs } from '@croct/eslint-plugin';
3+
4+
export default defineConfig(
5+
configs.typescript,
6+
{
7+
ignores: [
8+
'build/**',
9+
'node_modules/**',
10+
'src/infrastructure/graphql/schema',
11+
'test/application/project/code/transformation/fixtures',
12+
],
13+
},
14+
{
15+
rules: {
16+
'import/extensions': 'off',
17+
'@typescript-eslint/unbound-method': 'off',
18+
'@typescript-eslint/no-empty-object-type': 'off',
19+
'@typescript-eslint/prefer-optional-chain': 'off',
20+
'import-x/extensions': 'off',
21+
'@typescript-eslint/await-thenable': 'off',
22+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
23+
'@typescript-eslint/no-redundant-type-constituents': 'off',
24+
'@typescript-eslint/strict-boolean-expressions': 'off',
25+
'@typescript-eslint/no-floating-promises': 'off',
26+
},
27+
},
28+
{
29+
files: ['tsup.config.ts'],
30+
rules: {
31+
'import/no-default-export': 'off',
32+
},
33+
}
34+
);

package-lock.json

Lines changed: 4595 additions & 2549 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"@babel/plugin-syntax-decorators": "^7.27.1",
4040
"@babel/plugin-transform-typescript": "^7.28.5",
4141
"@babel/types": "^7.28.5",
42+
"@commander-js/extra-typings": "^12.1.0",
4243
"@croct/cache": "^0.5.1",
4344
"@croct/content": "^1.1.0",
4445
"@croct/content-model": "^0.21.4",
@@ -47,6 +48,7 @@
4748
"@croct/logging": "^0.2.3",
4849
"@croct/md-lite": "^0.3.1",
4950
"@croct/sdk": "^0.20.0",
51+
"@croct/time": "^0.10.2",
5052
"@jsep-plugin/object": "^1.2.2",
5153
"@jsep-plugin/regex": "^1.0.4",
5254
"@jsep-plugin/spread": "^1.0.3",
@@ -73,21 +75,20 @@
7375
"strip-ansi": "^7.1.2",
7476
"terminal-link": "^3.0.0",
7577
"xdg-app-paths": "^8.3.0",
76-
"zod": "^3.25.76",
77-
"@croct/time": "^0.10.2",
78-
"@commander-js/extra-typings": "^12.1.0"
78+
"zod": "^3.25.76"
7979
},
8080
"devDependencies": {
81-
"@croct/eslint-plugin": "^0.7.1",
81+
"@croct/eslint-plugin": "^0.8.3",
8282
"@graphql-codegen/cli": "^5.0.7",
8383
"@swc/jest": "^0.2.39",
8484
"@types/ini": "^4.1.1",
8585
"@types/jest": "^29.5.14",
8686
"@types/prompts": "^2.4.9",
87+
"@types/semver": "^7.7.1",
8788
"@types/tar-stream": "^3.1.4",
88-
"@typescript-eslint/parser": "^6.21.0",
89+
"@typescript-eslint/parser": "^8.54.0",
8990
"esbuild-plugin-file-path-extensions": "^2.1.4",
90-
"eslint": "^8.57.1",
91+
"eslint": "^9.39.2",
9192
"jest": "^29.7.0",
9293
"tsup": "^8.5.0",
9394
"typescript": "^5.9.3"

src/application/api/application.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {ApiKey} from '@/application/model/application';
2-
import {ApplicationPath} from '@/application/api/workspace';
1+
import type {ApiKey} from '@/application/model/application';
2+
import type {ApplicationPath} from '@/application/api/workspace';
33

44
export type NewApiKey = ApplicationPath & Omit<ApiKey, 'id'>;
55

src/application/api/error.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import {Help, HelpfulError} from '@/application/error';
1+
import type {Help} from '@/application/error';
2+
import {HelpfulError} from '@/application/error';
23

34
export enum AccessDeniedReason {
45
INTERNAL_ERROR = 'INTERNAL_ERROR',

src/application/api/organization.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Workspace} from '@/application/model/workspace';
1+
import type {Workspace} from '@/application/model/workspace';
22

33
export type OrganizationPath = {
44
organizationSlug: string,
@@ -13,7 +13,7 @@ export type NewWorkspace = OrganizationPath & Omit<Workspace, 'id' | 'slug' | 'l
1313
export interface OrganizationApi {
1414
getWorkspaces(path: OrganizationPath): Promise<Workspace[]>;
1515

16-
getWorkspace(path: WorkspacePath): Promise<Workspace|null>;
16+
getWorkspace(path: WorkspacePath): Promise<Workspace | null>;
1717

1818
createWorkspace(workspace: NewWorkspace): Promise<Workspace>;
1919
}

src/application/api/user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {User} from '@/application/model/user';
2-
import {Organization} from '@/application/model/organization';
1+
import type {User} from '@/application/model/user';
2+
import type {Organization} from '@/application/model/organization';
33

44
export type OrganizationSetup = {
55
website: string,

src/application/api/workspace.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {RootDefinition} from '@croct/content-model/definition/definition';
2-
import {WorkspacePath} from '@/application/api/organization';
3-
import {Application} from '@/application/model/application';
4-
import {Audience} from '@/application/model/audience';
5-
import {Slot} from '@/application/model/slot';
6-
import {Component} from '@/application/model/component';
7-
import {
1+
import type {RootDefinition} from '@croct/content-model/definition/definition';
2+
import type {WorkspacePath} from '@/application/api/organization';
3+
import type {Application} from '@/application/model/application';
4+
import type {Audience} from '@/application/model/audience';
5+
import type {Slot} from '@/application/model/slot';
6+
import type {Component} from '@/application/model/component';
7+
import type {
88
ExperienceDetails,
99
ExperienceStatus,
1010
Experience,
@@ -13,7 +13,7 @@ import {
1313
SlotContentMap,
1414
SegmentedContent,
1515
} from '@/application/model/experience';
16-
import {WorkspaceFeatures} from '@/application/model/workspace';
16+
import type {WorkspaceFeatures} from '@/application/model/workspace';
1717

1818
export type AudiencePath = WorkspacePath & {
1919
audienceSlug: string,
@@ -61,7 +61,7 @@ export type ExperiencePath = WorkspacePath & {
6161
};
6262

6363
export type ExperienceCriteria = WorkspacePath & {
64-
status?: ExperienceStatus|ExperienceStatus[],
64+
status?: ExperienceStatus | ExperienceStatus[],
6565
};
6666

6767
export type SegmentedContentDefinition = Omit<SegmentedContent, 'id'>;
@@ -125,33 +125,33 @@ export type NewResourceIds = {
125125
};
126126

127127
export interface WorkspaceApi {
128-
getFeatures(path: WorkspacePath): Promise<WorkspaceFeatures|null>;
128+
getFeatures(path: WorkspacePath): Promise<WorkspaceFeatures | null>;
129129

130130
getAudiences(path: WorkspacePath): Promise<Audience[]>;
131131

132-
getAudience(path: AudiencePath): Promise<Audience|null>;
132+
getAudience(path: AudiencePath): Promise<Audience | null>;
133133

134134
getSlots(path: WorkspacePath): Promise<Slot[]>;
135135

136-
getSlot(criteria: SlotCriteria): Promise<Slot|null>;
136+
getSlot(criteria: SlotCriteria): Promise<Slot | null>;
137137

138138
getComponents(path: WorkspacePath): Promise<Component[]>;
139139

140-
getComponent(criteria: ComponentCriteria): Promise<Component|null>;
140+
getComponent(criteria: ComponentCriteria): Promise<Component | null>;
141141

142142
getSlotStaticContent(path: SlotPath, majorVersion?: number): Promise<LocalizedContent[]>;
143143

144144
generateTypes(typing: TargetTyping): Promise<string>;
145145

146146
getApplications(path: WorkspacePath): Promise<Application[]>;
147147

148-
getApplication(path: ApplicationPath): Promise<Application|null>;
148+
getApplication(path: ApplicationPath): Promise<Application | null>;
149149

150150
createApplication(application: NewApplication): Promise<Application>;
151151

152152
getExperiences(path: ExperienceCriteria): Promise<Experience[]>;
153153

154-
getExperience(path: ExperiencePath): Promise<ExperienceDetails|null>;
154+
getExperience(path: ExperiencePath): Promise<ExperienceDetails | null>;
155155

156156
createResources(resources: NewResources): Promise<NewResourceIds>;
157157
}

src/application/cli/authentication/authenticator/apiKeyAuthenticator.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import {ApiKey} from '@croct/sdk/apiKey';
1+
import type {ApiKey} from '@croct/sdk/apiKey';
22
import {Token} from '@croct/sdk/token';
3-
import {Clock, Instant} from '@croct/time';
4-
import {Authenticator} from '@/application/cli/authentication/authenticator/index';
3+
import type {Clock} from '@croct/time';
4+
import {Instant} from '@croct/time';
5+
import type {Authenticator} from '@/application/cli/authentication/authenticator/index';
56

67
export type Configuration = {
78
apiKey: ApiKey,
@@ -24,7 +25,7 @@ export class ApiKeyAuthenticator implements Authenticator<Record<never, never>>
2425
this.tokenDuration = tokenDuration;
2526
}
2627

27-
public getToken(): Promise<string|null> {
28+
public getToken(): Promise<string | null> {
2829
return Promise.resolve(this.token?.toString() ?? null);
2930
}
3031

0 commit comments

Comments
 (0)