パッケージの詳細

@overlookmotel/eslint-config-react

overlookmotel19MIT9.0.0

@overlookmotel's ESLint config for React

eslint, eslintconfig, config, overlookmotel

readme

NPM version Build Status Dependency Status Dev dependency Status Coverage Status

@overlookmotel's ESLint config for React

ESLint config for apps/libraries using React. Based on eslint-config-airbnb with only React rules with some modifications.

Usage

Add to .eslintrc: "extends": "@overlookmotel/eslint-config-react"

NB Does not extend the base config @overlookmotel/eslint-config so use "extends": "@overlookmotel/eslint-config" too in .eslintrc.

Add dev dependencies in package.json:

  • @overlookmotel/eslint-config-react
  • eslint

If using NPM before v7, additionally add peer dependencies as dev dependencies in package.json:

  • eslint-plugin-import
  • eslint-plugin-jsx-a11y
  • eslint-plugin-react
  • eslint-plugin-react-hooks

Versioning

This module follows semver. Breaking changes will only be made in major version updates.

All active NodeJS release lines are supported (v12+ at time of writing). After a release line of NodeJS reaches end of life according to Node's LTS schedule, support for that version of Node may be dropped at any time, and this will not be considered a breaking change. Dropping support for a Node version will be made in a minor version update (e.g. 1.2.0 to 1.3.0). If you are using a Node version which is approaching end of life, pin your dependency of this module to patch updates only using tilde (~) e.g. ~1.2.3 to avoid breakages.

Tests

Use npm test to run the tests. Use npm run cover to check coverage.

Changelog

See changelog.md

Issues

If you discover a bug, please raise an issue on Github. https://github.com/overlookmotel/eslint-config-react/issues

Contribution

Pull requests are very welcome. Please:

  • ensure all tests pass before submitting PR
  • add tests for new features
  • document new functionality/API additions in README
  • do not add an entry to Changelog (Changelog is created when cutting releases)

更新履歴

Changelog

9.0.0

Breaking changes:

  • Update to ESLint 8

Rule changes:

  • Disable react/jsx-indent-props rule [fix]
  • Disable react/jsx-props-no-spreading rule
  • Disable react/react-in-jsx-scope rule

Bug fixes:

  • Specify ESLint plugin peer dependencies

Refactor:

  • Order rules in alphabetical order

Dev:

  • Run tests on CI on Node v17
  • Clean up after cover NPM script even if fails
  • Update dev dependencies

Docs:

  • Update license year

8.0.0

Breaking changes:

  • Disable react/no-multi-comp rule
  • Enable JSX in .test.js files
  • Use standard ESLint parser

Features:

  • Drop support for Node v10

Dependencies:

  • Update dependencies + peer dependencies

No code:

  • Linting fixes

Dev:

  • Use NPM v7 for development
  • Use Github Actions for CI
  • Update dev dependencies

Docs:

  • Remove Greenkeeper badge
  • Update license year
  • Remove license indentation

7.1.0

Features:

  • Drop support for Node v13

Dependencies:

  • Update eslint-config-airbnb dependency
  • Update peer dependencies

Dev:

  • Replace .npmignore with files list in package.json
  • Replace Mocha + Chai with Jest
  • Update dev dependencies
  • CI run tests on Node v14
  • .editorconfig config
  • Simplify lint scripts
  • ESLint ignore all dot files
  • Travis CI cache NPM

7.0.0

Breaking changes:

  • Update ESLint peer dependencies

Rule changes:

  • Remove unnecessary import/extensions rule

No code:

  • Header code comments

Dependencies:

  • Update eslint-config-airbnb dependency

Dev:

  • Update dev dependencies
  • Update .gitignore + .npmignore
  • Tab width 2 in .editorconfig

6.0.0

Breaking changes:

  • Do not disable node rules
  • Modify import/extensions rule
  • Drop support for Node v8

Features:

  • Update peer dependencies

Dev:

  • Run tests on CI on Node v13
  • Update dev dependencies
  • Remove sudo from Travis CI config
  • ESLint ignore coverage dir

No code:

  • Remove old commented-out code
  • NPM ignore .DS_Store files

Docs:

  • Versioning policy
  • Update license year

5.0.0

Breaking changes:

  • Downgrade eslint-plugin-react-hooks peer dependency to ^1.7.0 to match eslint-config-airbnb

4.0.0

Breaking changes:

  • Update ESLint peer dependencies

Dev:

  • Update dev dependencies

3.1.1

Rule changes:

  • Disable no-underscore-dangle rule

Dev:

  • Update dev dependencies

3.1.0

Rule changes:

  • Update AirBnB config

Dev:

  • Update dev dependencies

3.0.4

Rule changes:

  • Disable react/jsx-one-expression-per-line rule
  • Disable NodeJS rules

3.0.3

Dev:

  • Update dev dependencies

3.0.2

Bug fixes:

  • Set env.browser
  • Use babel-eslint parser

3.0.1

Rule changes:

  • Add sourceType: 'module'

3.0.0

Breaking changes:

  • Drop support for Node v6
  • Update dependencies + peer dependencies

Rule changes:

  • Enable react/jsx-one-expression-per-line rule
  • Add import/extensions rule

Dev:

  • CI run tests on Node v12
  • package-lock.json
  • Update dev dependencies

Doc:

  • Correct README

2.0.1

Dev:

  • Update dev dependency @overlookmotel/eslint-config
  • Update dev dependency @overlookmotel/eslint-config-tests
  • Git ignore package-lock.json

2.0.0

Breaking changes:

  • Base on airbnb config

Other:

  • Update dependencies
  • Tests: Fix lint error [refactor]

1.0.1

  • README update
  • Update dev dependency @overlookmotel/eslint-config
  • Rename CI npm script ci
  • NPM ignore .gitattributes

1.0.0

  • Initial release