UNPKG

linted

Version:

ESLint mono-plugin bundler with strict, opinionated defaults for JavaScript, TypeScript, Svelte, HTML, CSS, JSON, JSONC, and YAML.

56 lines (51 loc) 1.08 kB
// #region Scope import Core from "@eslinted/core"; import { scopes, optional, tree, } from "./scope"; import settings from "./settings"; import defaults from "@eslinted/defaults"; // #endregion // #region External import stylistic from "@stylistic/eslint-plugin"; import { plugin as ts, parser as tsParser, } from "typescript-eslint"; import html from "@html-eslint/eslint-plugin"; import htmlParser from "@html-eslint/parser"; import css from "@eslint/css"; import json from "@eslint/json"; import jsonc from "eslint-plugin-jsonc"; import yml from "eslint-plugin-yml"; // #endregion export default function ( extensions: Parameters<typeof Core<typeof scopes[number], typeof optional[number]>>[6] = {}, ) { const configs = Core( scopes, optional, tree, { ts: tsParser, html: htmlParser, }, settings, defaults, extensions, ); configs[configs.length] = { plugins: { stylistic, ts: ts as unknown, html: html as unknown, css, json, jsonc, yml, }, }; return configs; }