2.1.0 • Published 7 months ago

@creedengo/eslint-plugin v2.1.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
7 months ago

Creedengo-JS

An ESLint plugin which provides JavaScript and TypeScript rules of the Creedengo project.

šŸ‘‰ See creedengo-javascript README to have more information.

šŸš€ Getting started

Installation

You'll need to install ESLint (v7 or v8) and this plugin:

# yarn
yarn add -D eslint @creedengo/eslint-plugin
# npm
npm install -D eslint @creedengo/eslint-plugin

You are using TypeScript? You will also need to install typescript-eslint to enable our rules.\ Follow this official guide to install it in a few steps.

Are you working with a GitHub Packages registry?

The plugin is also available from GitHub npm registry under "green-code-initiative" scope:

# yarn
yarn add -D eslint @green-code-initiative/creedengo-eslint-plugin
# npm
npm install -D eslint @green-code-initiative/creedengo-eslint-plugin

Enable whole plugin

Add @creedengo recommended configuration to extends section of your .eslintrc:

{
  "extends": ["plugin:@creedengo/recommended"],
}

Enable only some rules

Add @creedengo to the plugins section of your .eslintrc, followed by rules configuration:

{
  "plugins": ["@creedengo"],
  "rules": {
    "@creedengo/no-multiple-access-dom-element": "error",
  },
}

āš™ Configs

Name
āœ…recommended

šŸ”Ø Rules

āš ļø Configurations set to warn in.\ āœ… Set in the recommended configuration.

NameDescriptionāš ļø
avoid-autoplayAvoid autoplay for videos and audio contentāœ…
avoid-brightness-overrideShould avoid to override brightnessāœ…
avoid-css-animationsAvoid usage of CSS animationsāœ…
avoid-high-accuracy-geolocationAvoid using high accuracy geolocation in web applicationsāœ…
avoid-keep-awakeAvoid screen keep awakeāœ…
limit-db-query-resultsShould limit the number of returns for a SQL queryāœ…
no-empty-image-src-attributeDisallow usage of image with empty source attributeāœ…
no-import-all-from-libraryShould not import all from libraryāœ…
no-multiple-access-dom-elementDisallow multiple access of same DOM elementāœ…
no-multiple-style-changesDisallow multiple style changes at onceāœ…
no-torchShould not programmatically enable torch modeāœ…
prefer-collections-with-paginationPrefer API collections with paginationāœ…
prefer-lighter-formats-for-image-filesPrefer lighter formats for image filesāœ…
prefer-shorthand-css-notationsEncourage usage of shorthand CSS notationsāœ…
provide-print-cssEnforce providing a print stylesheetāœ…

šŸ›’ Distribution

You can follow changelog on GitHub Releases page.

2.1.0

7 months ago

2.0.0

10 months ago