https://github.com/0x80/eslint-config
A collection of ESLint configurations
https://github.com/0x80/eslint-config
Last synced: about 1 month ago
JSON representation
A collection of ESLint configurations
- Host: GitHub
- URL: https://github.com/0x80/eslint-config
- Owner: 0x80
- License: mit
- Created: 2024-02-19T09:29:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-18T12:27:45.000Z (4 months ago)
- Last Synced: 2025-02-05T09:18:42.870Z (3 months ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESLint Config
A collection of minimal but opinionated ESLint configurations.
## Usage
`pnpm i @codecompose/eslint-config`
Create a file named `eslint.config.js` in the root of your package.
You are expected to point `parserConfig.project` to your tsconfig.json file. For example:
```js
// @ts-check
const { resolve } = require("node:path");
const project = resolve(__dirname, "tsconfig.json");/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@codecompose/eslint-config"],
parserOptions: {
project,
},
};
```## Available Configurations
By default `extends: ["@codecompose/eslint-config"]` will point to the base configuration and is effectively the same as writing `extends: ["@codecompose/eslint-config/base"]`. Other available configurations are:
- `node`: A Node.js application or library
- `react`: A React library
- `vercel-app`: A Next.js based React application using the Vercel style guide
- `vercel-lib`: A React library using the Vercel style guide