-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
68 lines (67 loc) · 2.17 KB
/
eslint.config.js
File metadata and controls
68 lines (67 loc) · 2.17 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import eslint from "@eslint/js";
import eslintPluginAstro from "eslint-plugin-astro";
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
import perfectionist from "eslint-plugin-perfectionist";
import eslintPluginSeparateTypeImports from "eslint-plugin-separate-type-imports";
import eslintPluginUnicorn from "eslint-plugin-unicorn";
import { defineConfig } from "eslint/config";
import tsEslint from "typescript-eslint";
export default defineConfig(
{
ignores: ["dist/", ".astro/", "coverage/", "content/", "public/"],
},
eslint.configs.recommended,
eslintPluginUnicorn.configs.recommended,
eslintPluginSeparateTypeImports.configs.recommended,
perfectionist.configs["recommended-natural"],
tsEslint.configs.recommendedTypeChecked,
eslintPluginAstro.configs.recommended,
eslintPluginBetterTailwindcss.configs["recommended-error"],
{
settings: {
"better-tailwindcss": {
entryPoint: "src/css/tailwind.css",
},
},
},
{
rules: {
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-imports": "off", // Turned off in favor of our custom rule
"@typescript-eslint/no-import-type-side-effects": "error",
...eslintPluginBetterTailwindcss.configs["recommended-error"].rules,
"better-tailwindcss/no-conflicting-classes": "error",
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["../*"],
message: "no relative imports outside current folder",
},
],
},
],
"unicorn/filename-case": "off",
"unicorn/no-array-reverse": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/prevent-abbreviations": "off",
},
},
{
languageOptions: {
parserOptions: {
extraFileExtensions: [".astro"],
project: true,
tsconfigRootDir: import.meta.dirname,
warnOnUnsupportedTypeScriptVersion: false,
},
},
},
{
extends: [tsEslint.configs.disableTypeChecked],
...tsEslint.configs.eslintRecommended,
files: ["**/*.astro"],
},
);