@virtual-live-lab/eslint-config
TypeScript icon, indicating that this package has built-in type declarations

2.2.12 • Public • Published

@virtual-live-lab/eslint-config

NPM Version

ESLint configuration for Virtual Live Lab, with various presets and addons.

[!NOTE] This package has not compatibility with ESLint v9 yet.

[!WARNING] This package is only compatible with Flat Config. Do not use for classic .eslintrc style.

Installation

Use for JavaScript

npm install eslint \
  @virtual-live-lab/eslint-config \
  --save-dev

Use for TypeScript

npm install eslint \
  @virtual-live-lab/eslint-config \
  typescript \
  typescript-eslint \
  --save-dev

presets

This package has some presets to zero-config use.

JavaScript Preset

// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/js";

TypeScript Preset

Extends js preset.

// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/ts";

React Preset

Extends ts preset.

// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/react";

Next.js Preset

Extends ts and react preset.

[!TIP] you need to install eslint-config-next package as devDependencies. Normally, it will be installed automatically when use create-next-app.

[!WARNING] This preset may be removed in the future. Please read the comments in src/base/nextjs.ts for more information.

// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/nextjs";

Astro Preset

Extends ts and react presets.

// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/astro";

Addons

This package has some addon configurations.

jsx a11y

// eslint.config.mjs
import jsxA11y from "@virtual-live-lab/eslint-config/addons/jsxA11y";
import ts from "@virtual-live-lab/eslint-config/presets/ts";

import tseslint from "typescript-eslint";

export default tseslint.config(...ts, ...jsxA11y);

Tailwind CSS

// eslint.config.mjs
import tailwind from "@virtual-live-lab/eslint-config/addons/tailwind";
import ts from "@virtual-live-lab/eslint-config/presets/ts";

import tseslint from "typescript-eslint";

export default tseslint.config(...ts, ...tailwind);

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @virtual-live-lab/eslint-config

Weekly Downloads

125

Version

2.2.12

License

MIT

Unpacked Size

39.9 kB

Total Files

20

Last publish

Collaborators

  • sushi-chaaaan
  • vll39