Skip to content

jenssimon/eslint-config-base

Repository files navigation

NPM version Downloads star this repo fork this repo Build Status

eslint-config-base

A shared ESLint configuration

Installation

yarn add --dev @jenssimon/eslint-config-base
npm install @jenssimon/eslint-config-base --save-dev

Afterwards install all the required peerDependencies.

General

This configuration depends on the ESLint AirBnB Extended. It provides a shared configuration to manage standard code style and best practices at a central location.

Features:

Note

This configuration is flat config only.

If you need eslintrc support please use a version < 9 of this lint configuration.

Configuration

For setup of eslint-airbnb-extended see the instructions first.

import path from 'node:path'

import { defineConfig } from 'eslint/config'
import js from '@eslint/js'
import { includeIgnoreFile } from '@eslint/compat'

import { configs, plugins } from 'eslint-config-airbnb-extended'

import { configs as eslintConfigs } from '@jenssimon/eslint-config-base'


const gitignorePath = path.resolve('.', '.gitignore')


// configuration for `eslint-config-airbnb-extended`
const jsConfig = [
  // ...
]


export default defineConfig(
  includeIgnoreFile(gitignorePath),
  {
    ignores: [
      '.yarn/',
    ],
  },

  // configuration for `eslint-config-airbnb-extended`
  jsConfig,
  nodeConfig,
  // ...

  eslintConfigs.base,
)

License

MIT © 2019 Jens Simon

About

A collection of shareable ESLint configurations for both client and server side code

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •