-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
67 lines (58 loc) · 1.45 KB
/
eslint.config.js
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
import angularParser from "@angular-eslint/template-parser";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import gitignore from "eslint-config-flat-gitignore";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginTailwind from "eslint-plugin-tailwindcss";
import eslintPluginUnicorn from "eslint-plugin-unicorn";
import globals from "globals";
const FLAT_RECOMMENDED = "flat/recommended";
const compat = new FlatCompat();
const templateParser = {
meta: angularParser.meta,
parseForESLint: angularParser.parseForESLint,
};
export default [
gitignore(),
js.configs.recommended,
eslintConfigPrettier,
eslintPluginUnicorn.configs[FLAT_RECOMMENDED],
...compat.extends("plugin:promise/recommended"),
{
files: ["**/*.html"],
languageOptions: {
parser: templateParser,
},
plugins: {
tailwindcss: eslintPluginTailwind,
},
rules: {
...eslintPluginTailwind.configs[FLAT_RECOMMENDED][1].rules,
},
},
{
ignores: ["**/.vercel", "**/package.json"],
languageOptions: {
globals: {
...globals.browser,
EmblaCarousel: "readonly",
EmblaCarouselClassNames: "readonly",
gsap: "readonly",
ScrollToPlugin: "readonly",
ScrollTrigger: "readonly",
},
ecmaVersion: "latest",
sourceType: "module",
},
settings: {
"import/resolver": {
node: {
extensions: [".js"],
moduleDirectory: ["node_modules", "src/"],
},
},
},
plugins: {},
rules: {},
},
];