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

publish beta eslint-config for new rule no side effects #147

Closed
wants to merge 3 commits into from
Closed
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
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@checkdigit/eslint-config",
"version": "10.1.0",
"version": "10.1.1",
"private": false,
"description": "Check Digit standard eslint configuration",
"keywords": [
Expand Down Expand Up @@ -43,7 +43,7 @@
"jest": "^29.7.0"
},
"peerDependencies": {
"@checkdigit/eslint-plugin": "7.0.0",
"@checkdigit/eslint-plugin": "7.1.0-PR.66-63da",
"@eslint/compat": "1.2.1",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.13.0",
Expand Down
1 change: 1 addition & 0 deletions src/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ function hello(_) {
return -1n + 1n + 10n;
}

// eslint-disable-next-line @checkdigit/no-side-effects
hello();
1 change: 1 addition & 0 deletions src/javascript.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ function hello(_) {
return 1;
}

// eslint-disable-next-line @checkdigit/no-side-effects
hello();
2 changes: 2 additions & 0 deletions src/typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ function testHello(_?: string): number {
});

// uuid: 'c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd' <- ok since this is a test file

testHello(undefined);

async function* paginator() {
// no yield required since this is a test file
throw new Error('should not be called');
}

paginator();

// eslint-disable-next-line @typescript-eslint/no-implied-eval
Expand Down
3 changes: 3 additions & 0 deletions src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ function hello(_?: string): bigint {

// eslint-disable-next-line @checkdigit/no-uuid
// uuid: 'c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd' <- not ok since this is a non-test file

hello();

// eslint-disable-next-line require-yield
async function* paginator() {
throw new Error('should not be called');
}

paginator();

// eslint-disable-next-line @typescript-eslint/no-for-in-array,guard-for-in,no-magic-numbers
Expand Down Expand Up @@ -91,6 +93,7 @@ assert(`I'm a boolean, ${booleanValue}`);
assert(`I'm a object, ${objectValue}`);

// linting error is not reported because n/no-unsupported-features/node-builtins is disabled
// eslint-disable-next-line @checkdigit/no-side-effects
await fetch('https://example.com');

// test rule @checkdigit/invalid-json-stringify
Expand Down