Coder Social home page Coder Social logo

eslint-config-cleanjs's Introduction

eslint-config-cleanjs

This is an ESLint configuration which aims to restrict you to a subset of JavaScript which would be as close to an idealised pure functional language as possible. The idea is to see if it's possible to banish all the Bad Parts (well, except for the single numeric type being IEEE 754 floating point) and leave a language without the design flaws which have plagued JS from the start, and which aren't easy to design out of the language without becoming a subset of itself.

Please note that this rule set is meant for use only with ES6 or higher (and the ES7 object rest spread proposal helps a lot).

Highlights:

  • no this and no classes
  • no null and undefined (implying that all functions must return)
  • no mutation of any kind
  • no variable reassignment
  • no statements, only expressions (including no if)
  • no CommonJS or AMD, only ES6 modules

This is all based on three ESLint plugins, which you'll have to install to use these presets:

Usage

Just install this package somewhere your eslint can find it (npm install -g eslint-config-cleanjs if your eslint is installed with -g too), along with the three above mentioned plugins (npm install -g eslint-plugin-better eslint-plugin-fp eslint-plugin-import), and put this in your .eslintrc or wherever you keep your project's eslint config:

{
  "extends": "cleanjs"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.