generated from templatus/templatus-vue
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.mjs
65 lines (57 loc) · 1.45 KB
/
eslint.config.mjs
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
import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import tsParser from '@typescript-eslint/parser';
import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import pluginTailwindcss from 'eslint-plugin-tailwindcss';
import pluginSvelte from 'eslint-plugin-svelte';
import svelteParser from 'svelte-eslint-parser';
import pluginCypress from 'eslint-plugin-cypress/flat';
export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
pluginPrettierRecommended,
...pluginTailwindcss.configs['flat/recommended'],
{
files: ['**/*.svelte', '*.svelte'],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: tsParser,
},
},
},
...pluginSvelte.configs['flat/recommended'],
{
...pluginCypress.configs.recommended,
files: ['spec/cypress/**/*.{js,ts}'],
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
},
{
ignores: [
'.ruby-lsp/',
'.yarn/',
'app/javascript/routes.js',
'app/javascript/routes.d.ts',
'config/',
'db/',
'log/',
'node_modules/',
'public/',
'tmp/',
'vendor/',
'coverage/',
],
},
];