# eslint-plugin-sustainable

> Keeping the climate impact of code low.

Latest version **1.1.4** (published 2023-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-sustainable
pnpm add eslint-plugin-sustainable
yarn add eslint-plugin-sustainable
bun add eslint-plugin-sustainable
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2023-12-18 |
| First published | 2023-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^14.17.0 \|\| ^16.0.0 \|\| >= 18.0.0 |
| Dependencies | 1 |
| Unpacked size | 19 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Anders Clark |
| Maintainers | andersclark |
| Keywords | eslint, eslintplugin, eslint-plugin, sustainability, sci |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-sustainable
- Repository: https://github.com/Andersclark/eslint-plugin-sustainable
- Homepage: https://github.com/Andersclark/eslint-plugin-sustainable#readme
- Issues: https://github.com/Andersclark/eslint-plugin-sustainable/issues
- npm.io page: https://npm.io/package/eslint-plugin-sustainable

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ^1.2.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

- 1.1.4 (latest) — 2023-12-18
- 1.1.3 — 2023-12-18
- 1.1.2 — 2023-12-01
- 1.1.1 — 2023-12-01
- 1.1.0 — 2023-12-01
- 0.0.0 — 2023-11-28

## README

# eslint-plugin-sustainable

## About this project

Keep the climate impact of code low!

The code, infrastructure and devices supporting the internet emits around the [same amount of Carbon Dioxide (CO2) as the global airline industry](https://theshiftproject.org/wp-content/uploads/2019/03/Executive-Summary_Lean-ICT-Report_EN_lowdef.pdf).

As authors of code, we can affect how applications affect climate change by making sure we avoid anti-patterns that unecessarily consume resources.

The goal of this project is to follow the development of the [W3C's Sustainability Guidelines](https://w3c.github.io/sustyweb).

You can read more about this topic on [The Green Web Foundation's website](https://www.thegreenwebfoundation.org).

## Installation

If your project is not currently using ESlint, you will first need to install it [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

Next, install `eslint-plugin-sustainable`:

```sh
npm install eslint-plugin-sustainable --save-dev
```

## Usage

Add `sustainable` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": ["sustainable"]
}
```

## Rules

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

| Name                                                                               | Description                                                             |
| :--------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |
| [avoid-inefficient-image](docs/rules/avoid-inefficient-image.md)                   | Avoid inefficient image formats                                         |
| [avoid-media-autoplay](docs/rules/avoid-media-autoplay.md)                         | Autplaying media loads data that may not be consumed by the user        |
| [avoid-using-accurate-geolocation](docs/rules/avoid-using-accurate-geolocation.md) | High accuracy geolocation consumes more power and returns result slower |

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

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