Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bodil/eslint-config-cleanjs
An eslint config which reduces JS to a pure functional language
https://github.com/bodil/eslint-config-cleanjs
Last synced: about 2 months ago
JSON representation
An eslint config which reduces JS to a pure functional language
- Host: GitHub
- URL: https://github.com/bodil/eslint-config-cleanjs
- Owner: bodil
- Archived: true
- Created: 2016-08-23T18:29:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-22T12:58:09.000Z (over 6 years ago)
- Last Synced: 2024-09-21T15:47:15.218Z (about 2 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1,099
- Watchers: 21
- Forks: 33
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## DO NOT USE
This project has never been seriously maintained, and you should be using [eslint-plugin-fp](https://github.com/jfmengels/eslint-plugin-fp) directly instead.
# 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 modulesThis is all based on three ESLint plugins, which you'll have to
install to use these presets:* [eslint-plugin-better](https://github.com/idmitriev/eslint-plugin-better)
* [eslint-plugin-fp](https://github.com/jfmengels/eslint-plugin-fp)
* [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import)## 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"
}
```