Skip to content

Commit

Permalink
Merge branch 'master' into eslint-remote-tester
Browse files Browse the repository at this point in the history
* master: (31 commits)
  chore: use ecmaVersion latest for eslint (platinumazure#379)
  chore: use node protocol for imports (platinumazure#378)
  upgrade: Upgrade dependencies in preparation for major release (platinumazure#377)
  feat!: Require eslint@^8.38, drop support for eslint@7.x (platinumazure#376)
  feat!: change require-expect rule default option to never-except-zero (platinumazure#375)
  feat!: strictly define node API (platinumazure#374)
  feat!: drop support for Node 12, 14, 17, 19 (platinumazure#373)
  Upgrade: Bump semver from 7.5.0 to 7.5.3 (platinumazure#372)
  Upgrade: Bump @typescript-eslint/parser from 5.59.0 to 5.60.0 (platinumazure#371)
  Upgrade: Bump release-it from 15.10.1 to 15.11.0 (platinumazure#366)
  Upgrade: Bump markdownlint-cli from 0.33.0 to 0.35.0 (platinumazure#370)
  Upgrade: Bump all-contributors-cli from 6.24.0 to 6.26.0 (platinumazure#359)
  Upgrade: Bump eslint-plugin-eslint-plugin from 5.0.8 to 5.1.0 (platinumazure#357)
  Upgrade: Bump vm2 from 3.9.17 to 3.9.19 (platinumazure#355)
  Upgrade: Bump eslint from 8.38.0 to 8.39.0 (platinumazure#342)
  Upgrade: Bump vm2 from 3.9.16 to 3.9.17 (platinumazure#341)
  Upgrade: Bump @typescript-eslint/parser from 5.54.1 to 5.59.0 (platinumazure#340)
  Upgrade: Bump eslint from 8.36.0 to 8.38.0 (platinumazure#335)
  Upgrade: Bump semver from 7.3.8 to 7.5.0 (platinumazure#339)
  Upgrade: Bump vm2 from 3.9.11 to 3.9.16 (platinumazure#336)
  ...
  • Loading branch information
bmish committed Jun 28, 2023
2 parents 0b6d61b + e2c206e commit 87c5b15
Show file tree
Hide file tree
Showing 19 changed files with 3,046 additions and 17,781 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"parserOptions": {
"sourceType": "script",
"ecmaVersion": 2019
"ecmaVersion": "latest"
},

"plugins": ["node", "eslint-plugin"],
Expand Down Expand Up @@ -182,8 +182,8 @@
"unicorn/filename-case": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-null": "off",
"unicorn/prefer-at": "off", // TODO: enable once we raise Node requirement to v16.6.0
"unicorn/prefer-module": "off",
"unicorn/prefer-node-protocol": "off", // TODO: enable once we raise Node requirement to v16.0.0, v14.18.0.
"unicorn/prevent-abbreviations": "off"
},

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu, windows ]
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,7 +28,6 @@ jobs:

- run: npm ci
- run: npm run test:unit
- run: npm install --save-dev eslint@7 && npm run test:unit

- name: Coveralls
uses: coverallsapp/github-action@master
Expand All @@ -42,6 +41,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "20.x"
- run: npm ci
- run: npm run lint
4 changes: 2 additions & 2 deletions docs/rules/require-expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test. This rule checks for `expect` at linting time.

The "always" option requires that `expect` is called in each test.

The "except-simple" (**default**) option only requires an `expect` call when an assertion is
The "except-simple" option only requires an `expect` call when an assertion is
called inside of a block or when `assert` is passed to another function. The
rationale here is that by wrapping `assert` statements in conditional blocks
or callbacks, developers are at risk of creating tests that incorrectly pass
Expand All @@ -26,7 +26,7 @@ resilience in QUnit 2.0 for tracking asynchronous activity, projects may
prefer to discourage use of redundant `assert.expect` calls in tests. This
option codifies such convention.

The "never-except-zero" option disallows `except` calls, except when used to
The "never-except-zero" option (**default**) disallows `except` calls, except when used to
explicitly assert that a test performs no assertions, which would otherwise
be considered an error.

Expand Down
6 changes: 4 additions & 2 deletions eslint-remote-tester.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
"use strict";

const fs = require("fs");
const fs = require("node:fs");

/** @type {import('eslint-remote-tester').Config} */
module.exports = {
/** Repositories to scan */
repositories: [
// A few dozen top repositories using QUnit or this plugin.
"DevExpress/DevExtreme",
"adopted-ember-addons/ember-data-model-fragments",
"balanced/balanced-dashboard",
"ember-intl/ember-intl",
"emberjs/ember.js",
"getsentry/sentry-javascript",
"glimmerjs/glimmer-vm",
Expand All @@ -17,7 +20,6 @@ module.exports = {
"jquery/jquery",
"js-cookie/js-cookie",
"l10n-tw/canvas-lms",
"mrdoob/three.js",
"rust-lang/crates.io",
"simonihmig/ember-responsive-image",
"videojs/video.js"
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/assert-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/literal-compare-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-assert-equal-boolean.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-assert-equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils"),
{ ReferenceTracker } = require("eslint-utils");

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-async-in-loops.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
"use strict";

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-compare-relation-boolean.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-negated-ok.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
"use strict";

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

const ASSERTION_OPPOSITES = {
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-throws-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@ module.exports = {
"except-simple": ExceptSimpleStrategy,
"never": NeverStrategy,
"never-except-zero": NeverExceptZeroStrategy
}[context.options[0]] || ExceptSimpleStrategy;
}[context.options[0]] || NeverExceptZeroStrategy;
}
};
2 changes: 1 addition & 1 deletion lib/rules/require-object-in-propequal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert"),
const assert = require("node:assert"),
utils = require("../utils");

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
"use strict";

const assert = require("assert");
const assert = require("node:assert");

const SUPPORTED_TEST_IDENTIFIERS = new Set(["test", "asyncTest", "only"]);

Expand Down

0 comments on commit 87c5b15

Please sign in to comment.