Skip to content

Commit 4eeb86b

Browse files
committed
update eslint-plugin-import
1 parent f3464a7 commit 4eeb86b

File tree

9 files changed

+144
-70
lines changed

9 files changed

+144
-70
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core-js/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
var fs = require('fs');
22
var os = require('os');
33
var path = require('path');
4-
var env = process.env;
54

5+
var env = process.env;
66
var ADBLOCK = is(env.ADBLOCK);
77
var COLOR = is(env.npm_config_color);
88
var DISABLE_OPENCOLLECTIVE = is(env.DISABLE_OPENCOLLECTIVE);

scripts/bundle-tests/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/entries/unit.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable import/no-dynamic-require, node/global-require -- required */
22
import { ok } from 'assert';
3-
const entries = await fs.readJson('packages/core-js-compat/entries.json');
43

4+
const entries = await fs.readJson('packages/core-js-compat/entries.json');
55
const expected = new Set(Object.keys(entries));
66
const tested = new Set();
77
let PATH;

tests/eslint/eslint.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const pluginQUnit = require('eslint-plugin-qunit');
1313
const pluginRegExp = require('eslint-plugin-regexp');
1414
const pluginSonarJS = require('eslint-plugin-sonarjs');
1515
const pluginUnicorn = require('eslint-plugin-unicorn');
16-
1716
const PACKAGES_NODE_VERSIONS = require('core-js-builder/package').engines.node;
17+
1818
const DEV_NODE_VERSIONS = '^16.13';
1919

2020
const ERROR = 'error';
@@ -322,6 +322,8 @@ const base = {
322322
// import:
323323
// ensure all imports appear before other statements
324324
'import/first': ERROR,
325+
// enforce a newline after import statements
326+
'import/newline-after-import': ERROR,
325327
// forbid import of modules using absolute paths
326328
'import/no-absolute-path': ERROR,
327329
// forbid AMD imports
@@ -332,6 +334,8 @@ const base = {
332334
'import/no-duplicates': ERROR,
333335
// forbid `require()` calls with expressions
334336
'import/no-dynamic-require': ERROR,
337+
// forbid empty named import blocks
338+
'import/no-empty-named-blocks': ERROR,
335339
// forbid imports with CommonJS exports
336340
'import/no-import-module-exports': ERROR,
337341
// prevent importing packages through relative paths
@@ -1180,6 +1184,7 @@ module.exports = [
11801184
'packages/core-js-pure/override/**',
11811185
'tests/**/bundles/**',
11821186
'tests/compat/compat-data.js',
1187+
'tests/unit-@(global|pure)/index.js',
11831188
],
11841189
},
11851190
{

tests/eslint/package-lock.json

Lines changed: 104 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"eslint-plugin-array-func": "^3.1.8",
77
"eslint-plugin-es-x": "^5.4.0",
88
"eslint-plugin-eslint-comments": "^3.2.0",
9-
"eslint-plugin-import": "^2.26.0",
9+
"eslint-plugin-import": "^2.27.4",
1010
"eslint-plugin-jsonc": "^2.6.0",
1111
"eslint-plugin-n": "^15.6.1",
1212
"eslint-plugin-promise": "^6.1.1",

tests/observables/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)