0.11.5 • Published 11 months ago

@cdoublev/eslint-config v0.11.5

Weekly downloads
5
License
MIT
Repository
github
Last release
11 months ago

ESLint configuration

Minimal ESLint rule presets:

  • @cdoublev/eslint-config: to lint (ES6+) files executed anywhere
  • @cdoublev/eslint-config/node: to lint files executed in NodeJS
  • @cdoublev/eslint-config/browser: to lint files executed in a browser
  • @cdoublev/eslint-config/jest: to lint files executed in Jest
  • @cdoublev/eslint-config/react: to lint files executed in React

Usage

Simply add the required configurations to the main export of eslint.config.js. For example, in a server side rendered React application, tested with Jest:

// eslint.config.js

const common = require('@cdoublev/eslint-config')
const browser = require('@cdoublev/eslint-config/browser')
const jest = require('@cdoublev/eslint-config/jest')
const node = require('@cdoublev/eslint-config/node')
const react = require('@cdoublev/eslint-config/react')

module.exports = [
  common,
  jest, // Looks for __tests__/**/*.js, tests/**/*.js, **/*.test.js
  react,
  { ...node, files: ['server/**/*.js'] },
  { ...browser, files: ['src/**/*.js'] },
]

How rules are selected?

  • they must be as few as possible to detect errors (tests already exist for this)
  • they must be otherwise related to spacing, line breaks, code complexity
  • they must not increase code complexity
  • they must be widely accepted by the JS community

This document provides some comments about each rule. If a rule exists in this document and is not activated, it will never be.

0.11.1

11 months ago

0.11.2

11 months ago

0.11.3

11 months ago

0.11.4

11 months ago

0.11.5

11 months ago

0.11.0

1 year ago

0.10.2

2 years ago

0.10.3

2 years ago

0.10.0

3 years ago

0.10.1

3 years ago

0.9.1

3 years ago

0.9.0

4 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

7 years ago