-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (39 loc) · 1.15 KB
/
eslint.config.js
File metadata and controls
44 lines (39 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// @ts-check
import { defineConfig } from "eslint/config";
import { includeIgnoreFile } from "@eslint/compat";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import path from "node:path";
import globals from "globals";
import eslintReact from "@eslint-react/eslint-plugin";
import pluginCypress from "eslint-plugin-cypress";
export default defineConfig(
{
languageOptions: {
globals: { ...globals.browser, ...globals.jest, ...globals.node },
},
},
// JS/TS recommended
eslint.configs.recommended,
{ files: ["**/*.ts", "**/*.tsx"], extends: tseslint.configs.recommended },
// React
eslintReact.configs["recommended-typescript"],
{
rules: {
// We know what we're doing
"@eslint-react/dom/no-dangerously-set-innerhtml": "off",
},
},
// Cypress
pluginCypress.configs.recommended,
{
files: ["**/*.cy.ts"],
rules: {
// Stop reporting `expect().to.exist`
"@typescript-eslint/no-unused-expressions": "off",
},
},
// Ignore the same files as .gitignore
includeIgnoreFile(path.resolve(import.meta.dirname, ".gitignore")),
{ ignores: ["**/fixtures/expected/**"] },
);