@@ -3,7 +3,6 @@ import { defineConfig } from 'oxlint';
33
44export default defineConfig ( {
55 env : {
6- browser : true ,
76 builtin : true ,
87 es2024 : true ,
98 node : true ,
@@ -15,20 +14,63 @@ export default defineConfig({
1514 '@typescript-eslint/no-explicit-any' : 'off' ,
1615 '@nkzw/no-instanceof' : 'off' ,
1716 curly : 'off' ,
17+ 'import/default' : 'error' ,
1818 'import/no-duplicates' : 'error' ,
19+ 'import/namespace' : 'error' ,
1920 'import/no-namespace' : 'off' ,
21+ 'no-caller' : 'error' ,
2022 'no-console' : 'off' ,
2123 'no-empty' : [ 'error' , { allowEmptyCatch : true } ] ,
24+ 'no-eval' : 'error' ,
25+ 'no-iterator' : 'error' ,
26+ 'no-unassigned-vars' : 'error' ,
27+ 'no-unused-vars' : [
28+ 'error' ,
29+ {
30+ argsIgnorePattern : '^_' ,
31+ caughtErrorsIgnorePattern : '^_' ,
32+ destructuredArrayIgnorePattern : '^_' ,
33+ fix : {
34+ imports : 'safe-fix' ,
35+ variables : 'suggestion' ,
36+ } ,
37+ varsIgnorePattern : '^_' ,
38+ } ,
39+ ] ,
2240 'perfectionist/sort-object-types' : 'off' ,
2341 'perfectionist/sort-objects' : 'off' ,
2442 'perfectionist/sort-interfaces' : 'off' ,
2543 'perfectionist/sort-jsx-props' : 'off' ,
44+ 'typescript/await-thenable' : 'error' ,
45+ 'typescript/no-array-delete' : 'error' ,
46+ 'typescript/no-base-to-string' : 'error' ,
47+ 'typescript/no-duplicate-type-constituents' : 'error' ,
48+ 'typescript/no-floating-promises' : 'error' ,
49+ 'typescript/no-for-in-array' : 'error' ,
50+ 'typescript/no-implied-eval' : 'error' ,
51+ 'typescript/no-meaningless-void-operator' : 'error' ,
52+ 'typescript/no-misused-spread' : 'error' ,
53+ 'typescript/no-redundant-type-constituents' : 'error' ,
54+ 'typescript/no-this-alias' : 'error' ,
55+ 'typescript/no-unnecessary-parameter-property-assignment' : 'error' ,
56+ 'typescript/no-unsafe-unary-minus' : 'error' ,
57+ 'typescript/no-useless-default-assignment' : 'error' ,
58+ 'typescript/no-useless-empty-export' : 'error' ,
59+ 'typescript/require-array-sort-compare' : 'error' ,
60+ 'typescript/restrict-template-expressions' : 'error' ,
61+ 'typescript/unbound-method' : 'error' ,
2662 'unicorn/consistent-function-scoping' : 'off' ,
2763 'unicorn/numeric-separators-style' : 'off' ,
2864 'unicorn/prefer-top-level-await' : 'off' ,
2965 'unicorn/prefer-structured-clone' : 'off' ,
3066 } ,
3167 overrides : [
68+ {
69+ files : [ '**/*.ts' , '**/*.tsx' , '**/*.mts' , '**/*.cts' ] ,
70+ rules : {
71+ 'no-undef' : 'error' ,
72+ } ,
73+ } ,
3274 {
3375 files : [ 'src/**/*.ts' , 'packages/capture-kit/src/**/*.ts' ] ,
3476 rules : {
@@ -59,12 +101,27 @@ export default defineConfig({
59101 } ,
60102 {
61103 files : [ 'examples/test-app/src/**/*.tsx' ] ,
104+ env : {
105+ browser : true ,
106+ } ,
62107 rules : {
63108 'react/immutability' : 'off' ,
64109 'react/purity' : 'off' ,
65110 'react/refs' : 'off' ,
66111 } ,
67112 } ,
113+ {
114+ files : [ 'examples/test-app/src/**/*.ts' , 'examples/test-app/src/**/*.tsx' ] ,
115+ globals : {
116+ __DEV__ : 'readonly' ,
117+ } ,
118+ } ,
119+ {
120+ files : [ 'src/core/command-descriptor/registry.ts' ] ,
121+ globals : {
122+ __OWNER_FILES__ : 'readonly' ,
123+ } ,
124+ } ,
68125 {
69126 files : [ 'examples/test-app/app.config.js' ] ,
70127 rules : {
0 commit comments