SCGR's picture
Integrate VLMs
d7291ef
|
raw
history blame
1.29 kB

Linting and Type Checking

IFRC GO Web App repository utilizes ESLint and Stylelint for linting and formatting the code, as well as TypeScript for type checking.

ESLint

Configuration for ESLint can be found in the eslint.config.js file.

To lint your code

pnpm lint:js

To automatically fix fixable errors

pnpm lint:js --fix

Stylelint

Configuration for Stylelint is located in the stylelint.config.cjs file.

To lint your CSS files

pnpm lint:css

To automatically fix fixable errors

pnpm lint:css --fix

Fixing Lint Errors

To fix auto-fixable errors in both ESLint and Stylelint

pnpm lint:fix

Type Checking

Before running the type check, make sure to generate the types. To do this, define the API endpoints in the environment variables first.

To generate the TypeScript types for API endpoints

pnpm generate:type

To verify and enforce TypeScript type constraints

pnpm typecheck

Knip

Find unused files, dependencies, and exports

pnpm lint:unused

Automatically fix issues detected by Knip

pnpm lint:unused --fix