Standard code quality tooling for projects written in TypeScript.
Install this module:
# NPM
npm install -D @aligent/ts-code-standards
# Yarn
yarn add -D @aligent/ts-code-standards
# PNPM
pnpm add -D @aligent/ts-code-standards
Copy the .editorconfig
from this repo into your own.
Add the following to your prettier.config.js
:
import { prettierConfig } from '@aligent/ts-code-standards';
export default prettierConfig;
Then install the ESLint and TypeScript configs depending on what type of project you are setting up:
Add the following to your eslint.config.js
:
import { eslintConfigs } from '@aligent/ts-code-standards';
export default [...eslintConfigs.base];
Add the following to your tsconfig.json
:
{
"extends": "@aligent/ts-code-standards/tsconfigs/base.json"
}
Add the following to your eslint.config.js
:
import { eslintConfigs } from '@aligent/ts-code-standards';
export default [...eslintConfigs.react];
Add the following to your tsconfig.json
:
{
"extends": "@aligent/ts-code-standards/tsconfigs/react.json"
}
- You'll need to add
include
,exclude
,paths
etc. to yourtsconfig
file. These settings will be project specific.