-
-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathrstack.config.ts
More file actions
84 lines (81 loc) · 2.03 KB
/
Copy pathrstack.config.ts
File metadata and controls
84 lines (81 loc) · 2.03 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
80
81
82
83
84
import { define } from 'rstack';
import skillsLock from './skills-lock.json' with { type: 'json' };
define.lint(({ globals, js, rstestPlugin, ts }) => [
{
ignores: [
// TypeScript does not support source phase imports syntax
'tests/integration/wasm/static-source/src/utils.js',
],
},
js.configs.recommended,
ts.configs.recommended,
{
languageOptions: {
parserOptions: {
project: [
'./packages/*/tsconfig.json',
'./packages/core/tests/tsconfig.json',
'./examples/*/tsconfig.json',
'./examples/module-federation/*/tsconfig.json',
'./tests/tsconfig.json',
'./tests/scripts/tsconfig.json',
'./tests/type-tests/*/tsconfig.json',
],
},
},
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'preserve-caught-error': 'off',
},
},
{
files: ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'],
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
{
files: ['**/*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['**/*.test.{ts,tsx}'],
...rstestPlugin.configs.recommended,
rules: {
...rstestPlugin.configs.recommended.rules,
'rstest/expect-expect': [
'warn',
{
assertFunctionNames: [
'expect',
'assert',
'expect*',
'createAndValidate',
],
},
],
},
},
]);
define.fmt({
ignorePatterns: [
// Ignore installed Skills because their formatting may differ from this repository.
...Object.keys(skillsLock.skills).map((name) => `.agents/skills/${name}`),
],
plugins: ['heading-case'],
singleQuote: true,
sortPackageJson: true,
});
define.staged({
'*.{md,mdx,css,less,scss,json,jsonc,json5}': 'rs fmt',
'*.{js,jsx,ts,tsx,mjs,mjsx,cjs,cjsx,mts,mtsx,cts,ctsx}': [
'rs lint --type-check',
'rs fmt',
],
});