This repository contains shared configurations for ESLint and Prettier to make it easier to share configs between projects targetted at modern ESM Node.JS/React apps.
The repository is structured into two packages, each serving a different project type:
This package provides ESLint and Prettier configurations tailored for ESM Node.js applications that do not use React.
- ESLint configuration for Node.js environments.
- Prettier setup for code formatting.
pnpm add -D @ktam/lint-node
To use the ESLint configuration, create an eslint.config.js
in the root of your project and import the configuration:
export { default } from '@ktam/lint-node/eslint';
You can adjust or extend the configuration if needed by modifying the imported rules.
To apply the Prettier configuration, create a prettier.config.js
file in the root of your project and import the configuration:
export { default } from '@ktam/lint-node/prettier';
This package provides ESLint and Prettier configurations specifically for React and Astro applications, extending the base Node.js configuration with React-specific rules and practices.
- ESLint rules for React, JSX, and modern JavaScript/TypeScript.
- Integration with popular React linting plugins.
- Prettier setup that works with React and JSX.
- Astro support.
pnpm add -D @ktam/lint-react
To use the ESLint configuration, create an eslint.config.js
in the root of your project and import the configuration:
export { default } from '@ktam/lint-react/eslint';
You can adjust or extend the configuration if needed by modifying the imported rules.
To apply the Prettier configuration, create a prettier.config.js
file in the root of your project and import the configuration:
export { default } from '@ktam/lint-react/prettier';
Feel free to contribute by opening issues or submitting pull requests! Though note that it's a personal config so I may have differeing opinions.
This project is licensed under the MIT License.