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.
npm install eslint \
@virtual-live-lab/eslint-config \
--save-dev
npm install eslint \
@virtual-live-lab/eslint-config \
typescript \
typescript-eslint \
--save-dev
This package has some presets to zero-config use.
// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/js";
Extends js
preset.
// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/ts";
Extends ts
preset.
// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/react";
Extends ts
and react
preset.
[!TIP] you need to install
eslint-config-next
package as devDependencies. Normally, it will be installed automatically when usecreate-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";
Extends ts
and react
presets.
// eslint.config.mjs
export { default } from "@virtual-live-lab/eslint-config/presets/astro";
This package has some addon configurations.
// 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);
// 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);