-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrstack.config.mts
More file actions
55 lines (50 loc) · 1.17 KB
/
Copy pathrstack.config.mts
File metadata and controls
55 lines (50 loc) · 1.17 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
// Configuration guide: https://rstack.rs/config
import path from 'node:path';
import { define } from 'rstack';
const pluginPath = path.resolve(import.meta.dirname, 'lib/index.js');
define.test({
include: ['tests/**/*.test.js'],
testEnvironment: 'node',
testTimeout: 30_000,
restoreMocks: true,
output: {
externals: {
'../../lib/index.js': `commonjs ${pluginPath}`,
},
},
pool: {
maxWorkers: 1,
},
});
define.fmt({
singleQuote: true,
proseWrap: 'never',
});
define.staged({
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint', 'rs fmt'],
'*.{json,md,mdx,css,scss,less,html,yml,yaml}': 'rs fmt',
});
define.lint(({ js, ts }) => [
js.configs.recommended,
ts.configs.recommended,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['examples/**/*', 'spec/**/*'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['lib/**/*.js'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/prefer-as-const': 'off',
},
},
]);