Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaciras/eslint-config-kaciras
Kaciras JavaScript style.
https://github.com/kaciras/eslint-config-kaciras
eslint eslint-config
Last synced: 5 days ago
JSON representation
Kaciras JavaScript style.
- Host: GitHub
- URL: https://github.com/kaciras/eslint-config-kaciras
- Owner: Kaciras
- License: mit
- Created: 2021-03-23T11:55:36.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T09:48:04.000Z (about 1 month ago)
- Last Synced: 2025-01-01T19:38:00.078Z (5 days ago)
- Topics: eslint, eslint-config
- Language: JavaScript
- Homepage:
- Size: 783 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-kaciras
[![Test](https://github.com/Kaciras/eslint-config-kaciras/actions/workflows/test.yml/badge.svg)](https://github.com/Kaciras/eslint-config-kaciras/actions/workflows/test.yml)
Kaciras JavaScript style.
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
pnpm add eslint
```Next, install config packages:
```
npm i -D @kaciras/eslint-config-core// If the project uses typescript
npm i -D @kaciras/eslint-config-typescript// If the project uses react
npm i -D @kaciras/eslint-config-react// If the project uses Jest
npm i -D @kaciras/eslint-config-jest// If the project uses Vue
npm i -D @kaciras/eslint-config-vue
```## Usage
All packages are ESM and export flat configs, they cannot be used for legacy project.
```javascript
import core from "@kaciras/eslint-config-core";
import typescript from "@kaciras/eslint-config-typescript";
import jest from "@kaciras/eslint-config-jest";
import react from "@kaciras/eslint-config-react";
import vueTs from "@kaciras/eslint-config-vue/typescript.js";export default [
...core,
...typescript, // for TS project
...vueTs, // for Vue & Typescript// for project uses Jest
...jest.map(config => ({ ...config, files: [""]})),// for React project
...react.map(config => ({ ...config, files: ["**/*.[jt]sx"]})),
{
rules: {
"kaciras/import-group-sort": "warn",
},
},
];
```