@kitql/eslint-config 0.8.0-next.0 → 0.8.0-next.1

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.
Files changed (2) hide show
  1. package/cmd.js +5 -2
  2. package/package.json +3 -3
package/cmd.js CHANGED
@@ -23,6 +23,7 @@ program.addOption(new Option('--lint-only', 'only run lint').default(false))
23
23
  program.addOption(new Option('--format-only', 'only run format').default(false))
24
24
  program.addOption(new Option('--verbose', 'add more logs').default(false))
25
25
  program.addOption(new Option('--ox', 'using oxc tooling').default(false))
26
+ program.addOption(new Option('--oxt', 'using oxc & type aware').default(false))
26
27
  program.addOption(
27
28
  new Option('-d, --diff-only', 'only check files changed against base branch').default(false),
28
29
  )
@@ -52,6 +53,7 @@ const formatOnly = options_cli.formatOnly ?? false
52
53
  const diffOnly = options_cli.diffOnly ?? false
53
54
  const baseBranch = options_cli.baseBranch ?? 'main'
54
55
  const using_ox = options_cli.ox ?? false
56
+ const using_oxt = options_cli.oxt ?? false
55
57
 
56
58
  let preToUse = ''
57
59
  if (pre === 'npm') {
@@ -275,7 +277,8 @@ async function getDiffFiles() {
275
277
 
276
278
  async function lintRunOx() {
277
279
  const cmdLint =
278
- `oxlint --type-aware` +
280
+ `oxlint` +
281
+ `${using_oxt ? ' --type-aware' : ''}` +
279
282
  // format or not
280
283
  `${format ? ' --fix' : ''}` +
281
284
  ` ${glob}`
@@ -288,7 +291,7 @@ async function lintRunOx() {
288
291
  }
289
292
 
290
293
  async function lintRun() {
291
- if (using_ox) {
294
+ if (using_ox || using_oxt) {
292
295
  const result_lint = await lintRunOx()
293
296
  if (typeof result_lint === 'object' && 'status' in result_lint && result_lint.status) {
294
297
  return result_lint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitql/eslint-config",
3
- "version": "0.8.0-next.0",
3
+ "version": "0.8.0-next.1",
4
4
  "type": "module",
5
5
  "description": "opinionated linting and formatting for projects",
6
6
  "repository": {
@@ -68,10 +68,10 @@
68
68
  },
69
69
  "sideEffects": false,
70
70
  "scripts": {
71
- "format": "node ./cmd.js -f -d --verbose --ox",
71
+ "format": "node ./cmd.js -f -d --verbose --oxt",
72
72
  "format:example": "kitql-lint --format",
73
73
  "inspector": "npx @eslint/config-inspector",
74
- "lint": "node ./cmd.js --verbose -p none --ox",
74
+ "lint": "node ./cmd.js --verbose -p none --oxt",
75
75
  "lint:example": "kitql-lint"
76
76
  }
77
77
  }