forked from midudev/la-velada-web-oficial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
81 lines (80 loc) · 2.21 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
79
80
81
process.env.ESLINT_TSCONFIG = "tsconfig.json"
/**
* @type {import("eslint").Linter.Config}
*/
module.exports = {
globals: {
NodeJS: true,
NodeListOf: true,
},
env: {
es2022: true,
node: true,
browser: true,
},
extends: ["@antfu", "eslint-config-prettier"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"eol-last": "off",
"jsx-quotes": ["warn", "prefer-double"],
"quotes": ["warn", "double"],
"semi": ["warn", "never"],
"@stylistic/js/no-tabs": "off",
"@stylistic/ts/indent": "off",
"no-constant-binary-expression": "warn",
"no-debugger": "warn",
"no-extend-native": "off",
"no-trailing-spaces": "warn",
"space-before-function-paren": "off",
"antfu/if-newline": "off",
"antfu/top-level-function": "off",
"@stylistic/js/operator-linebreak": "off",
"@stylistic/ts/brace-style": "off",
"@stylistic/js/multiline-ternary": "off",
"n/prefer-global/process": "off",
"@stylistic/js/no-mixed-spaces-and-tabs": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"object-curly-newline": [
"warn",
{
consistent: true,
multiline: true,
},
],
"object-curly-spacing": ["warn", "always"],
"array-element-newline": ["warn", "consistent"],
"array-bracket-newline": ["warn", "consistent"],
},
overrides: [
{
files: ["*.astro", "src/utils/serviceWorker.ts"],
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
extends: ["plugin:astro/recommended", "plugin:astro/jsx-a11y-recommended"],
rules: {
"astro/no-conflict-set-directives": "warn",
"astro/no-unused-define-vars-in-style": "warn",
"astro/no-unused-css-selector": "off",
"astro/prefer-class-list-directive": "warn",
"astro/semi": ["warn", "never"],
"astro/jsx-a11y/anchor-is-valid": "warn",
"@stylistic/ts/indent": "off",
},
},
{
// Define the configuration for `<script>` tag.
// Script in `<script>` is assigned a virtual file name with the `.js` extension.
files: ["**/*.astro/*.js", "*.astro/*.js"],
parser: "@typescript-eslint/parser",
},
],
}