Skip to content

Commit

Permalink
refactor: updated Readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Nov 26, 2024
1 parent 31a86b1 commit 3ebcbb1
Showing 1 changed file with 66 additions and 1 deletion.
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# rg-frontend-linters
# RG Frontend Linters

**RG Frontend Linters** provides standardized configurations for **ESLint**, **Stylelint**, and **CommitLint**.
This ensures consistent code quality, style, and commit message conventions across all projects.

## Configurations

- **ESLint**: Enforce consistent JavaScript code style and quality.
- **Stylelint**: Maintain uniform SCSS formatting and conventions.
- **CommitLint**: Validate commit messages against defined standards.

---

## Installation and Usage

### 1. Add the repository to `package.json`:

Include `rg-frontend-linters` as a dependency:

```json
"dependencies": {
"rg-frontend-linters": "git+https://github.com/raccoongang/rg-frontend-linters.git#main"
}
```

Install the dependency:

```bash
npm install
```

### 2. Create a configuration file

Add a configuration file for the desired linter in the root of your project. For example, to configure Stylelint:

```bash
touch .stylelintrc.js
```

### 3. Initialize the configuration

Use the provided helper function to set up the linter configuration. For example:

Stylelint (`.stylelintrc.js`):

```javascript
const { createConfig } = require('rg-frontend-linters');

module.exports = createConfig('stylelint');
```

ESLint (`.eslintrc.js`):

```javascript
const { createConfig } = require('rg-frontend-linters');

module.exports = createConfig('eslint');
```

CommitLint (`commitlint.config.js`):

```javascript
const { createConfig } = require('rg-frontend-linters');

module.exports = createConfig('commitlint');
```

0 comments on commit 3ebcbb1

Please sign in to comment.