Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
79 lines (78 loc) · 1.88 KB
/
Copy patheslint.config.js
File metadata and controls
79 lines (78 loc) · 1.88 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import cspellConfigs from '@cspell/eslint-plugin/configs'
import js from '@eslint/js'
import jsdoc from 'eslint-plugin-jsdoc'
import perfectionist from 'eslint-plugin-perfectionist'
import { defineConfig } from 'eslint/config'
import neostandard, { plugins } from 'neostandard'
export default defineConfig([
{
ignores: ['docs/**', 'package/**', 'type-tests/workerd/**'],
},
cspellConfigs.recommended,
{
rules: {
'@cspell/spellchecker': [
'warn',
{
autoFix: true,
cspell: {
words: [
'codegen',
'evanwashere',
'fastly',
'IsHTMLDDA',
'lagon',
'Lanczos',
'Lentz',
'lockdown',
'moddable',
'neostandard',
'prefactor',
'quickjs',
'Quii',
'spidermonkey',
'workerd',
],
},
},
],
},
},
js.configs.recommended,
plugins.promise.configs['flat/recommended'],
jsdoc.configs['flat/recommended-typescript'],
{
rules: {
'jsdoc/check-tag-names': [
'warn',
{
definedTags: ['defaultValue', 'experimental', 'typeParam'],
typed: true,
},
],
},
},
...plugins['typescript-eslint'].config(
{
extends: [
...plugins['typescript-eslint'].configs.strictTypeChecked,
...plugins['typescript-eslint'].configs.stylisticTypeChecked,
],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
...plugins['typescript-eslint'].configs.disableTypeChecked,
}
),
perfectionist.configs['recommended-natural'],
...neostandard({
noJsx: true,
ts: true,
}),
])