# @greenpoint/eslint-plugin

> Best practices for ecocoding

Latest version **0.3.5** (published 2023-08-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @greenpoint/eslint-plugin
pnpm add @greenpoint/eslint-plugin
yarn add @greenpoint/eslint-plugin
bun add @greenpoint/eslint-plugin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2023-08-17 |
| First published | 2023-07-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^14.17.0 \|\| ^16.0.0 \|\| >= 18.0.0 |
| Dependencies | 12 |
| Unpacked size | 189.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Laetitia |
| Maintainers | rgall, laetitiab |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/@greenpoint/eslint-plugin
- npm.io page: https://npm.io/package/@greenpoint/eslint-plugin

## Dependencies (12)

- [mocha](https://npm.io/package/mocha.md) ^10.0.0
- [eslint](https://npm.io/package/eslint.md) ^8.41.0
- [npm-run-all](https://npm.io/package/npm-run-all.md) ^4.1.5
- [requireindex](https://npm.io/package/requireindex.md) ^1.2.0
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^11.1.0
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.32.2
- [eslint-doc-generator](https://npm.io/package/eslint-doc-generator.md) ^1.4.3
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.7.1
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^4.2.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^6.1.0
- [eslint-plugin-eslint-plugin](https://npm.io/package/eslint-plugin-eslint-plugin.md) ^5.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^6.1.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.3.5 (latest) — 2023-08-17
- 0.3.4 — 2023-08-17
- 0.3.3 — 2023-08-16
- 0.3.2 — 2023-08-08
- 0.3.1 — 2023-08-07
- 0.3.0 — 2023-08-04
- 0.2.9 — 2023-08-04
- 0.2.8 — 2023-07-26
- 0.2.7 — 2023-07-24
- 0.2.6 — 2023-07-24
- 0.2.5 — 2023-07-24
- 0.2.4 — 2023-07-21
- 0.2.3 — 2023-07-21
- 0.2.2 — 2023-07-21
- 0.2.1 — 2023-07-21
- … 2 more at https://npm.io/package/@greenpoint/eslint-plugin/versions

## README

# @greenpoint/eslint-plugin

Best practices for ecocoding

## Installation

First run :

```sh
npm install @greenpoint/eslint-plugin --save-dev
```

Add the plugin to your `.eslintrc.js`:

```json

    "extends": [
        "plugin:@greenpoint/front-recommended",
        "plugin:@greenpoint/back-recommended",


    ],
    "plugins": [
        "@greenpoint",

    ]

```

If you have tailwindcss in your code as well add the following plugin:

```json

    "plugins": [
        "plugin:@greenpoint/tailwindcss"

    ],

```

If you use @emotion in your code as well add the following plugin:

```json

    "plugins": [
        "plugin:@greenpoint/emotion"

    ],

```

## Usage

Run the eslint-linter on your .js/.tsx files

```sh
eslint .

```

## Rules

<!-- begin auto-generated rules list -->

⚠️ Configurations set to warn in.\
🎨 Set in the `front-recommended` configuration.
🛠️ Set in the `back-recommended` configuration.
🙂 Set in the `emotion` configuration.
🚀 Set in the `tailwindcss` configuration.
| Name                                | Description | ⚠️ |
| :--------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-- |
| [image-extension](docs/rules/image-extension.md) | Avoid the usage of png/jpg/jpeg images | 🎨 |
| [image-src-attribute-not-empty](docs/rules/image-src-attribute-not-empty.md) | Disallow usage of image with empty source attribute | 🎨 |
| [limit-db-query-results](docs/rules/limit-db-query-results.md) | Warn about not limiting the number of returns for a query | 🛠️ |
| [limit-repaint-and-reflow](docs/rules/limit-repaint-and-reflow.md) | Avoid re-rendering your components as much as possible when a props and state element changes and this data has no impact on the component's view | 🎨 |
| [avoid-css-animations](docs/rules/avoid-css-animations.md) | Avoid usage of CSS animations | 🎨 🚀 🙂 |
| [no-function-call-in-for-declaration](docs/rules/no-function-call-in-for-declaration.md) | Avoid calling a function in a for loop declaration | 🛠️ |
| [no-missing-print-css](docs/rules/no-missing-print-css.md) | Warn when no print CSS is provided | 🎨 |
| [no-resized-image](docs/rules/no-resized-image.md) | Disallow image size exceeding the maximum allowed dimension | 🎨 🚀 🙂 |
| [no-select-star](docs/rules/no-select-star.md) | Warn about the use of SELECT \* FROM queries | 🛠️ |
| [only-standard-font-use](docs/rules/only-standard-font-use.md) | Disallow the usage of non-standard fonts | 🎨 🚀 🙂 |
| [outsource-css](docs/rules/outsource-css.md) | Ensure that CSS and JavaScript codes are not embedded in the HTML code of the page, with the exception of any configuration variables for JavaScript objects. | 🎨 |
| [group-similar-css-declarations](docs/rules/group-similar-css-declarations.md) | Group similar declarations of properties | 🙂 |
| [prefer-shorthand-css-notations-animation](docs/rules/prefer-shorthand-css-notations-animation.md) | Encourage the use of shorthand CSS notations, especially for the following attributes: animation, transition, offset | 🎨 🚀 🙂 |
| [prefer-shorthand-css-notations-content](docs/rules/prefer-shorthand-css-notations-content.md) |This rule aims to encourage the use of shorthand CSS notations, especially for the following attributes: outline, border, background and listStyle | 🎨 🚀 🙂 |
| [prefer-shorthand-css-notations-layout](docs/rules/prefer-shorthand-css-notations-layout.md) | Encourage the use of shorthand CSS notations, especially for the following attributes: column, flex, grid, columnRule, placeContent, placeItems, placeSelf | 🎨 🚀 🙂 |
| [prefer-shorthand-css-notations-margin-padding](docs/rules/prefer-shorthand-css-notations-margin-padding.md) | Encourage the use of shorthand CSS notations, especially for the following attributes: margin, padding | 🎨 🚀 🙂 |
| [prefer-shorthand-css-notations-text](docs/rules/prefer-shorthand-css-notations-text.md) | Encourage the use of shorthand CSS notations, especially for the following attributes: font, textDecoration | 🎨 🚀 🙂 |

## Further reading
We developed a stylelint plugin for best practices in CSS as well:

https://gitlab.groupeonepoint.com/techstud.io/num-responsable/greenpoint-stylelint.git

---
_Source: https://npm.io/package/@greenpoint/eslint-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
