ec0lint - a static code analysis tool

Overview

npm version

ec0lint

Website | Configuring | Rules | Contributing |

ec0lint is a static code analysis tool that provides the users with useful hints on how to reduce the digital footprint of their webpages during the development process. Applying code changes suggested by ec0lint will make result with webpages that emit less carbon per visit, load quicker and are more space- efficient. The tool is open-source and community-driven.

Our goal

An average webpage with 10 000 views monthly emits 4.6 g CO2 with every view. It sums up to 553 kg annually. Thanks to following good practices such as Sustainable Web Design and code optimization the emissions may be reduced from 4.6 g to 0.2 g emitting only 24 kg CO2 annually. It means that 529 kg (96%!) CO2 could be saved, which is as much as charging 65 000 smartphones.

ec0lint is a tool that can help with that. By static code analysis, it provides improvements to the code and highlights the impact it will have on carbon emissions, loading speed and size. Those improvements can range from decreasing the size and number of images, videos or animations, including a lighter library or an open-source library, changing the font type, font size or background colors.

The tool is customized and each rule applied during the analysis can be adjusted, or treated as hints rather than errors. This flexibility allows the developers to reach their goals without interruptions from ec0lint, at the same time drawing attention to possible improvements.

Thank you!

We are open to collaboration on improving ec0lint, and we are very grateful for all contributions and feedback on the tool. Thank you for helping us make the web greener!

