@kubajastrz/eslint-config-airbnb

1.0.0 • Public • Published

@kubajastrz/eslint-config-airbnb

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

Readme

Keywords

none

Package Sidebar

Install

npm i @kubajastrz/eslint-config-airbnb

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

18.9 kB

Total Files

10

Last publish

Collaborators

  • kubajastrz