Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ridays2001/eslint-config-tulip
🌷 Sharable ESLint configuration.
https://github.com/ridays2001/eslint-config-tulip
clean-code eslint eslint-config eslint-shareable-config eslint-shareable-configs eslintconfig hacktoberfest lint linter
Last synced: 10 days ago
JSON representation
🌷 Sharable ESLint configuration.
- Host: GitHub
- URL: https://github.com/ridays2001/eslint-config-tulip
- Owner: ridays2001
- License: mit
- Created: 2020-08-18T03:04:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-01T07:25:09.000Z (almost 3 years ago)
- Last Synced: 2024-10-09T09:54:58.306Z (28 days ago)
- Topics: clean-code, eslint, eslint-config, eslint-shareable-config, eslint-shareable-configs, eslintconfig, hacktoberfest, lint, linter
- Language: JavaScript
- Homepage:
- Size: 95.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESLint Config Tulip
Sharable ESLint configuration.
This configuration is made for Node.js apps.
### Instructions:
1. [Install the package](#installation).
2. [Extend it in your eslint configuration](#usage).
3. Enjoy cleaner code!. 🎉
4. [Contribute!](#contribute)#### Installation
Make sure you are using Node.js v16.13.1 or higher.
Open command prompt (or terminal) in your project folder and use:```bash
npm i -D eslint eslint-config-tulip
```This will install the configuration module and you can now use it in your project.
Adding TypeScript
If you are using TypeScript, then you also need to install the plugin and parser for TypeScript:
```bash
npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser
```
### Usage
Once you have installed the configuration module, you need to tell eslint to use it.
You can do this by extending it in your config.
ESLint can be configured either in your `package.json` file or in a separate eslint config file.
For more instructions on configuring eslint, please refer to
[ESLint getting started guide ↗](https://eslint.org/docs/user-guide/getting-started).For `package.json`:
```json
{
"name": "your-project",
...
"eslintConfig": {
"extends": "tulip"
}
}
```For eslint configuration files (`.eslintrc`, `.eslintrc.json`, `.eslintrc.js`, or `.eslintrc.yml`):
```json
{
"extends": "tulip"
}
```You can also integrate eslint into your code editor.
Follow the instructions in the [editors section↗](https://eslint.org/docs/user-guide/integrations#editors) to set it up for your editor.Adding TypeScript
If you are using TypeScript, then you need to extend the typescript configuration.
```json
{
...
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": "tulip/typescript"
...
}
```
Using Prettier
If you wish to use prettier along with eslint, then you need to use the prettier module.
This will turn off certain eslint rules that interfere with prettier.```json
{
"extends": "tulip/prettier"
}
```Using Typescript? Don't worry, I've got you covered!
```json
{
"extends": "tulip/prettier-ts"
}
```
### Customizing
This ESLint configuration comes with the latest rules enabled according to my style guide.
But, you may want to tweak it depending upon your preferences. Here's an example:```json
{
"extends": "tulip",
"rules": {
"sort-keys": "off"
}
}
```The `sort-keys` rule requires you to sort your keys alphabetically.
This is helpful when you have too many keys in the object, but you may want to turn this rule off if you are following some other order.For more information, refer to the [Official ESLint Documentation↗](https://eslint.org/docs/user-guide/getting-started#configuration-1) or [a more detailed one here↗](https://eslint.org/docs/user-guide/configuring).\
Here's the [list of all Available ESLint rules↗](https://eslint.org/docs/rules/).### Contribute
1. Fork this repository.
2. Make your changes.
3. Push your changes to a new branch in your fork.
4. Submit a pull request!### Credits
License - MIT.
© [Riday ♡](https://github.com/ridays2001 'My GitHub Profile ↗').
Thank you to all those who helped me. 💙