npm

@ibg/config

0.0.14 • Public • Published

@ibg/config banner

GitHub License NPM total downloads Join Discord

@ibg/config is a collection of ESLint, Vite and Typescript configurations.

📖 Usage

tsconfig.json

{
	"extends": "@ibg/config/react-library.tsconfig.json",
	"compilerOptions": {
		"outDir": "./dist",
		"rootDir": "./src",
		"declarationDir": "./dist/types",
	},
	"include": ["src"]
}

.eslintrc.js

/**
 * @type {import('eslint').Linter.Config}
 */
module.exports = {
	root: true,
	extends: [require.resolve('@ibg/config/eslint/react-internal'), 'plugin:storybook/recommended']
};

vitest.config.js

const { defineConfig, mergeConfig } = require('vitest/config');
const { nodeConfig } = require('@ibg/config/vite/node.config');

module.exports = mergeConfig(nodeConfig, defineConfig({}));

🙏 Contribution

Debugging ESLint Configuration

If you are encountering issues or unexpected behavior with ESLint, you can use the following command to output the final configuration.

npx eslint --print-config ./some/file/to/test/on.ts

🔴 Issues

TypeScript Configurations Location

TypeScript configurations are placed at the root to allow easy referencing from other packages in the monorepo using the extends field in tsconfig.json, like so:

{
	"extends": "@ibg/config/base.json"
}

Node: Extending nested configuration didn't work.

🌟 Credits

This configuration is based on the turbo-basic starter template and will be kept in sync with it as the Vercel team knows better than me what configurations settings are best for NextJs apps and co. Also tsconfig/bases was a source of inspiration.

Readme

Keywords

none

Package Sidebar

Install

npm i @ibg/config

Weekly Downloads

1

Version

0.0.14

License

MIT

Unpacked Size

31.4 kB

Total Files

17

Last publish

Collaborators

  • bennodev