ecocode-eslint-plugin 0.1.0
Install from the command line:
Learn more about npm packages
$ npm install @green-code-initiative/ecocode-eslint-plugin@0.1.0
Install via package.json:
"@green-code-initiative/ecocode-eslint-plugin": "0.1.0"
About this version
An ESLint plugin which provides JavaScript rules of the ecoCode project.
π See ecoCode-linter 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
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"
}
}
If you are already using ESLint results for your SonarQube analysis, there are no additional steps! Otherwise:
- Use "-f json" option of ESLint to export results in a JSON format.
example in a script:eslint . -f json -o report.json
- Add the path of the generated report to SonarQube property "sonar.eslint.reportPaths".
example in sonar-project.properties:sonar.eslint.reportPaths=report.json
Check SonarQube documentation to have more information about the integration.
β
Set in the recommended
configuration.
Name | Description | |
---|---|---|
no-multiple-access-dom-element | Disallow multiple access of same DOM element. | β |
You can follow changelog on GitHub Releases page.
Details
- ecocode-eslint-plugin
- green-code-initiative
- almost 2 years ago
- GPL-3.0
- 12 dependencies
Assets
- ecocode-eslint-plugin-0.1.0.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0