ecocode-eslint-plugin 1.5.0
Install from the command line:
Learn more about npm packages
$ npm install @green-code-initiative/ecocode-eslint-plugin@1.5.0
Install via package.json:
"@green-code-initiative/ecocode-eslint-plugin": "1.5.0"
About this version
An ESLint plugin which provides JavaScript and TypeScript rules of the ecoCode project.
π See ecoCode-javascript README to have more information.
β οΈ This plugin is in a very early stage and need improvements. Any contribution will be appreciated.
You'll need to install ESLint (v7 or newer) and this plugin:
# yarn
yarn add -D eslint @ecocode/eslint-plugin
# npm
npm install -D eslint @ecocode/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.
The plugin is also available from GitHub npm registry under "green-code-initiative" scope:
# yarn
yarn add -D eslint @green-code-initiative/ecocode-eslint-plugin
# npm
npm install -D eslint @green-code-initiative/ecocode-eslint-plugin
Add @ecocode
recommended configuration to extends
section of your .eslintrc
:
{
"extends": ["plugin:@ecocode/recommended"]
}
Add @ecocode
to the plugins
section of your .eslintrc
, followed by rules configuration:
{
"plugins": ["@ecocode"],
"rules": {
"@ecocode/no-multiple-access-dom-element": "error"
}
}
β
Set in the recommended
configuration.
Name | Description | |
---|---|---|
avoid-css-animations | Avoid usage of CSS animations | β |
avoid-high-accuracy-geolocation | Avoid using high accuracy geolocation in web applications. | β |
limit-db-query-results | Should limit the number of returns for a SQL query | β |
no-empty-image-src-attribute | Disallow usage of image with empty source attribute | β |
no-import-all-from-library | Should not import all from library | β |
no-multiple-access-dom-element | Disallow multiple access of same DOM element. | β |
no-multiple-style-changes | Disallow multiple style changes at once. | β |
prefer-collections-with-pagination | Prefer API collections with pagination. | β |
prefer-shorthand-css-notations | Encourage usage of shorthand CSS notations | β |
provide-print-css | Enforce providing a print stylesheet | β |
You can follow changelog on GitHub Releases page.
Details
- ecocode-eslint-plugin
- green-code-initiative
- 10 months ago
- GPL-3.0
- 16 dependencies
Assets
- ecocode-eslint-plugin-1.5.0.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0