UNPKG

@shayanthenerd/eslint-config

Version:

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

21 lines (20 loc) 853 B
import { globs } from "../helpers/globs.mjs"; import { isEnabled } from "../utils/isEnabled.mjs"; import { defaultOptions } from "../helpers/options/defaultOptions.mjs"; import { getCypressRules } from "../rules/cypress.mjs"; 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; return mergeConfigs({ name: "shayanthenerd/cypress", files: [globs.test], plugins: { cypress: eslintPluginCypress }, languageOptions: { globals: eslintPluginCypress.configs.recommended.languageOptions?.globals }, rules: getCypressRules() }, overrides); } //#endregion export { getCypressConfig };