Skip to content

Commit

Permalink
update eslint-plugin-import
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 12, 2023
1 parent f3464a7 commit 4eeb86b
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 70 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/core-js/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var fs = require('fs');
var os = require('os');
var path = require('path');
var env = process.env;

var env = process.env;
var ADBLOCK = is(env.ADBLOCK);
var COLOR = is(env.npm_config_color);
var DISABLE_OPENCOLLECTIVE = is(env.DISABLE_OPENCOLLECTIVE);
Expand Down
6 changes: 3 additions & 3 deletions scripts/bundle-tests/package-lock.json

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

2 changes: 1 addition & 1 deletion tests/entries/unit.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-dynamic-require, node/global-require -- required */
import { ok } from 'assert';
const entries = await fs.readJson('packages/core-js-compat/entries.json');

const entries = await fs.readJson('packages/core-js-compat/entries.json');
const expected = new Set(Object.keys(entries));
const tested = new Set();
let PATH;
Expand Down
7 changes: 6 additions & 1 deletion tests/eslint/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const pluginQUnit = require('eslint-plugin-qunit');
const pluginRegExp = require('eslint-plugin-regexp');
const pluginSonarJS = require('eslint-plugin-sonarjs');
const pluginUnicorn = require('eslint-plugin-unicorn');

const PACKAGES_NODE_VERSIONS = require('core-js-builder/package').engines.node;

const DEV_NODE_VERSIONS = '^16.13';

const ERROR = 'error';
Expand Down Expand Up @@ -322,6 +322,8 @@ const base = {
// import:
// ensure all imports appear before other statements
'import/first': ERROR,
// enforce a newline after import statements
'import/newline-after-import': ERROR,
// forbid import of modules using absolute paths
'import/no-absolute-path': ERROR,
// forbid AMD imports
Expand All @@ -332,6 +334,8 @@ const base = {
'import/no-duplicates': ERROR,
// forbid `require()` calls with expressions
'import/no-dynamic-require': ERROR,
// forbid empty named import blocks
'import/no-empty-named-blocks': ERROR,
// forbid imports with CommonJS exports
'import/no-import-module-exports': ERROR,
// prevent importing packages through relative paths
Expand Down Expand Up @@ -1180,6 +1184,7 @@ module.exports = [
'packages/core-js-pure/override/**',
'tests/**/bundles/**',
'tests/compat/compat-data.js',
'tests/unit-@(global|pure)/index.js',
],
},
{
Expand Down
139 changes: 104 additions & 35 deletions tests/eslint/package-lock.json

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

2 changes: 1 addition & 1 deletion tests/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"eslint-plugin-array-func": "^3.1.8",
"eslint-plugin-es-x": "^5.4.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.4",
"eslint-plugin-jsonc": "^2.6.0",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-promise": "^6.1.1",
Expand Down
6 changes: 3 additions & 3 deletions tests/observables/package-lock.json

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

Loading

0 comments on commit 4eeb86b

Please sign in to comment.