UNPKG

@shayanthenerd/eslint-config

Version:

A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style

22 lines (20 loc) 795 B
import { globs } from "../utils/globs.js"; import { isEnabled } from "../utils/isEnabled.js"; import { defaultOptions } from "../utils/options/defaultOptions.js"; import { getCypressRules } from "../rules/cypress.js"; import { mergeConfigs } from "eslint-flat-config-utils"; import eslintPluginCypress from "eslint-plugin-cypress"; //#region src/configs/cypress.ts function getCypressConfig(options) { const { cypress } = options.configs.test; const { overrides } = isEnabled(cypress) ? cypress : defaultOptions.configs.test.cypress; const cypressConfig = { name: "shayanthenerd/cypress", files: [globs.test], extends: [eslintPluginCypress.configs.recommended], rules: getCypressRules() }; return mergeConfigs(cypressConfig, overrides); } //#endregion export { getCypressConfig };