Skip to content

Default ESLint config for projects at Titanom Technologies

Notifications You must be signed in to change notification settings

titanom/eslint-config

Repository files navigation

@titanom/eslint-config

Default ESLint config for projects at Titanom Technologies

This configuration requires the use of Flat Config added in [email protected].

Installation

pnpm add -D @titanom/eslint-config

Usage

This package exports multiple reusable configurations:

  • base
  • typescript
  • react
  • next
  • (globals)

You can (and should) use multiple of these simultaneously, depending on what tech your project uses.

Example for a Next.js application written in TypeScript:

const base = require('@titanom/eslint-config/base');
const typescript = require('@titanom/eslint-config/typescript');
const react = require('@titanom/eslint-config/react');
const next = require('@titanom/eslint-config/next');

module.exports = [
    base,
    typescript,
    {
        // each config is just a POJO, so you can overwrite or change the config however you like
        ...react,
        files: ['.tsx'],
    },
    next,
];

Note
The base & typescript configurations do not configure any globals as they are environment independant.
To add globals this package re-exports globals for you to configure yourself.

const base = require('@titanom/eslint-config/base');
const typescript = require('@titanom/eslint-config/typescript');
const globals = require('@titanom/eslint-config/globals');

module.exports = [
    base,
    typescript,
    {
        languageOptions: {
            globals: globals.browser
        }
    }
];

About

Default ESLint config for projects at Titanom Technologies

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •