-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
78 lines (77 loc) · 2.67 KB
/
.eslintrc.cjs
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
const globals = require("@anolilab/eslint-config/globals");
/** @ts-check */
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: {
// Your environments (which contains several predefined global variables)
// Most environments are loaded automatically if our rules are added
},
extends: ["@anolilab/eslint-config", "@anolilab/eslint-config/typescript-type-checking"],
globals: {
...globals.es2021,
// Your global variables (setting to false means it's not allowed to be reassigned)
// myGlobal: false
},
ignorePatterns: ["!**/*"],
overrides: [
{
files: ["*.ts", "*.tsx", "*.mts", "*.cts", "*.js", "*.jsx"],
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
parserOptions: {},
rules: {},
},
{
files: ["*.ts", "*.tsx", "*.mts", "*.cts"],
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
parserOptions: {},
rules: {
"editorconfig/indent": "off",
},
},
{
files: ["*.tsx"],
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
parserOptions: {},
rules: {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
},
},
{
files: ["**/__tests__/**/*.?(c|m)[jt]s?(x)", "**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],
rules: {
"@typescript-eslint/no-unsafe-return": "off",
},
},
{
files: ["*.js", "*.jsx"],
rules: {},
},
{
files: ["*.mdx"],
rules: {
"jsx-a11y/anchor-has-content": "off",
// @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/917
"jsx-a11y/heading-has-content": "off",
},
},
{
files: ["*.yml", "*.yaml"],
rules: {
"unicorn/filename-case": "off",
"yml/no-empty-mapping-value": "off",
},
},
],
parserOptions: {
ecmaVersion: 2021,
project: true,
sourceType: "module",
},
root: true,
rules: {
// Customize your rules
},
};