fix: eslint ignore, type definition

This commit is contained in:
Sidharth Vinod 2024-04-14 12:11:01 +05:30
parent 7fa887b644
commit 5b6c5dff0a
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
8 changed files with 16 additions and 23 deletions

View File

@ -1,11 +0,0 @@
dist/**
.github/**
docs/Setup.md
cypress.config.js
cypress/plugins/index.js
coverage
*.json
node_modules
# autogenereated by langium-cli
generated/

1
.eslintignore Symbolic link
View File

@ -0,0 +1 @@
.gitignore

View File

@ -53,7 +53,7 @@ module.exports = {
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/consistent-type-definitions': 'warn',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/ban-ts-comment': [
'error',
{

View File

@ -25,8 +25,8 @@
"dev:vite": "tsx .vite/server.ts",
"dev:coverage": "pnpm coverage:cypress:clean && VITE_COVERAGE=true pnpm dev:vite",
"release": "pnpm build",
"lint": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content --ignore-path .gitignore . && pnpm lint:jison && prettier --cache --check .",
"lint:fix": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content --fix --ignore-path .gitignore . && prettier --write . && tsx scripts/fixCSpell.ts",
"lint": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content . && pnpm lint:jison && prettier --cache --check .",
"lint:fix": "cross-env NODE_OPTIONS=--max_old_space_size=8192 eslint --cache --cache-strategy content --fix . && prettier --write . && tsx scripts/fixCSpell.ts",
"lint:jison": "tsx ./scripts/jison/lint.mts",
"contributors": "tsx scripts/updateContributors.ts",
"cypress": "cypress run",

View File

@ -138,7 +138,7 @@ export interface ClassNote {
text: string;
}
export type ClassRelation = {
export interface ClassRelation {
id1: string;
id2: string;
relationTitle1: string;
@ -152,7 +152,7 @@ export type ClassRelation = {
type2: number;
lineType: number;
};
};
}
export interface NamespaceNode {
id: string;

View File

@ -17,7 +17,10 @@ function textSanitizer(text: string) {
return sanitizeText(text.trim(), config);
}
type LexTextObj = { text: string; type: 'text' | 'markdown' };
interface LexTextObj {
text: string;
type: 'text' | 'markdown';
}
const quadrantBuilder = new QuadrantBuilder();

View File

@ -19,12 +19,12 @@ import { InfoTokenBuilder } from './tokenBuilder.js';
/**
* Declaration of `Info` services.
*/
type InfoAddedServices = {
interface InfoAddedServices {
parser: {
TokenBuilder: InfoTokenBuilder;
ValueConverter: CommonValueConverter;
};
};
}
/**
* Union of Langium default services and `Info` services.

View File

@ -19,12 +19,12 @@ import { PacketTokenBuilder } from './tokenBuilder.js';
/**
* Declaration of `Packet` services.
*/
type PacketAddedServices = {
interface PacketAddedServices {
parser: {
TokenBuilder: PacketTokenBuilder;
ValueConverter: CommonValueConverter;
};
};
}
/**
* Union of Langium default services and `Packet` services.

View File

@ -19,12 +19,12 @@ import { PieValueConverter } from './valueConverter.js';
/**
* Declaration of `Pie` services.
*/
type PieAddedServices = {
interface PieAddedServices {
parser: {
TokenBuilder: PieTokenBuilder;
ValueConverter: PieValueConverter;
};
};
}
/**
* Union of Langium default services and `Pie` services.