forked from teambtcmap/btcmap.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
65 lines (64 loc) · 1.77 KB
/
eslint.config.js
File metadata and controls
65 lines (64 loc) · 1.77 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
import js from '@eslint/js';
import eslintPluginSvelte from 'eslint-plugin-svelte';
import * as svelteParser from 'svelte-eslint-parser';
import * as typescriptParser from '@typescript-eslint/parser';
import tseslint from 'typescript-eslint';
import globals from 'globals';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginSvelte.configs.recommended,
...eslintPluginSvelte.configs['flat/prettier'],
{
// Override the TypeScript ESLint recommended config
name: 'typescript-eslint/disable-ban-ts-comment',
rules: {
'@typescript-eslint/ban-ts-comment': 'warn'
}
},
{
name: 'project/typescript-config',
files: ['**/*.ts'],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
]
}
},
{
name: 'project/svelte-config',
files: ['**/*.svelte'],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: typescriptParser,
project: './tsconfig.json',
extraFileExtensions: ['.svelte']
},
globals: {
...globals.browser,
...globals.node
}
},
rules: {
'svelte/no-dupe-style-properties': 'warn', // mainly because of tailwind (v4 will fix this)
'svelte/no-unused-svelte-ignore': 'off', // These are used by vite-plugin-svelte/svelte-check, not ESLint
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
]
}
},
{
name: 'project/no-console',
files: ['**/*.js', '**/*.ts', '**/*.svelte'],
rules: {
'no-console': ['error', { allow: ['info', 'warn', 'error', 'debug'] }]
}
},
{
ignores: ['.netlify', '.svelte-kit', 'static', 'build', 'spritesheet-*.ts', 'playwright-report']
}
);