Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nuremx/styles
Custom and modern set of rules for eslint and prettier
https://github.com/nuremx/styles
Last synced: 3 days ago
JSON representation
Custom and modern set of rules for eslint and prettier
- Host: GitHub
- URL: https://github.com/nuremx/styles
- Owner: nuremx
- Created: 2019-11-06T18:00:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T09:11:15.000Z (almost 2 years ago)
- Last Synced: 2024-04-27T08:21:08.283Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 484 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nure Styles
Set of modern JS for React and React Native formatting guides, using [**ESLint**](https://eslint.org/) and [**Prettier**](https://prettier.io/).
## Installing
Install packages
```bash
npm install --dev prettier-config-nure eslint-config nure lint-staged husky
```Create a `.eslintrc.json` file with the following contents
```json
{
"extends": ["eslint-config-nure"]
}
```Next create a `.prettierrc.js` file with the following contents
```js
module.exports = {
...require("prettier-config-nure")
};
```And finally add the following lines to your `package.json` file, if you want to ensure no rules are being ignored using [lint-staged](https://github.com/okonet/lint-staged) (optional).
```json
"name": "My project",
"version": "0.1.0",
"scripts": {
...
},
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "*.{js,jsx}": "eslint --fix",
+ "*.{js,jsx,ts,tsx,md,html,css}": "prettier --write"
+ }
```## Packages
### `eslint-config-nure`
![npm](https://img.shields.io/npm/v/eslint-config-nure)
This package includes a ESLint configuration that extends `eslint-config-react-app` and adds some extra rules
### `prettier-config-nure`
![npm](https://img.shields.io/npm/v/prettier-config-nure)
Prettier configuration compatible with `eslint-config-nure`
## License
MIT