@4mbl/lint 0.0.0-alpha.9b8878c → 0.0.0-alpha.9de7a1b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,207 @@
1
1
  # @4mbl/lint
2
2
 
3
+ ## 1.0.0-beta.34
4
+
5
+ ### Minor Changes
6
+
7
+ - 04a45e8: Upgrade dependencies
8
+
9
+ ## 1.0.0-beta.33
10
+
11
+ ### Minor Changes
12
+
13
+ - b41093d: Upgrade dependencies
14
+
15
+ ## 1.0.0-beta.32
16
+
17
+ ### Minor Changes
18
+
19
+ - 02f7629: Upgrade dependencies
20
+
21
+ ## 1.0.0-beta.31
22
+
23
+ ### Minor Changes
24
+
25
+ - ab2e6d6: [base] Disable eslint/one-var rule
26
+
27
+ ## 1.0.0-beta.30
28
+
29
+ ### Minor Changes
30
+
31
+ - 10abc93: Upgrade dependencies
32
+
33
+ ## 1.0.0-beta.29
34
+
35
+ ### Minor Changes
36
+
37
+ - fec850c: Migrate to native React Compiler rules
38
+
39
+ ## 1.0.0-beta.28
40
+
41
+ ### Patch Changes
42
+
43
+ - cd19ade: Preserve all config properties when extending presets
44
+
45
+ ## 1.0.0-beta.27
46
+
47
+ ### Minor Changes
48
+
49
+ - 10abc93: Upgrade dependencies
50
+
51
+ ### Patch Changes
52
+
53
+ - dcfb4b0: [react] Preserve inherited plugins.
54
+ - f48a223: [react] Scope JSX rules in React preset
55
+
56
+ ## 1.0.0-beta.26
57
+
58
+ ### Minor Changes
59
+
60
+ - 10abc93: Upgrade dependencies
61
+
62
+ ## 1.0.0-beta.25
63
+
64
+ ### Minor Changes
65
+
66
+ - b812b8d: Upgrade dependencies
67
+
68
+ ## 1.0.0-beta.24
69
+
70
+ ### Minor Changes
71
+
72
+ - c713974: [base] Enable type-check within oxlint
73
+ - 87a9f36: Upgrade dependencies
74
+
75
+ ## 1.0.0-beta.23
76
+
77
+ ### Minor Changes
78
+
79
+ - 09239e5: Upgrade dependencies
80
+
81
+ ## 1.0.0-beta.22
82
+
83
+ ### Minor Changes
84
+
85
+ - 75f5fe2: Upgrade dependencies
86
+
87
+ ## 1.0.0-beta.21
88
+
89
+ ### Minor Changes
90
+
91
+ - ae2bb06: [base] Disable unicorn/max-nested-calls rule
92
+
93
+ ## 1.0.0-beta.20
94
+
95
+ ### Minor Changes
96
+
97
+ - 0a0c233: Upgrade dependencies
98
+
99
+ ## 1.0.0-beta.19
100
+
101
+ ### Minor Changes
102
+
103
+ - 4d35fb5: [react] Disable react/jsx-no-literals rule
104
+
105
+ ## 1.0.0-beta.18
106
+
107
+ ### Minor Changes
108
+
109
+ - a50c3f4: Upgrade dependencies
110
+
111
+ ## 1.0.0-beta.17
112
+
113
+ ### Minor Changes
114
+
115
+ - f0f62f4: Upgrade dependencies
116
+
117
+ ## 1.0.0-beta.16
118
+
119
+ ### Minor Changes
120
+
121
+ - b303b6f: Upgrade dependencies
122
+
123
+ ## 1.0.0-beta.15
124
+
125
+ ### Minor Changes
126
+
127
+ - aa95edc: Upgrade dependencies
128
+
129
+ ## 1.0.0-beta.14
130
+
131
+ ### Minor Changes
132
+
133
+ - e34f9fe: Enable import plugin in base
134
+ - 5586655: Disable some import plugin rules in base
135
+ - 9b2b412: Disable `no-nodejs-modules` in node
136
+
137
+ ## 1.0.0-beta.13
138
+
139
+ ### Minor Changes
140
+
141
+ - dd66007: Pin dependencies to ensure future compatibility
142
+ - 0feb87d: Remove unused dependencies and inline trivial imports
143
+ - 1d98a33: Disable `react/forbid-component-props` and `react/forbid-dom-props` to ensure Tailwind compatibility
144
+ - a9085f2: Extend inherited plugins in child presets
145
+ - 014d999: Allow `eslint/no-underscore-dangle` for `__dirname` and `__filename` in node
146
+
147
+ ## 1.0.0-beta.12
148
+
149
+ ### Minor Changes
150
+
151
+ - aee0259: Upgrade dependencies
152
+
153
+ ## 1.0.0-beta.11
154
+
155
+ ### Minor Changes
156
+
157
+ - 20b3dae: Use native rules for React when possible
158
+
159
+ ## 1.0.0-beta.10
160
+
161
+ ### Minor Changes
162
+
163
+ - 007a287: Configure more rules to reduce noise
164
+ - 007a287: Use native only-export-components rule instead of js plugin
165
+ - 007a287: Use correct namespace for Next.js rules
166
+
167
+ ## 1.0.0-beta.9
168
+
169
+ ### Minor Changes
170
+
171
+ - 491164e: Add --help flag to cli
172
+ - 491164e: Fallback to Oxlint config lookup if no preset is passed to CLI and Oxlint config exists within working directory.
173
+
174
+ ## 1.0.0-beta.8
175
+
176
+ ### Minor Changes
177
+
178
+ - a78f42b: Configure rules to reduce noise
179
+
180
+ ## 1.0.0-beta.7
181
+
182
+ ### Minor Changes
183
+
184
+ - 7c82f22: Upgrade dependencies
185
+
186
+ ## 1.0.0-beta.6
187
+
188
+ ### Minor Changes
189
+
190
+ - 0422e86: Upgrade dependencies
191
+
192
+ ## 1.0.0-beta.5
193
+
194
+ ### Minor Changes
195
+
196
+ - 125b851: Enable most rule categories
197
+ - 473bad0: Upgrade dependencies
198
+
199
+ ## 1.0.0-beta.4
200
+
201
+ ### Minor Changes
202
+
203
+ - 10abc93: Upgrade dependencies
204
+
3
205
  ## 1.0.0-beta.3
