Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

KubaJastrz/eslint-config-airbnb

Repository files navigation

@kubajastrz/eslint-config-airbnb

npm package version Pipeline Validate Status

Features

Current list of supported features:

* Important: Using Typescript is required for now.

Usage

Install the configuration and required dependencies with install-peerdeps:

npx install-peerdeps --dev @kubajastrz/eslint-config-airbnb

You can now add the presets of choice to your Eslint configuration file.

React

// .eslintrc.js
module.exports = {
  extends: ['@kubajastrz/eslint-config-airbnb', '@kubajastrz/eslint-config-airbnb/jest'],
  parserOptions: {
    project: './tsconfig.json',
  },
};

Create React App

Projects basing on create-react-app require different preset, due to its annoying nature in v4.0. This configuration turns every rule with "error" severity to "warn" to workaround this problem.

// .eslintrc.js
module.exports = {
  extends: [
    '@kubajastrz/eslint-config-airbnb/create-react-app',
    '@kubajastrz/eslint-config-airbnb/jest',
  ],
  parserOptions: {
    project: './tsconfig.json',
  },
};

Base (no React)

You can also use the base preset, which extends from eslint-config-airbnb/base, if you don't use React in your project.

// .eslintrc.js
module.exports = {
  extends: ['@kubajastrz/eslint-config-airbnb/base', '@kubajastrz/eslint-config-airbnb/jest'],
  parserOptions: {
    project: './tsconfig.json',
  },
};

License

MIT

About

Airbnb-based eslint config supporting TypeScript & Prettier out-of-the-box

Resources

License

Stars

Watchers

Forks

Packages

No packages published