15.0.0 • Published 3 months ago

eslint-config-zakodium v15.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

eslint-config-zakodium

Various shared ESLint configurations for Zakodium projects.

Installation

npm install -D eslint-config-zakodium eslint

Configuration

Create a file named eslint.config.mjs at the root of the project and extend the config that you want to use. Example:

import { defineConfig } from 'eslint/config';
import ts from 'eslint-config-zakodium/ts';
import adonisV5 from 'eslint-config-zakodium/adonis-v5';

export default defineConfig(ts, adonisV5);

Globals

This package re-exports globals for convenience:

import { defineConfig } from 'eslint/config';
import { globals } from 'eslint-config-zakodium';

export default defineConfig({
  languageOptions: {
    globals: {
      ...globals.node,
    },
  },
});

Monorepo

In a monorepo, you may want to apply different configs for different paths. The defineConfig ESLint helper allows to do that with extends:

import { defineConfig, globalIgnores } from 'eslint/config';
import ts from 'eslint-config-zakodium/ts';
import adonisV5 from 'eslint-config-zakodium/adonis-v5';
import react from 'eslint-config-zakodium/react';

export default defineConfig(
  // Global ignore patterns.
  globalIgnores(['**/build']),
  // Apply TypeScript config on the whole project.
  ts,
  {
    // Apply Adonis v5 config only to the api.
    files: ['api/**'],
    extends: [adonisV5],
  },
  {
    // Apply React config only to the frontend.
    files: ['front/**'],
    extends: [react],
  },
);

Available configs

15.0.0

3 months ago

14.0.0

7 months ago

13.0.0

9 months ago

12.0.0

11 months ago

10.0.0

12 months ago

11.2.0

12 months ago

11.1.1

12 months ago

11.0.0

12 months ago

11.1.0

12 months ago

9.0.1

1 year ago

8.1.0

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

8.0.2

2 years ago

7.2.0

2 years ago

7.1.0

2 years ago

7.0.0

3 years ago