JSPM

  • Created
  • Published
  • Downloads 29
  • Score
    100M100P100Q54941F
  • License MIT

ESLint rules for JavaScript projects

Package Exports

  • eslint-config-translated
  • eslint-config-translated/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-config-translated) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Translated ESLint config

This package provides the ESLint configuration for JavaScript projects, both NodeJS and ReactJS, of Translated organization.

You can check eslint plugins used directly from the plugins section.

Rules

The following rules are explicitly applied on top of the base configuration exported from plugins:

  • "no-console": "off": services currently log using the native console.log and console.error without using 3rd party logging libraries
  • "max-lines-per-function": ["error", 200]: good indicator of a too complex function
  • "import/order": "error": for improved readability
  • "singleQuote": true: for improved readability
  • "printWidth": 160: for improved readability, assuming company developers are supposed to use at least a 24" display

Installation

Install package as a devDependency:

yarn add --dev eslint-config-translated

Configuration

Create a .eslintrc file with the following content:

{
  "extends": ["eslint-config-translated"]
}

Linting

Fix codebase errors:

yarn eslint --fix .