<!--
MIT License

Copyright (c) 2021 Bootcamp-Project contributors <contributors@bootcamp-project.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<a href="https://bootcamp-project.com/" target="_blank"><img src="https://bootcamp-project.com/tbcp.svg" align="right" height="200" /></a>

# Ready-to-use ESLint Configuration

## with best practice settings by default

<img src="https://img.shields.io/npm/v/@bootcamp-project/eslint-config?style=for-the-badge">
<img src="https://img.shields.io/npm/types/@bootcamp-project/eslint-config?style=for-the-badge">
<img src="https://img.shields.io/librariesio/release/npm/@bootcamp-project/eslint-config?style=for-the-badge">
<img src="https://img.shields.io/gitlab/pipeline-status/the-bootcamp-project/configurations/eslint?branch=main&style=for-the-badge">
<img src="https://img.shields.io/npm/dm/@bootcamp-project/eslint-config?style=for-the-badge">
<img src="https://img.shields.io/badge/License-MIT-lightgrey?style=for-the-badge" />
<img src="https://img.shields.io/badge/Bootcamp-Project-blue?style=for-the-badge" />

## 🦄 About 🦄

> ESLint is a static code analysis tool that we use to analyze our Node.js / JavaScript, TypeScript and Svelte repositories. With this package we offer all our best practice settings.

**Project Links**

- [Homepage][Repo_Homepage]
- [Repository][Repo_URL]
- [Documentation][Repo_Docs]
- [Issues][Repo_Issues]

**Minimum Viable Product**: *What is what we want?*

- **What are the goals?**
  - [X] Offer a single package with all the necessary dependencies and the safest possible linting settings.
- **Sense** *(Why do these goals exist?)*
  - [X] To provide easy management of the linting settings for various repositories
- **Purpose** *(What should be done with it?)*
  - [X] There should be a central code base for linting settings

## 🚀 Getting Started 🚀

### 💪 Installation 💪

```bash
yarn add --dev eslint @bootcamp-project/eslint-config
```

### 🤩 Usage 🤩

> See [TBCP ESLint settings][Repo_Config]

```js
// .eslintrc.js
'use strict';

const ESLintConfig = require('@bootcamp-project/eslint-config').ESLintConfig
module.exports = ESLintConfig
```

**...with security-first**

```js
// .eslintrc.js
'use strict';

const ESLintSecurity = require('@bootcamp-project/eslint-config').ESLintSecurity
module.exports = ESLintSecurity
```

**and, if you want more...**

```js
// .eslintrc.js
'use strict';

const ESLintSecurity = require('@bootcamp-project/eslint-config').ESLintSecurity
module.exports = {
  ...ESLintSecurity,  // Takes the TBCP base settings
  // ...
  // Place to specify ESLint settings. Can be used to overwrite rules specified from the extended configs
  // ...
  rules: {
    // e.g. "no-secrets/no-secrets": "error",
		'no-secrets/no-secrets': 'error',
		'pii/no-email': 'error',
		'pii/no-dob': 'warn',
		'pii/no-ip': 'error',
		'pii/no-phone-number': 'error'
  }
}
```

## ⭐️ Features ⭐️

- Latest preinstalled **Dependencies** by default
- Standard compatibility with JavaScript and TypeScript
- [**Security-first production ready configuration**][TBCP_Configurations] by default
- [Extensive configuration **documentation**][Repo_Docs]

### 😎 Built With 😎

<table>
<tr>
<td><a href="https://eslint.org/" target="_blank"><img src="https://cdr.rtfm.page/logos/programming/eslint.svg" alt="eslint" width="200"/></a></td>
<td><a href="https://developer.mozilla.org/" target="_blank"><img src="https://cdr.bootcamp-project.com/logos/programming/javascript.svg" alt="JavaScript" width="200"/></a></td>
<td><a href="https://bootcamp-project.com/" target="_blank"><img src="https://bootcamp-project.com/tbcp.svg" alt="tbcp" width="200"/></a></td>
</tr>
</table>

### 🏆 Acknowledgements 🏆

Thanks for these awesome resources that were used during the development of the **Bootcamp: ESLint Configuration**:

- [ESLint](https://eslint.org/)
- [prettier/eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
- [nodesecurity/eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security)
- [mozilla/eslint-plugin-no-unsanitized](https://github.com/mozilla/eslint-plugin-no-unsanitized)
- [nickdeis/eslint-plugin-no-secrets](https://github.com/nickdeis/eslint-plugin-no-secrets)
- [shiva-hack/eslint-plugin-pii](https://github.com/shiva-hack/eslint-plugin-pii)
- [RTFM.page: ESLint](https://dev.rtfm.page/#/working_with/javascript/eslint)

## 📑 Changelog 📑

See [CHANGELOG](CHANGELOG) for more information.

## 📋 Roadmap 📋

See the [open issues][Repo_Issues] for a list of proposed features (and known issues).

## 🤝 Contribute 🤝

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

Please read the [contribution guidelines][TBCP_Contribution] first.

0. [Give us a star][Repo_Stars], it's really important! 😅
1. Fork the Project: (`git clone https://gitlab.com/the-bootcamp-project/configurations/eslint.git`)
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## 📜 License 📜

See [LICENSE](LICENSE) for more information.

## 💌 Contact 💌

[Bootcamp contributors][TBCP_Homepage] - `contributors` @ `bootcamp-project` .com

<!-- ---------------------------------------------------------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------------------------------------------------------- -->

[Repo_Homepage]: https://configurations.bootcamp-project.com/#/code_analysis/eslint
[Repo_URL]: https://gitlab.com/the-bootcamp-project/configurations/eslint
[Repo_Docs]: https://configurations.bootcamp-project.com/#/code_analysis/eslint
[Repo_Config]: https://configurations.bootcamp-project.com/#/code_analysis/eslint_config
[Repo_Issues]: https://gitlab.com/the-bootcamp-project/configurations/eslint/-/issues
[Repo_Forks]: https://gitlab.com/the-bootcamp-project/configurations/eslint/-/forks
[Repo_Stars]: https://gitlab.com/the-bootcamp-project/configurations/eslint/-/starrers
[TBCP_Configurations]: https://configurations.bootcamp-project.com
[TBCP_Contribution]: https://bootcamp-project.com/#code_of_conduct
[TBCP_Homepage]: https://bootcamp-project.com
