This package has been deprecated

Author message:

this package is not maintained anymore

eslint-config-fp

1.3.1 • Public • Published

downloads last commit license npm node JavaScript Style Guide eslint-config-fp

ESLint is a code linter for JavaScript.

This configuration combines:

Install

npm install -D eslint-config-fp eslint@^5.6.0 eslint-config-prettier@^3.0.1 eslint-config-standard@^12.0.0 eslint-import-resolver-node@^0.3.2 eslint-plugin-eslint-comments@^3.0.1 eslint-plugin-filenames@^1.3.2 eslint-plugin-fp@^2.3.0 eslint-plugin-html@^5.0.0-alpha.0 eslint-plugin-import@^2.14.0 eslint-plugin-markdown@^1.0.0-beta.8 eslint-plugin-node@^7.0.1 eslint-plugin-promise@^4.0.1 eslint-plugin-standard@^4.0.0 eslint-plugin-unicorn@^6.0.1 eslint-plugin-you-dont-need-lodash-underscore@^6.4.0 prettier@^1.14.3

Then in your .eslintrc.json:

{
  "extends": "eslint-config-fp"
}

The configuration is very opinionated but you can override specific rules in your .eslintrc.json to fit your needs and coding style.

Then create a symlink to the Prettier configuration and .editorconfig in your project:

ln -sf node_modules/eslint-config-fp/.prettierrc.yml node_modules/eslint-config-fp/.editorconfig .

Badge

The following badge can be added to your project: eslint-config-fp

[![eslint-config-fp](https://img.shields.io/badge/eslint-config--fp-green.svg?logo=eslint)](https://github.com/autoquality/eslint-config-fp)

Prettier

prettier must be run before eslint to avoid conflicts.

We recommend using first prettier --write then eslint --fix --cache.

Do not forget to add .eslintcache to your .gitignore file.

Functional programming

This enforces that state is never directly mutated and global state is not referenced:

However throwing exceptions are allowed as this can simplify code.

Modularity

The following rules are enforced to encourage splitting your code into small modules and functions:

Modern JavaScript

Strictness

The configuration is very explicit and enforces strict linting. This should help you find bugs and maintain a consistent coding style.

This includes:

Other styling rules

HTML and Markdown

eslint-plugin-html and eslint-plugin-markdown are included so you can lint JavaScript inside HTML or Markdown files.

Projects using this configuration

  • autoserver: create a full-featured REST/GraphQL API from a configuration file

Feel free to submit an issue or PR to add your project to the list above!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i eslint-config-fp

Weekly Downloads

1

Version

1.3.1

License

Apache-2.0

Unpacked Size

31.6 kB

Total Files

6

Last publish

Collaborators

  • ehmicky