Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fourjuaneight/eslint-config-jcv
⚙️ Unnecessary ESLint and Prettier setup.
https://github.com/fourjuaneight/eslint-config-jcv
eslint react
Last synced: about 1 month ago
JSON representation
⚙️ Unnecessary ESLint and Prettier setup.
- Host: GitHub
- URL: https://github.com/fourjuaneight/eslint-config-jcv
- Owner: fourjuaneight
- License: mit
- Created: 2019-12-16T03:42:35.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-20T02:41:20.000Z (3 months ago)
- Last Synced: 2024-11-08T08:09:16.718Z (about 2 months ago)
- Topics: eslint, react
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-config-jcv
- Size: 94.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Unnecessary ESLint and Prettier setup
[![npm version](https://img.shields.io/npm/v/eslint-config-jcv)](https://www.npmjs.com/package/eslint-plugin-jcv)
![badge](https://action-badges.now.sh/fourjuaneight/eslint-config-jcv)Personally unnecessary config for ESLint and Prettier. I guess you can use it too, though there's hardly anything in it.
## What it does
* Lints JavaScript based on the latest standards
* Fixes issues and formatting errors with Prettier
* Lints + Fixes inside of HTML script tags
* Lints + Fixes React via eslint-config-airbnbPlease don't just install some rando's configuration for a potential code-breaking tool. Look at what I'm using and determine which rules work best for you.
## Installing
We're reasonable people, so let's install this locally.1. If you don't already have a `package.json` file, create one with `npm init`.
2. Install the config's dependencies:
```
npx install-peerdeps --dev eslint-config-jcv
```3. Create a `.eslintrc.js` file in the root of your project's directory (it should live where package.json does). Your `.eslintrc.js` file should look like this:
```json
{
"extends": [
"jcv"
]
}
```For React projects:
```json
{
"extends": [
"jcv"
"jcv/react"
]
}
```Alternatively, you can put this object in your `package.json` under the property `"eslintConfig"`.
4. You can add two scripts to your package.json to lint and/or fix:
```json
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
```5. Now you can manually lint your code by running `npm run lint` and fix all fixable issues with `npm run lint:fix`. You probably want your editor to do this though.
_Setup and instructions "inspired" by [Wes Bos' No-Sweat™ config](https://github.com/wesbos/eslint-config-wesbos/)._