Skip to content

Commit

Permalink
AG-37952 Fix init command in CLI
Browse files Browse the repository at this point in the history
Merge in ADGUARD-FILTERS/aglint from fix/AG-37952 to master

Squashed commit of the following:

commit 63fd90c
Author: scripthunter7 <[email protected]>
Date:   Mon Nov 25 14:31:33 2024 +0100

    upd changelog

commit 32dff7e
Author: scripthunter7 <[email protected]>
Date:   Mon Nov 25 14:30:16 2024 +0100

    bump version and fill changelog

commit f46d63d
Author: scripthunter7 <[email protected]>
Date:   Mon Nov 25 14:28:47 2024 +0100

    fix imports
  • Loading branch information
scripthunter7 committed Nov 25, 2024
1 parent c245157 commit 2abd451
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ The format is based on [Keep a Changelog][keepachangelog], and this project adhe
[keepachangelog]: https://keepachangelog.com/en/1.0.0/
[semver]: https://semver.org/spec/v2.0.0.html

## [2.1.2] - 2024-11-25

### Fixed

- `npx aglint init` does not work [#225].

[2.1.2]: https://github.com/AdguardTeam/AGLint/compare/v2.1.1...v2.1.2
[#225]: https://github.com/AdguardTeam/AGLint/issues/225


## [2.1.1] - 2024-09-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adguard/aglint",
"version": "2.1.1",
"version": "2.1.2",
"description": "Universal adblock filter list linter.",
"keywords": [
"adblock",
Expand Down
8 changes: 6 additions & 2 deletions src/index.cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import { AdblockSyntax } from '@adguard/agtree';
import { program } from 'commander';
import checkbox from '@inquirer/checkbox';
import select from '@inquirer/select';
import { readdir, writeFile } from 'fs/promises';
import { join } from 'path';
import yaml from 'js-yaml';
Expand All @@ -20,6 +18,12 @@ import {
import { CONFIG_FILE_NAMES, JSON_RC_CONFIG_FILE_NAME, YAML_RC_CONFIG_FILE_NAME } from './linter/cli/constants';
import { NEWLINE } from './common/constants';

// TODO: Change after switching to ESM (AG-37988), also need to check CLI with smoke tests (AG-35852)
// eslint-disable-next-line @typescript-eslint/no-var-requires
const checkbox = require('@inquirer/checkbox').default;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const select = require('@inquirer/select').default;

/**
* Represents possible config file formats.
*/
Expand Down

0 comments on commit 2abd451

Please sign in to comment.