3.2.0 • Published 4 years ago

eslint-config-claims-intake v3.2.0

Weekly downloads
21
License
SEE LICENSE IN LI...
Repository
-
Last release
4 years ago

@riga-claims/eslint-config

Claims intake team rules for best front-end coding practices

Features

  • based on the the popular style guide Airbnb
  • configured to be used with typescript and does type checking
  • integrated prettier with eslint with eslint-plugin-prettier
  • supports ECMAScript 6+, React, React hooks, jest

Installation

Install the package with

npm i @riga-claims/eslint-config -D
# or
yarn add @riga-claims/eslint-config -D

Then install the correct versions of each peerDependency package, which are listed by the command:

npm info "@riga-claims/eslint-config@latest" peerDependencies

If using npm 5+, use this shortcut:

npx install-peerdeps -D @riga-claims/eslint-config

TL;DR just give me the peerdeps packages:

npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-testing-library prettier
# or
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-testing-library prettier

Usage

Eslint Config

Add the config to either your .eslintrc:

{
  "extends": "@riga-claims/eslint-config",
  "parserOptions": {
    "tsconfigRootDir": "./"
  },
  "settings": {
    "react": {
      "version": "detect"
    },
    "jest": {
      "version": 26
    }
  },
  "rules": {
    "some-rule-i-dont-want": "off",
    "some-rule-i-want-but-cant-fix-now": "warn"
  }
}

or .eslintrc.js:

module.exports = {
  extends: '@riga-claims/eslint-config',
  parserOptions: {
    tsconfigRootDir: __dirname,
  },
  settings: {
    react: {
      version: 'detect',
    },
    jest: {
      version: 26,
    },
  },
  // Optional overrides
  rules: {
    'some-rule-i-dont-want': 'off',
    'some-rule-i-want-but-cant-fix-now': 'warn',
  },
};

Prettier Config

Extend your .prettierrc.js with the config in this package

module.exports = require('@riga-claims/eslint-config/prettier.config');

Example

Example contains a create-react-app configured to use this linting library

Development

When making modifications to the library please remember to:

  • bump npm version in package.json
  • add an entry to the CHANGELOG.md

Publishing

The npm package is currently hosted at npmjs.com, so only the author has publishing writes

This will be changed when moving to ProGet

3.2.0

4 years ago

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

2.0.0

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago