0.1.7 • Published 2 years ago

eslint-config-gojutin v0.1.7

Weekly downloads
803
License
MIT
Repository
github
Last release
2 years ago

eslint-config-gojutin

version MIT License semantic-release

A sensible set of ESLint rules for React/TypeScript projects with an emphasis on immutability and accessibility.

Table of Contents

Features

  • Editor and Prettier Integrations
  • Rules for
    • TypeScript
    • React and React Hooks
    • A11y with React
    • Testing with Jest
    • Import Statements
    • Functional and Immutable Patterns

Installation

This package has several peer dependencies that need to be installed to work properly. You can see the full list with the following command:

npm info "eslint-config-gojutin" peerDependencies

This script adds the package along with all of it's required dependencies:

yarn add -D eslint-confog-gojutin @typescript-eslint/eslint-plugin @typescript-eslint/parser babel-eslint eslint eslint-config-prettier eslint-config-react-app eslint-plugin-flowtype eslint-plugin-functional eslint-plugin-immutable eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-standard prettier typescript

Usage

Once the library and all required dependencies are installed, you can use it by specifying this library in the extends property of your .eslintrc or .eslintrc.js file.

{
  "extends": ["gojutin"]
}

Overwriting Rules

Any rule that is included with this library can be easily overwritten using the rules property in your .eslintrc or .eslintrc.js file:

{
  "extends": ["@apsphysics"],
  "rules": {
    "functional/no-mixed-type": "warn"
  }
}

Please refer to the documentation for each dependency to learn what options are available for each rule.

About

This package extends the popular eslint-config-react-app package, which is created and maintained the Facebook team. This configuration package is actively maintained and includes sensible rules for React-specific apps, including hooks usage. It also includes accessibility rules via react-a11y as well as rules for import statements and a few other niceties.

eslint-config-react-app:

Contributing

Committing Code to GitHub

This repo uses Husky and @commitlint to enforce commit messages that follow the Conventional Commit specification. Please refer to the APS Playbook for a quick reference.

Publishing

This package is published automatically with a GitHub Action that is triggered via GitHub releases. Release drafts are created by the np package by running the yarn run release command. This will prompt you to select the appropriate version type (patch, minor, major, etc.) and will automatically create a detailed release draft containing all commit messages since the previous release. Once you save the release, the GitHub Action will automatically take care of publishing the new version of the package to the NPM package registry.