-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
38 lines (37 loc) · 968 Bytes
/
.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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended', // eslint-plugin-vue
'plugin:astro/recommended',
// last - to turn of clashes with prettier
'prettier', // eslint-config-prettier
],
// for parsing vue <template>
parser: 'vue-eslint-parser',
// for parsing <script>
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
// sorting imports and tailwind plugin
plugins: ['simple-import-sort', 'tailwindcss', '@typescript-eslint'],
// rules for enabling import sorting errors
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
overrides: [
{
files: ['*.astro'],
parser: 'astro-eslint-parser',
rules: {},
},
],
}