@aha-co/config
v1.2.0
Published
Standardized configs for Aha JS projects
Downloads
16
Readme
@aha-co/config
Standardized set of configuration files for TypeScript projects so we don't have to think about them. Heavily inspired by @epic-web/config.
Usage
These are a set of defaults and everything can be overridden as needed per project.
npm install @aha-co/configTypeScript
Create a tsconfig.json file in the project root and
extend this config file:
{
"extends": ["@aha-co/config/typescript"],
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
"compilerOptions": {
// override here
}
}Create a reset.d.ts file:
import "@aha-co/config/reset.d.ts"TS for Libraries
The configuration above assumes you're using a bundler to create an application. If you're creating a library, you'll want the configuration to be more strict to be consumable in as many setups as possible. You can extend a different config instead:
extends: ["@aha-co/config/typescript.lib"],ESLint
Create a eslint.config.js file in the project root and
extend this config file:
import { config } from "@aha-co/config/eslint"
/** @type {import("eslint").Linter.Config[]} */
export default [
...config,
// override here
]Prettier
Add a line in package.json to point to this config file:
"prettier": "@aha-co/config/prettier",You can add a .prettierignore file to your project root if needed.
