generated from wanoo21/tailwind-astro-starting-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
96 lines (96 loc) · 2.38 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: {
browser: true,
amd: true,
node: true,
es6: true,
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
// 'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
'plugin:astro/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
overrides: [
{
// Define the configuration for `.astro` file.
files: ['*.astro'],
// Allows Astro components to be parsed.
parser: 'astro-eslint-parser',
// Parse the script in `.astro` as TypeScript by adding the following configuration.
// It's the setting you need when using TypeScript.
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro'],
},
},
],
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
rules: {
'prettier/prettier': 'error',
'jsx-a11y/anchor-is-valid': [
'off',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton'],
},
],
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
},
],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'import/no-unresolved': 'off',
'import/order': [
1,
{
groups: ['external', 'builtin', 'internal', 'sibling', 'parent', 'index'],
pathGroups: [
{
pattern: 'components',
group: 'internal',
},
{
pattern: 'layouts',
group: 'internal',
},
{
pattern: 'styles',
group: 'internal',
},
{
pattern: 'content',
group: 'internal',
},
{
pattern: 'public',
group: 'internal',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['internal'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
}