-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
65 lines (64 loc) · 1.59 KB
/
Copy patheslint.config.js
File metadata and controls
65 lines (64 loc) · 1.59 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 globals from 'globals';
import tseslint from 'typescript-eslint';
import { defineConfig } from 'eslint/config';
import eslintConfigPrettier from 'eslint-config-prettier';
export default defineConfig([
{
ignores: [
'dist',
'node_modules',
'.cladding',
'.clawmini',
'**/.svelte-kit',
'**/build',
'web/.svelte-kit',
'test-workspace*',
],
},
{
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
plugins: { js },
extends: ['js/recommended'],
languageOptions: {
globals: globals.browser,
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
},
tseslint.configs.recommended,
// Your custom rules
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-restricted-syntax': [
'error',
{
selector: 'ImportExpression',
message: 'Dynamic imports are not allowed. Please use top-level imports.',
},
{
selector: 'TSImportType',
message: 'Inline type imports are not allowed. Please use top-level imports.',
},
],
'max-lines': ['error', { max: 300, skipBlankLines: true, skipComments: true }],
},
},
{
files: ['**/*.test.ts', '**/*.spec.ts'],
rules: {
'max-lines': 'off',
'no-restricted-syntax': 'off',
},
},
{
files: ['templates/environments/**/*.{js,mjs,cjs}'],
languageOptions: {
globals: globals.node,
},
},
eslintConfigPrettier,
]);