4
206
 
5
207
  ### Minor Changes
package/bin/cli.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { spawnSync } from 'node:child_process';
4
+ import { existsSync } from 'node:fs';
4
5
  import path from 'node:path';
5
6
  import { fileURLToPath } from 'node:url';
6
7
 
@@ -15,11 +16,38 @@ const wrapperArgs =
15
16
  separatorIndex === -1 ? rawArgs : rawArgs.slice(0, separatorIndex);
16
17
  const toolArgs = separatorIndex === -1 ? [] : rawArgs.slice(separatorIndex + 1);
17
18
 
19
+ if (wrapperArgs.includes('--help') || rawArgs.includes('-h')) {
20
+ console.log(`
21
+ Usage:
22
+ lint [options] -- [oxlint options]
23
+
24
+ Options:
25
+ --preset <name> Use a preset config (default: base if no config within cwd)
26
+
27
+ Examples:
28
+ lint
29
+ lint --preset node
30
+ lint -- src --fix
31
+
32
+ Notes:
33
+ Everything after "--" is passed directly to oxlint.
34
+ `);
35
+
36
+ process.exit(0);
37
+ }
38
+
18
39
  const presetArgIndex = wrapperArgs.findIndex((a) => a === '--preset');
40
+
19
41
  const presetName =
20
- presetArgIndex !== -1 ? wrapperArgs[presetArgIndex + 1] : 'base';
42
+ presetArgIndex !== -1
43
+ ? wrapperArgs[presetArgIndex + 1]
44
+ : !existsSync('./oxlint.config.ts') && !existsSync('./.oxlintrc.json')
45
+ ? 'base'
46
+ : undefined;
21
47
 
22
- const configPath = path.resolve(__dirname, `../dist/${presetName}.js`);
48
+ const configPath = presetName
49
+ ? path.resolve(__dirname, `../dist/${presetName}.js`)
50
+ : undefined;
23
51
 
24
52
  const hasPath = toolArgs.some((a) => !a.startsWith('-'));
25
53
  const hasMaxWarn = toolArgs.some((a) => a.startsWith('--max-warnings'));
@@ -28,7 +56,7 @@ const hasReportUnused = toolArgs.some((a) =>
28
56
  );
29
57
 
30
58
  const finalArgs = [
31
- '--config',
59
+ configPath ? '--config' : undefined,
32
60
  configPath,
33
61
  hasPath ? undefined : 'src',
34
62
  hasMaxWarn ? undefined : '--max-warnings=0',