Skip to content

GetResponse/eslint-config-getresponse

Repository files navigation

@getresponse/eslint-config

npm version Build Status Dependencies License


An opinionated ESLint ruleset targeting TypeScript + React web apps

Requirements

  • ESLint ^8.48.0

Installation

  1. Install eslint and @getresponse/eslint-config:

    npm i -D eslint @getresponse/eslint-config
  2. Add "extends": "@getresponse/eslint-config" to your ESLint configuration file

TypeScript project files

Since @typescript-eslint v8, all linted .ts/.tsx files must be included in your tsconfig.json. Files outside the project will cause an error when type-aware rules are active. Make sure your tsconfig.json (or a dedicated tsconfig.eslint.json) covers all files you want to lint:

{
  "include": ["src/**/*", "tests/**/*"]
}

Dynamic rules

Rules for the following tools are enabled automatically when the corresponding package is detected in your package.json:

  • typescript
  • react
  • jest
  • @playwright/test / playwright

Mixins

Additional opt-in rulesets are available:

// .eslintrc.js
module.exports = {
    extends: [
        '@getresponse/eslint-config',
        '@getresponse/eslint-config/mixins/a11y',
    ],
};
Mixin Description
@getresponse/eslint-config/mixins/a11y Accessibility rules via eslint-plugin-jsx-a11y

Rules list

The web version of the rules list is available on GitHub Pages

About

GetResponse ESLint config for React apps

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors