Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint and eslint config #310

Merged
merged 8 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

14 changes: 0 additions & 14 deletions .eslintrc

This file was deleted.

4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ updates:
- godber
- busma13
- sotojn
ignore:
- dependency-name: '@types/node'
versions:
- '>= 17.0.0'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ yarn add @terascope/fetch-github-release
### Usage

```javascript
const { downloadRelease } = require('@terascope/fetch-github-release');
import { downloadRelease } from '@terascope/fetch-github-release';

const user = 'some user';
const repo = 'some repo';
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import eslintConfig from '@terascope/eslint-config';

export default eslintConfig;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"build": "tsc --project tsconfig.json",
"build:watch": "yarn build --watch",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts .",
"lint": "eslint --ignore-pattern .gitignore",
"lint:fix": "yarn lint --fix",
"setup": "yarn && yarn build",
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
Expand Down Expand Up @@ -51,13 +51,13 @@
"yargs": "^17.2.1"
},
"devDependencies": {
"@terascope/eslint-config": "^0.8.0",
"@terascope/eslint-config": "^1.1.0",
"@types/jest": "^29.5.12",
"@types/multi-progress": "^2.0.6",
"@types/node": "^22.0.2",
"@types/stream-buffers": "^3.0.4",
"@types/tmp": "^0.2.1",
"eslint": "^8.1.0",
"eslint": "^9.13.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"nock": "^13.0.2",
Expand Down
14 changes: 8 additions & 6 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ downloadRelease(
filterAsset,
!!command.zipped,
!!command.quiet
).catch((err) => {
console.error(err);
process.exitCode = 1;
}).finally(() => {
process.exit();
});
)
.catch((err) => {
console.error(err);
process.exitCode = 1;
})
.finally(() => {
process.exit();
});
2 changes: 1 addition & 1 deletion src/getLatest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function getLatest(
releases: GithubRelease[],
filterRelease: (release: GithubRelease) => boolean = pass,
filterAsset: (release: GithubReleaseAsset) => boolean = pass
): GithubRelease|null {
): GithubRelease | null {
if (!releases) {
return null;
}
Expand Down
4 changes: 3 additions & 1 deletion test/extract-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { fileZip, fileTxt } from './utils/nockServer.js';
describe('#extract()', () => {
let tmpobj: tmp.DirResult;

beforeEach(() => { tmpobj = tmp.dirSync({ unsafeCleanup: true }); });
beforeEach(() => {
tmpobj = tmp.dirSync({ unsafeCleanup: true });
});
afterEach(() => tmpobj.removeCallback());

it('extracts a zip file', async () => {
Expand Down
Loading