-
-
Notifications
You must be signed in to change notification settings - Fork 790
Expand file tree
/
Copy pathrslint.config.ts
More file actions
44 lines (43 loc) · 1.25 KB
/
rslint.config.ts
File metadata and controls
44 lines (43 loc) · 1.25 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
import { defineConfig, ts } from '@rslint/core';
export default defineConfig([
{
// Global ignores — entry with only `ignores` excludes matching files from all rules
ignores: [
'packages/rspack/src/runtime/moduleFederationDefaultRuntime.js',
'packages/rspack/compiled/**',
'**/tests/**',
],
},
ts.configs.recommended,
{
languageOptions: {
parserOptions: {
project: ['./packages/rspack/tsconfig.json'],
},
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/default-param-last': 'error',
'@typescript-eslint/prefer-literal-enum-member': [
'error',
{ allowBitwiseExpressions: true },
],
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'no-constant-binary-expression': 'off',
'no-empty': 'off',
'prefer-spread': 'off',
},
},
{
files: ['**/*.d.ts'],
rules: {
'no-var': 'off',
},
},
]);