Comments
  • New Rule: video format validation

    New Rule: video format validation

    Rule details

    validate if video formats used in code are the lightest ones

    Related ECMAScript feature

    No response

    What type of rule is this?

    JavaScript/TypeScript code

    Which codebase the rule should be implemented?

    ec0lint

    Participation

    • [ ] I am willing to submit a pull request to implement this rule.

    Additional comments

    No response

    enhancement work in progress 
    opened by malwinq 4
  • Change Request: landing page docs update

    Change Request: landing page docs update

    ec0lint version

    What problem do you want to solve?

    change of ec0lint-css library name to ec0lint-style

    What do you think is the correct solution?

    update all ec0lint-css occurencies to ec0lint-style

    Participation

    • [x] I am willing to submit a pull request for this change.

    Additional comments

    No response

    documentation enhancement Stale work in progress 
    opened by malwinq 3
  • New Rule: fonts source validation

    New Rule: fonts source validation

    Rule details

    checking if the fonts are built-in or imported from external sources

    Related ECMAScript feature

    No response

    What type of rule is this?

    Style

    Which codebase the rule should be implemented?

    ec0lint-style

    Participation

    • [ ] I am willing to submit a pull request to implement this rule.

    Additional comments

    No response

    enhancement Stale 
    opened by malwinq 3
  • New Rule: CO2 module for ec0lint

    New Rule: CO2 module for ec0lint

    Rule details

    module which will calculate the size of page after each compile

    Related ECMAScript feature

    No response

    What type of rule is this?

    JavaScript/TypeScript code

    Which codebase the rule should be implemented?

    adding information about an exact change in MB and g of CO2 to each change log

    Participation

    • [ ] I am willing to submit a pull request to implement this rule.

    Additional comments

    No response

    enhancement work in progress 
    opened by malwinq 2
  • Change Request: add more details to each initiative in landing page

    Change Request: add more details to each initiative in landing page

    ec0lint version

    v1.0.0

    What problem do you want to solve?

    add details about each initiative

    What do you think is the correct solution?

    clickable initiatives - modals showing details

    Participation

    • [ ] I am willing to submit a pull request for this change.

    Additional comments

    No response

    documentation enhancement work in progress 
    opened by malwinq 2
  • Change Request: fix main checks

    Change Request: fix main checks

    ec0lint version

    v1.0.0

    What problem do you want to solve?

    main tests started failing without any new change introduced

    What do you think is the correct solution?

    compare to eslint

    Participation

    • [ ] I am willing to submit a pull request for this change.

    Additional comments

    No response

    bug work in progress 
    opened by malwinq 2
  • New Rule: image format validation

    New Rule: image format validation

    Rule details

    accordingly to lighter-image-file of ec0lint-style

    Related ECMAScript feature

    No response

    What type of rule is this?

    JavaScript/TypeScript code

    Which codebase the rule should be implemented?

    base ec0lint

    banning all formats except for WebP, SVG, JPG/JPEG, GIF, suggesting WebP and SVG

    Participation

    • [ ] I am willing to submit a pull request to implement this rule.

    Additional comments

    No response

    enhancement work in progress 
    opened by malwinq 2
  • Update lighter-image-files

    Update lighter-image-files

    Pull Request purpose

    [x] Documentation update [ ] Bug fix [ ] New rule [ ] Updates an existing rule [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [ ] Update task status in release plan (README) [ ] Docs added (/docs/rules/<rule_name>) [ ] Docs ready to be added to website (ec0lint.com)

    Overview of changes

    Would you like to add anything more?

    opened by martinabab 1
  • fix: remove validating licenses from ci

    fix: remove validating licenses from ci

    Pull Request purpose

    [ ] Documentation update [ ] Bug fix [ ] New rule [ ] Updates an existing rule [ ] Add autofix to a rule [ ] Add a CLI option [ ] Add something to the core [X] Other, please explain: Removed verify licenses from ci and fix pre-commit

    Checklist

    [ ] Update CHANGELOG.md [ ] (if rule) Docs added (/docs/rules/<rule_name>)

    Overview of changes

    Would you like to add anything more?

    opened by nemmip 1
  • feat: test

    feat: test

    Pull Request purpose

    [ ] Documentation update [ ] Bug fix [ ] New rule [ ] Updates an existing rule [ ] Add autofix to a rule [ ] Add a CLI option [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [ ] (if rule) Docs added (/docs/rules/<rule_name>)

    Overview of changes

    Would you like to add anything more?

    Stale 
    opened by nemmip 1
  • Remove other rules

    Remove other rules

    Pull Request purpose

    [ ] Documentation update [ ] Bug fix [ ] New rule [ ] Updates an existing rule [ ] Add autofix to a rule [ ] Add a CLI option [ ] Add something to the core [X] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [ ] (if rule) Docs added (/docs/rules/<rule_name>)

    Overview of changes

    Would you like to add anything more?

    opened by nemmip 1
  •  change url in docs

    change url in docs

    Pull Request purpose

    [ ] Documentation update [X ] Bug fix [ ] New rule [ ] Updates an existing rule [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [ ] Update task status in release plan (README) [ ] Docs added (/docs/rules/<rule_name>) [ ] Docs ready to be added to website (ec0lint.com)

    Overview of changes

    Would you like to add anything more?

    opened by Ola2808-Boro 0
  • feat: add no-bind rule

    feat: add no-bind rule

    Pull Request purpose

    [ ] Documentation update [ ] Bug fix [X] New rule [ ] Updates an existing rule [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [X] Update task status in release plan (README) [ ] Docs added (/docs/rules/<rule_name>) [ ] Docs ready to be added to website (ec0lint.com)

    Overview of changes

    Would you like to add anything more?

    opened by nemmip 0
  • feat: add no-attr rule

    feat: add no-attr rule

    Pull Request purpose

    [ ] Documentation update [ ] Bug fix [X] New rule [ ] Updates an existing rule [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [ ] Update task status in release plan (README) [ ] Docs added (/docs/rules/<rule_name>) [ ] Docs ready to be added to website (ec0lint.com)

    Overview of changes

    Would you like to add anything more?

    opened by nemmip 0
  • feat: add no-animate rule

    feat: add no-animate rule

    Pull Request purpose

    [ ] Documentation update [ ] Bug fix [X] New rule [X] Updates an existing rule [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [X] Update CHANGELOG.md [ ] Update task status in release plan (README) [ ] Docs added (/docs/rules/<rule_name>) [ ] Docs ready to be added to website (ec0lint.com)

    Overview of changes

    Would you like to add anything more?

    opened by nemmip 0
  • Jquery docs 1

    Jquery docs 1

    Pull Request purpose

    [X] Documentation update [ ] Bug fix [ ] New rule [ ] Updates an existing rule [ ] Add something to the core [ ] Other, please explain:

    Checklist

    [ ] Update CHANGELOG.md [ ] Update task status in release plan (README) [ ] Docs added (/docs/rules/<rule_name>) [ ] Docs ready to be added to website (ec0lint.com)

    Overview of changes

    Would you like to add anything more?

    opened by nemmip 1
  • Change Request: implement Angular plugin

    Change Request: implement Angular plugin

    ec0lint version

    v1.0.0

    What problem do you want to solve?

    Create Angular plugin with all rules implemented (if needed)

    What do you think is the correct solution?

    New project

    Participation

    • [ ] I am willing to submit a pull request for this change.

    Additional comments

    No response

    enhancement 
    opened by malwinq 1
Owner
ec0lint
ec0lint
Code examples for my TypeScript Static Analysis Hidden Gems talk. 💎

TypeScript Static Analysis Hidden Gems Code Code samples for the talk, formed from my template-typescript-node-package. ✨ ?? Slides available here! ??

Josh Goldberg 4 Nov 2, 2022
A Cli that handles the creation of a basic express App that supports Husky configuration & static analysis tools

@phazero/create-express-app · Create express app is a CLI that can generate boiler plate code for setting up an express app. Installation & Usage npx

PhazeRo 13 Oct 29, 2022
Gofiber with NextJS Static HTML is a small Go program to showcase for bundling a static HTML export of a Next.js app

Gofiber and NextJS Static HTML Gofiber with NextJS Static HTML is a small Go program to showcase for bundling a static HTML export of a Next.js app. R

Mai 1 Jan 22, 2022
A quick and easy to use security reconnaissance webapp tool, does OSINT, analysis and red-teaming in both passive and active mode. Written in nodeJS and Electron.

ᵔᴥᵔ RedJoust A quick and easy to use security reconnaissance webapp tool, does OSINT, analysis and red-teaming in both passive and active mode. Writte

Dave 17 Oct 31, 2022
React Gatsby static web tool for generative artists working on token based NFT artwork (ex: Artblocks)

token-art-tools React Gatsby static web tool for generative artists working on token/hash based NFT artwork (ex: Artblocks) https://ctrlshiftmake.gith

Owen Moore 71 Dec 15, 2022
An opinionated tool to create beautiful, lightweight, static HTML/CSS practice quizzes

Taoquiz An opinionated tool to create beautiful, lightweight, static HTML/CSS practice quizzes "Perfection is achieved, not when there is nothing more

null 8 Mar 28, 2022
A github action that provides detailed bundle analysis on PRs for next.js apps

Next.js Bundle Analysis Github Action Analyzes each PR's impact on your next.js app's bundle size and displays it using a comment. Optionally supports

HashiCorp 369 Dec 27, 2022
Team project within the course of Software System Design and Analysis.

?? InnoBookCrossing - Application for sharing books at Innopolis gh-md-toc ?? General Information Description The application is designed to help peop

Dariya 33 Oct 22, 2022
JavaScript package for predictive data analysis and machine learning

scikit.js JavaScript package for predictive data analysis and machine learning. Generic math operations are powered by Tensorflowjs core layer. We are

JSdata 74 Jan 6, 2023
A lightweight framework for data analysis in JavaScript.

datakit About A lightweight library/framework for data analysis in JavaScript. Usage npm install datakitjs --save Documentation & Examples Reading, Fi

Nathan Epstein 291 Jun 26, 2021
Nouns On-Chain Proposal Simulation and Analysis

Nouns Diligence Nouns On-Chain Proposal Simulation and Analysis For Voters Technical reports for all reviewed proposals can be found in the reports fo

Nouns 23 Dec 26, 2022
A crawler that crawls the site's internal links, fetching information of interest to any SEO specialist to perform appropriate analysis on the site.

Overview ?? It is a module that crawls sites and extracts basic information on any web page of interest to site owners in general, and SEO specialists

Yazan Zoghbi 2 Apr 22, 2022
A crawler that crawls the site's internal links, fetching information of interest to any SEO specialist to perform appropriate analysis on the site.

Overview ?? It is a module that crawls sites and extracts basic information on any web page of interest to site owners in general, and SEO specialists

Yazan Zoghbi 2 Apr 22, 2022
⚡ Archive of all Zotero Translators co-created by participants of the Information Analysis course in 2018 to date.

awesome-translators 1. awesome-translators 维护小组 1.1 Translators 更新流程 1.2 Zotero 安装流程 1.3 Zotero 进阶资料 2. Translators 2.1 Translators 总览表 2.2 Translator

开智学堂 99 Dec 30, 2022
Webpack dev tools to make performance analysis, error investigation and loader development more convenient

build-tool-inspector Introduction Webpack dev tools to make performance analysis, error investigation and loader development more convenient. Provide

Modern JS 25 Nov 17, 2022
Chess Engine Battles & Analysis using UCI Engines

Chess Engine Battles & Analysis Written in TypeScript, using UCI Engine, managed from NodeJS Tested using Stockfish, LCZero, Beserk and SmallBrain for

Vladimir Mandic 2 Oct 10, 2022
Scrape tweets from Twitter search results based on keywords and date range using Playwright. Save scraped tweets in a CSV file for easy analysis

Tweet Harvest (Twitter Crawler) Tweet Harvest is a command-line tool that uses Playwright to scrape tweets from Twitter search results based on specif

Helmi Satria 33 Aug 9, 2023
📸 A command-line tool to generate code images of your local code right away from the terminal

?? rayli ?? A command-line tool to generate code images of your local code right away from the terminal Usage Commands Usage $ npm install -g rayli $

buidler's hub 45 Nov 4, 2022
A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

Warm Up ?? ??‍?? A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snipp

Arhun Saday 34 Dec 12, 2022