forked from saleor/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
49 lines (48 loc) 路 1.6 KB
/
Copy patheslint.config.js
File metadata and controls
49 lines (48 loc) 路 1.6 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
45
46
47
48
49
import { config } from "@saleor/eslint-config-apps/index.js";
import nodePlugin from "eslint-plugin-n";
/** @type {import("eslint").Linter.Config} */
export default [
...config,
{
// TODO: remove this override once the recommended rules are fixed
name: "saleor-app-products-feed/override-recommended",
files: ["**/*.{ts,tsx}"],
rules: {
"@typescript-eslint/no-unused-vars": "warn",
"no-empty": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-empty-object-type": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-require-imports": "warn",
},
},
{
// TODO: remove this override once we rename all graphql files to kebab-case
name: "saleor-app-products-feed/override-@graphql-eslint/match-document-filename",
files: ["**/*.graphql"],
rules: {
"@graphql-eslint/match-document-filename": [
"warn",
{
fileExtension: ".graphql",
fragment: { style: "kebab-case" },
query: { style: "kebab-case" },
subscription: { style: "kebab-case" },
mutation: { style: "kebab-case" },
},
],
},
},
{
name: "saleor-app-products-feed/custom-config",
files: ["**/*.ts"],
plugins: { n: nodePlugin },
rules: { "n/no-process-env": "error" },
},
{
name: "saleor-app-products-feed/override-no-process-env",
files: ["next.config.ts", "src/env*.ts", "src/instrumentation.ts", "src/instrumentations/*"],
rules: { "n/no-process-env": "off" },
},
];