• Stars
    star
    235
  • Rank 170,587 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Provide a defineConfig function for .eslintrc.js files

NPM package Downloads Build Status License: MIT Code Style: Prettier Donate: PayPal

eslint-define-config

Provide a defineConfig function for .eslintrc.js, and a defineFlatConfig function for eslint.config.js files.

This project is written by a human and only partially automatically generated!
Some rules are even enhanced by hand!
Unfortunately, this has the disadvantage that not everything is immediately defined. For example, if a rule is not defined, it falls back to a basic definition.
However, the advantage is that you get documentation for pretty much everything in the code and usually get a direct link to the respective plugin or eslint rule. The types are also strictly typed.

So if you are missing something like a rule or a plugin that should also be supported or a rule definition is e.g. out of date, feel free to open an issue or PR for it.

Installation

# add eslint and eslint-define-config to project’s dev dependencies
npm add --save-dev eslint eslint-define-config
# or
yarn add --dev eslint eslint-define-config
# or
pnpm add --save-dev eslint eslint-define-config

Usage

.eslintrc.js

// @ts-check
const { defineConfig } = require('eslint-define-config');

module.exports = defineConfig({
  root: true,
  rules: {
    // rules...
  },
});

Flat Config

eslint.config.js

// @ts-check
const { defineFlatConfig } = require('eslint-define-config');

module.exports = defineFlatConfig([
  'eslint:recommended',
  {
    plugins: {
      // plugins...
    },
    rules: {
      // rules...
    },
  },
]);

Why?

Improve your eslint configuration experience with:

  • auto-suggestions
  • type checking (Use // @ts-check at the first line in your .eslintrc.js or eslint.config.js)
  • documentation
  • deprecation warnings

Image

Video

Click on the thumbnail to play the video

Video

Credits

More Repositories

1

eslint-plugin-vue-pug-sfc

eslint plugin vue pug sfc
TypeScript
33
star
2

FileExplorer

Windows 10 Universal App
C#
31
star
3

vite-plugin-time-reporter

Time reporting for Vite project
TypeScript
19
star
4

vite-plugin-ts-nameof

Give Vite the ability to resolve 'nameof' calls in TypeScript
JavaScript
16
star
5

star-citizen-trade-market-api

Star Citizen Trade Market Backend API
TypeScript
9
star
6

star-citizen-trade-market-frontend

Star Citizen Trade Market Frontend
TypeScript
7
star
7

github-contributors-map

A world map that shows contributors of a given GitHub repository
Vue
6
star
8

minesvueper

Minesweeper written in Vue
Vue
5
star
9

hsml

A pug-inspired HTML preprocessor
Rust
5
star
10

pug-fmt

Pug Formatter
TypeScript
5
star
11

vizscript

Visual Scripting
TypeScript
4
star
12

mastodon_exporter

Prometheus exporter for Mastodon metrics exposed by the Mastodon API
Rust
3
star
13

quasar-vite

TypeScript
3
star
14

nestjs-prometheus-graphql

Example of how to implement Prometheus metrics in NestJS
TypeScript
3
star
15

satisfactory-server-api-client

Universal Satisfactory Server API client for JavaScript
TypeScript
3
star
16

watchlist

A lightweight tool to track season and episode progress offline
JavaScript
2
star
17

shini.dev

My personal website
Vue
2
star
18

rexplorer

A file-explorer written in Rust
JavaScript
2
star
19

repo-dashboard

Repo Dashboard
Vue
2
star
20

Piltover

Environment of the fictional city Piltover from League Of Legends
2
star
21

Clickami

A clickbot that can click up tp 1.000x times a second
C#
1
star
22

java-visualised-sorting-algorithm

Developed during the training at BWV Aachen
Java
1
star
23

quarkus-fruits

HTML
1
star
24

vite-reproduce-3309

TypeScript
1
star
25

prettier-plugin-organize-imports-issue-78

TypeScript
1
star
26

sturdy-adventure

TypeScript
1
star
27

procedural-space

A three.js project where you can fly through a small procedurally generated universe
TypeScript
1
star
28

volar-700

TypeScript
1
star
29

visualised-sorting-algorithm

Based on a project developed during the training at BWV Aachen
TypeScript
1
star
30

Shinigami92

TypeScript
1
star