Merge branch 'main' into dependabot/npm_and_yarn/typescript-eslint/parser-4.29.1

This commit is contained in:
Henry Mercer 2021-08-11 15:12:11 +01:00 committed by GitHub
commit 5fd8ca8122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
237 changed files with 10113 additions and 5024 deletions

View file

@ -14,11 +14,14 @@
],
"rules": {
"filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"],
"i18n-text/no-en": "off",
"import/extensions": "error",
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/no-dynamic-require": "error",
"import/no-extraneous-dependencies": ["error"],
// Disable the rule that checks that devDependencies aren't imported since we use a single
// linting configuration file for both source and test code.
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"import/no-namespace": "off",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
@ -48,7 +51,8 @@
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"func-style": "off"
"func-style": "off",
"sort-imports": "off"
}
}]
}

View file

@ -17,8 +17,6 @@ jobs:
versions: ${{ steps.compare.outputs.versions }}
permissions:
actions: read
contents: read
security-events: write
steps:
@ -68,8 +66,6 @@ jobs:
runs-on: ${{ matrix.os }}
permissions:
actions: read
contents: read
security-events: write
steps:

View file

@ -350,13 +350,12 @@ jobs:
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY"
if [[ "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
# Skip `tools: latest` since it would be the same as `tools: null`
VERSIONS_JSON="[null, \"$NIGHTLY_URL\"]"
else
# Run integration tests with all three bundles.
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
fi
# Run integration tests with all three bundles, even if `tools: latest` would be the same as
# `tools: null`. This allows us to make all three kinds of integration tests required status
# checks on PRs.
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
# Output a JSON-encoded list with the distinct versions to test against.
echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
echo "::set-output name=versions::${VERSIONS_JSON}"

View file

@ -2,7 +2,11 @@
## [UNRELEASED]
No user facing changes.
- Update README to include a sample permissions block. [#689](https://github.com/github/codeql-action/pull/689)
## 1.0.11 - 09 Aug 2021
- Update default CodeQL bundle version to 2.5.9. [#687](https://github.com/github/codeql-action/pull/687)
## 1.0.10 - 03 Aug 2021

View file

@ -42,6 +42,14 @@ jobs:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v2

View file

@ -26,7 +26,7 @@ const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const ava_1 = __importDefault(require("ava"));
const yaml = __importStar(require("js-yaml"));
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const actionsutil = __importStar(require("./actions-util"));
const testing_utils_1 = require("./testing-utils");
const util_1 = require("./util");
@ -43,7 +43,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_SHA still checked out", a
const currentSha = "a".repeat(40);
process.env["GITHUB_REF"] = expectedRef;
process.env["GITHUB_SHA"] = currentSha;
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
const callback = sinon.stub(actionsutil, "getCommitOid");
callback.withArgs("HEAD").resolves(currentSha);
const actualRef = await actionsutil.getRef();
t.deepEqual(actualRef, expectedRef);
@ -54,7 +54,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_REF still checked out but
process.env["GITHUB_REF"] = expectedRef;
process.env["GITHUB_SHA"] = "b".repeat(40);
const sha = "a".repeat(40);
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
const callback = sinon.stub(actionsutil, "getCommitOid");
callback.withArgs("refs/remotes/pull/1/merge").resolves(sha);
callback.withArgs("HEAD").resolves(sha);
const actualRef = await actionsutil.getRef();
@ -64,7 +64,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_REF still checked out but
ava_1.default("getRef() returns head PR ref if GITHUB_REF no longer checked out", async (t) => {
process.env["GITHUB_REF"] = "refs/pull/1/merge";
process.env["GITHUB_SHA"] = "a".repeat(40);
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
const callback = sinon.stub(actionsutil, "getCommitOid");
callback.withArgs("refs/pull/1/merge").resolves("a".repeat(40));
callback.withArgs("HEAD").resolves("b".repeat(40));
const actualRef = await actionsutil.getRef();

File diff suppressed because one or more lines are too long

4
lib/analyze.test.js generated
View file

@ -27,7 +27,7 @@ const path = __importStar(require("path"));
const ava_1 = __importDefault(require("ava"));
const yaml = __importStar(require("js-yaml"));
const semver_1 = require("semver");
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const analyze_1 = require("./analyze");
const codeql_1 = require("./codeql");
const count_loc_1 = require("./count-loc");
@ -46,7 +46,7 @@ ava_1.default("status report fields and search path setting", async (t) => {
obj[lang] = i + 1;
return obj;
}, {});
sinon_1.default.stub(count, "countLoc").resolves(mockLinesOfCode);
sinon.stub(count, "countLoc").resolves(mockLinesOfCode);
let searchPathsUsed = [];
return await util.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);

File diff suppressed because one or more lines are too long

View file

@ -24,7 +24,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const githubUtils = __importStar(require("@actions/github/lib/utils"));
const ava_1 = __importDefault(require("ava"));
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const api_client_1 = require("./api-client");
const testing_utils_1 = require("./testing-utils");
const util_1 = require("./util");
@ -34,8 +34,8 @@ testing_utils_1.setupTests(ava_1.default);
let pluginStub;
let githubStub;
ava_1.default.beforeEach(() => {
pluginStub = sinon_1.default.stub(githubUtils.GitHub, "plugin");
githubStub = sinon_1.default.stub();
pluginStub = sinon.stub(githubUtils.GitHub, "plugin");
githubStub = sinon.stub();
pluginStub.returns(githubStub);
util_1.initializeEnvironment(util_1.Mode.actions, pkg.version);
});

View file

@ -1 +1 @@
{"version":3,"file":"api-client.test.js","sourceRoot":"","sources":["../src/api-client.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAyD;AACzD,8CAA6C;AAC7C,kDAA0B;AAE1B,6CAA4C;AAC5C,mDAA6C;AAC7C,iCAAqD;AAErD,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,0BAAU,CAAC,aAAI,CAAC,CAAC;AAEjB,IAAI,UAA2B,CAAC;AAChC,IAAI,UAA2B,CAAC;AAEhC,aAAI,CAAC,UAAU,CAAC,GAAG,EAAE;IACnB,UAAU,GAAG,eAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtD,UAAU,GAAG,eAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/B,4BAAqB,CAAC,WAAI,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,oBAAoB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CACJ,CAAC,EACD;QACE,IAAI,EAAE,KAAK;QACX,gBAAgB,EAAE,KAAK;QACvB,GAAG,EAAE,gBAAgB;KACtB,EACD,SAAS,EACT;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,uBAAuB;QAChC,SAAS,EAAE,iBAAiB,GAAG,CAAC,OAAO,EAAE;KAC1C,CACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,6BAA6B,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;I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E,IAAI,EAAE,EACvB;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,uBAAuB;QAChC,SAAS,EAAE,iBAAiB,GAAG,CAAC,OAAO,EAAE;KAC1C,CACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,yCAAyC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC1D,MAAM,CACJ,CAAC,EACD;QACE,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,gBAAgB;KACtB,EACD,EAAE,aAAa,EAAE,IAAI,EAAE,EACvB;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,uBAAuB;QAChC,SAAS,EAAE,iBAAiB,GAAG,CAAC,OAAO,EAAE;KAC1C,CACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,oCAAoC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACrD,MAAM,CACJ,CAAC,EACD;QACE,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,qCAAqC;KAC3C,EACD,SAAS,EACT;QACE,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,wBAAwB;QACjC,SAAS,EAAE,iBAAiB,GAAG,CAAC,OAAO,EAAE;KAC1C,CACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,MAAM,CACb,CAA4B,EAC5B,UAAe,EACf,aAAkB,EAClB,QAAa;IAEb,yBAAY,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAExC,MAAM,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,iEAAiE;IACjE,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5B,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACzC,CAAC"}

View file

@ -27,7 +27,7 @@ const path = __importStar(require("path"));
const github = __importStar(require("@actions/github"));
const ava_1 = __importDefault(require("ava"));
const semver_1 = require("semver");
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const api = __importStar(require("./api-client"));
const codeql_1 = require("./codeql");
const configUtils = __importStar(require("./config-utils"));
@ -54,10 +54,10 @@ function mockGetContents(content) {
const response = {
data: content,
};
const spyGetContents = sinon_1.default
const spyGetContents = sinon
.stub(client.repos, "getContent")
.resolves(response);
sinon_1.default.stub(api, "getApiClient").value(() => client);
sinon.stub(api, "getApiClient").value(() => client);
return spyGetContents;
}
function mockListLanguages(languages) {
@ -69,8 +69,8 @@ function mockListLanguages(languages) {
for (const language of languages) {
response.data[language] = 123;
}
sinon_1.default.stub(client.repos, "listLanguages").resolves(response);
sinon_1.default.stub(api, "getApiClient").value(() => client);
sinon.stub(client.repos, "listLanguages").resolves(response);
sinon.stub(api, "getApiClient").value(() => client);
}
ava_1.default("load empty config", async (t) => {
return await util.withTmpDir(async (tmpDir) => {

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs"));
const github = __importStar(require("@actions/github"));
const ava_1 = __importDefault(require("ava"));
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const actionsUtil = __importStar(require("./actions-util"));
const apiClient = __importStar(require("./api-client"));
const codeql_1 = require("./codeql");
@ -83,7 +83,7 @@ function getRecordingLogger(messages) {
function mockHttpRequests(optInStatusCode, databaseUploadStatusCode) {
// Passing an auth token is required, so we just use a dummy value
const client = github.getOctokit("123");
const requestSpy = sinon_1.default.stub(client, "request");
const requestSpy = sinon.stub(client, "request");
const optInSpy = requestSpy.withArgs("GET /repos/:owner/:repo/code-scanning/codeql/databases");
if (optInStatusCode < 300) {
optInSpy.resolves(undefined);
@ -100,16 +100,16 @@ function mockHttpRequests(optInStatusCode, databaseUploadStatusCode) {
databaseUploadSpy.throws(new util_1.HTTPError("some error message", databaseUploadStatusCode));
}
}
sinon_1.default.stub(apiClient, "getApiClient").value(() => client);
sinon.stub(apiClient, "getApiClient").value(() => client);
}
ava_1.default("Abort database upload if 'upload-database' input set to false", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("false");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
const loggedMessages = [];
await database_upload_1.uploadDatabases(testRepoName, getTestConfig(tmpDir), testApiDetails, getRecordingLogger(loggedMessages));
t.assert(loggedMessages.find((v) => v.type === "debug" &&
@ -119,11 +119,11 @@ ava_1.default("Abort database upload if 'upload-database' input set to false", a
ava_1.default("Abort database upload if running against GHES", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
const config = getTestConfig(tmpDir);
config.gitHubVersion = { type: util_1.GitHubVariant.GHES, version: "3.0" };
const loggedMessages = [];
@ -135,11 +135,11 @@ ava_1.default("Abort database upload if running against GHES", async (t) => {
ava_1.default("Abort database upload if running against GHAE", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
const config = getTestConfig(tmpDir);
config.gitHubVersion = { type: util_1.GitHubVariant.GHAE };
const loggedMessages = [];
@ -151,11 +151,11 @@ ava_1.default("Abort database upload if running against GHAE", async (t) => {
ava_1.default("Abort database upload if not analyzing default branch", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(false);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(false);
const loggedMessages = [];
await database_upload_1.uploadDatabases(testRepoName, getTestConfig(tmpDir), testApiDetails, getRecordingLogger(loggedMessages));
t.assert(loggedMessages.find((v) => v.type === "debug" &&
@ -165,11 +165,11 @@ ava_1.default("Abort database upload if not analyzing default branch", async (t)
ava_1.default("Abort database upload if opt-in request returns 404", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
mockHttpRequests(404);
codeql_1.setCodeQL({
async databaseBundle() {
@ -186,11 +186,11 @@ ava_1.default("Abort database upload if opt-in request returns 404", async (t) =
ava_1.default("Abort database upload if opt-in request fails with something other than 404", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
mockHttpRequests(500);
codeql_1.setCodeQL({
async databaseBundle() {
@ -207,11 +207,11 @@ ava_1.default("Abort database upload if opt-in request fails with something othe
ava_1.default("Don't crash if uploading a database fails", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
mockHttpRequests(204, 500);
codeql_1.setCodeQL({
async databaseBundle(_, outputFilePath) {
@ -228,11 +228,11 @@ ava_1.default("Don't crash if uploading a database fails", async (t) => {
ava_1.default("Successfully uploading a database", async (t) => {
await util_1.withTmpDir(async (tmpDir) => {
testing_utils_1.setupActionsVars(tmpDir, tmpDir);
sinon_1.default
sinon
.stub(actionsUtil, "getRequiredInput")
.withArgs("upload-database")
.returns("true");
sinon_1.default.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
mockHttpRequests(204, 201);
codeql_1.setCodeQL({
async databaseBundle(_, outputFilePath) {

File diff suppressed because one or more lines are too long

7
lib/testing-utils.js generated
View file

@ -18,12 +18,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupActionsVars = exports.setupTests = void 0;
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const CodeQL = __importStar(require("./codeql"));
function wrapOutput(context) {
// Function signature taken from Socket.write.
@ -79,7 +76,7 @@ function setupTests(test) {
process.stdout.write(t.context.testOutput);
}
// Undo any modifications made by sinon
sinon_1.default.restore();
sinon.restore();
// Undo any modifications to the env
process.env = t.context.env;
});

View file

@ -1 +1 @@
{"version":3,"file":"testing-utils.js","sourceRoot":"","sources":["../src/testing-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAA0B;AAE1B,iDAAmC;AASnC,SAAS,UAAU,CAAC,OAAoB;IACtC,8CAA8C;IAC9C,gCAAgC;IAChC,2EAA2E;IAC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GAAG,CAAC,mBAAmB,CAAC,GAAG,QAAQ,CAAC;AAC9C,CAAC;AAHD,4CAGC"}

6
lib/util.test.js generated
View file

@ -27,7 +27,7 @@ const os = __importStar(require("os"));
const stream = __importStar(require("stream"));
const github = __importStar(require("@actions/github"));
const ava_1 = __importDefault(require("ava"));
const sinon_1 = __importDefault(require("sinon"));
const sinon = __importStar(require("sinon"));
const api = __importStar(require("./api-client"));
const logging_1 = require("./logging");
const testing_utils_1 = require("./testing-utils");
@ -143,10 +143,10 @@ function mockGetMetaVersionHeader(versionHeader) {
"x-github-enterprise-version": versionHeader,
},
};
const spyGetContents = sinon_1.default
const spyGetContents = sinon
.stub(client.meta, "get")
.resolves(response);
sinon_1.default.stub(api, "getApiClient").value(() => client);
sinon.stub(api, "getApiClient").value(() => client);
return spyGetContents;
}
ava_1.default("getGitHubVersion", async (t) => {

File diff suppressed because one or more lines are too long

302
node_modules/.package-lock.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "1.0.11",
"version": "1.0.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
@ -87,22 +87,28 @@
}
},
"node_modules/@ava/typescript": {
"version": "1.1.1",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-2.0.0.tgz",
"integrity": "sha512-sn+upcMk81AMrlnx/hb/9T7gCGuBfw7hi+p79NPSSQMvY2G64mOB7qRaDExiHiZfZ7FN9j7HwQeFhHZLGD/NWQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"escape-string-regexp": "^2.0.0"
"escape-string-regexp": "^4.0.0",
"execa": "^5.0.0"
},
"engines": {
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"
"node": ">=12.22 <13 || >=14.16 <15 || >=15"
}
},
"node_modules/@ava/typescript/node_modules/escape-string-regexp": {
"version": "2.0.0",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@babel/code-frame": {
@ -1698,6 +1704,20 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/crypt": {
"version": "0.0.2",
"license": "BSD-3-Clause",
@ -2098,31 +2118,28 @@
}
},
"node_modules/eslint-import-resolver-node": {
"version": "0.3.4",
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz",
"integrity": "sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^2.6.9",
"resolve": "^1.13.1"
"debug": "^3.2.7",
"resolve": "^1.20.0"
}
},
"node_modules/eslint-import-resolver-node/node_modules/debug": {
"version": "2.6.9",
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "2.0.0"
"ms": "^2.1.1"
}
},
"node_modules/eslint-import-resolver-node/node_modules/ms": {
"version": "2.0.0",
"dev": true,
"license": "MIT"
},
"node_modules/eslint-module-utils": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz",
"integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==",
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz",
"integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==",
"dev": true,
"dependencies": {
"debug": "^3.2.7",
@ -2253,16 +2270,19 @@
}
},
"node_modules/eslint-plugin-github": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.1.5.tgz",
"integrity": "sha512-fY+3C8914Efqzmb6ODvL0ZNjv8xxLkwmUasYZ189IY1gL7AxFE9CVED+MZA8B1e+OZtnfTdrQR036t5AYoun0A==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.2.0.tgz",
"integrity": "sha512-YAzCgSKFpZK7e3YVBKNmsVqHG5+/+cFWXKx8gi2zj96vlFA665mHRhHAMTNuPQmY22Lx4c5Xq26KIRiVLQMmqQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
"eslint-config-prettier": ">=8.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-i18n-text": "^1.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-rule-documentation": ">=1.0.0",
"prettier": "^2.2.1",
@ -2275,18 +2295,27 @@
"eslint": "^7.23.0"
}
},
"node_modules/eslint-plugin-i18n-text": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz",
"integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==",
"dev": true,
"peerDependencies": {
"eslint": ">=5.0.0"
}
},
"node_modules/eslint-plugin-import": {
"version": "2.23.4",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz",
"integrity": "sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==",
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz",
"integrity": "sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.3",
"array.prototype.flat": "^1.2.4",
"debug": "^2.6.9",
"doctrine": "^2.1.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-module-utils": "^2.6.1",
"eslint-import-resolver-node": "^0.3.5",
"eslint-module-utils": "^2.6.2",
"find-up": "^2.0.0",
"has": "^1.0.3",
"is-core-module": "^2.4.0",
@ -2395,6 +2424,15 @@
"node": ">=0.10.0"
}
},
"node_modules/eslint-plugin-no-only-tests": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz",
"integrity": "sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q==",
"dev": true,
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/eslint-plugin-prettier": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz",
@ -2521,19 +2559,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/eslint/node_modules/cross-spawn": {
"version": "7.0.3",
"dev": true,
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/eslint/node_modules/doctrine": {
"version": "3.0.0",
"dev": true,
@ -2586,33 +2611,6 @@
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/eslint/node_modules/path-key": {
"version": "3.1.1",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/eslint/node_modules/shebang-command": {
"version": "2.0.0",
"dev": true,
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/eslint/node_modules/shebang-regex": {
"version": "3.0.0",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/eslint/node_modules/strip-json-comments": {
"version": "3.1.1",
"dev": true,
@ -2635,20 +2633,6 @@
"node": ">=8"
}
},
"node_modules/eslint/node_modules/which": {
"version": "2.0.2",
"dev": true,
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/espree": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
@ -2741,6 +2725,41 @@
"node": ">=0.10.0"
}
},
"node_modules/execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"dev": true,
"dependencies": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/execa/node_modules/get-stream": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"license": "MIT"
@ -3140,6 +3159,15 @@
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true,
"engines": {
"node": ">=10.17.0"
}
},
"node_modules/ignore": {
"version": "5.1.4",
"dev": true,
@ -3490,6 +3518,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
"integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
"dev": true,
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-string": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz",
@ -3535,8 +3575,9 @@
},
"node_modules/isexe": {
"version": "2.0.0",
"dev": true,
"license": "ISC"
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
"node_modules/isobject": {
"version": "4.0.0",
@ -3928,6 +3969,12 @@
"node": ">=8"
}
},
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
"dev": true
},
"node_modules/merge2": {
"version": "1.3.0",
"dev": true,
@ -4057,6 +4104,18 @@
"node": ">=8"
}
},
"node_modules/npm-run-path": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
"integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
"dev": true,
"dependencies": {
"path-key": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"license": "MIT",
@ -4125,14 +4184,18 @@
}
},
"node_modules/onetime": {
"version": "5.1.0",
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"mimic-fn": "^2.1.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/optionator": {
@ -4361,6 +4424,15 @@
"node": ">=0.10.0"
}
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/path-parse": {
"version": "1.0.6",
"dev": true,
@ -5102,10 +5174,32 @@
"node": ">=0.10.0"
}
},
"node_modules/signal-exit": {
"version": "3.0.2",
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"license": "ISC"
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/signal-exit": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
"dev": true
},
"node_modules/sinon": {
"version": "11.1.2",
@ -5336,6 +5430,15 @@
"node": ">=4"
}
},
"node_modules/strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/strip-json-comments": {
"version": "2.0.1",
"dev": true,
@ -5890,6 +5993,21 @@
"node": ">=6"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/which-boxed-primitive": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",

View file

@ -1,6 +1,6 @@
# @ava/typescript
Adds rudimentary [TypeScript](https://www.typescriptlang.org/) support to [AVA](https://avajs.dev).
Adds [TypeScript](https://www.typescriptlang.org/) support to [AVA](https://avajs.dev).
This is designed to work for projects that precompile TypeScript. It allows AVA to load the compiled JavaScript, while configuring AVA to treat the TypeScript files as test files.
@ -24,7 +24,8 @@ Then, enable TypeScript support either in `package.json` or `ava.config.*`:
"typescript": {
"rewritePaths": {
"src/": "build/"
}
},
"compile": false
}
}
}
@ -32,6 +33,8 @@ Then, enable TypeScript support either in `package.json` or `ava.config.*`:
Both keys and values of the `rewritePaths` object must end with a `/`. Paths are relative to your project directory.
You can enable compilation via the `compile` property. If `false`, AVA will assume you have already compiled your project. If set to `'tsc'`, AVA will run the TypeScript compiler before running your tests. This can be inefficient when using AVA in watch mode.
Output files are expected to have the `.js` extension.
AVA searches your entire project for `*.js`, `*.cjs`, `*.mjs` and `*.ts` files (or other extensions you've configured). It will ignore such files found in the `rewritePaths` targets (e.g. `build/`). If you use more specific paths, for instance `build/main/`, you may need to change AVA's `files` configuration to ignore other directories.

View file

@ -1,56 +1,92 @@
'use strict';
const path = require('path');
const escapeStringRegexp = require('escape-string-regexp');
const execa = require('execa');
const pkg = require('./package.json');
const help = `See https://github.com/avajs/typescript/blob/v${pkg.version}/README.md`;
function isPlainObject(x) {
return x !== null && typeof x === 'object' && Reflect.getPrototypeOf(x) === Object.prototype;
}
function isValidExtensions(extensions) {
return Array.isArray(extensions) &&
extensions.length > 0 &&
extensions.every(ext => typeof ext === 'string' && ext !== '') &&
new Set(extensions).size === extensions.length;
}
function validate(target, properties) {
for (const key of Object.keys(properties)) {
const {required, isValid} = properties[key];
const missing = !Reflect.has(target, key);
function isValidRewritePaths(rewritePaths) {
if (!isPlainObject(rewritePaths)) {
return false;
if (missing) {
if (required) {
throw new Error(`Missing '${key}' property in TypeScript configuration for AVA. ${help}`);
}
continue;
}
if (!isValid(target[key])) {
throw new Error(`Invalid '${key}' property in TypeScript configuration for AVA. ${help}`);
}
}
return Object.entries(rewritePaths).every(([from, to]) => {
return from.endsWith('/') && typeof to === 'string' && to.endsWith('/');
});
for (const key of Object.keys(target)) {
if (!Reflect.has(properties, key)) {
throw new Error(`Unexpected '${key}' property in TypeScript configuration for AVA. ${help}`);
}
}
}
async function compileTypeScript(projectDir) {
return execa('tsc', ['--incremental'], {preferLocal: true, cwd: projectDir});
}
const configProperties = {
compile: {
required: true,
isValid(compile) {
return compile === false || compile === 'tsc';
}
},
rewritePaths: {
required: true,
isValid(rewritePaths) {
if (!isPlainObject(rewritePaths)) {
return false;
}
return Object.entries(rewritePaths).every(([from, to]) => {
return from.endsWith('/') && typeof to === 'string' && to.endsWith('/');
});
}
},
extensions: {
required: false,
isValid(extensions) {
return Array.isArray(extensions) &&
extensions.length > 0 &&
extensions.every(ext => typeof ext === 'string' && ext !== '') &&
new Set(extensions).size === extensions.length;
}
}
};
module.exports = ({negotiateProtocol}) => {
const protocol = negotiateProtocol(['ava-3.2', 'ava-3'], {version: pkg.version});
const protocol = negotiateProtocol(['ava-3.2'], {version: pkg.version});
if (protocol === null) {
return;
}
return {
main({config}) {
let valid = false;
if (isPlainObject(config)) {
const keys = Object.keys(config);
if (keys.every(key => key === 'extensions' || key === 'rewritePaths')) {
valid =
(config.extensions === undefined || isValidExtensions(config.extensions)) &&
isValidRewritePaths(config.rewritePaths);
}
if (!isPlainObject(config)) {
throw new Error(`Unexpected Typescript configuration for AVA. ${help}`);
}
if (!valid) {
throw new Error(`Unexpected Typescript configuration for AVA. See https://github.com/avajs/typescript/blob/v${pkg.version}/README.md for allowed values.`);
}
validate(config, configProperties);
const {
extensions = ['ts'],
rewritePaths: relativeRewritePaths
rewritePaths: relativeRewritePaths,
compile
} = config;
const rewritePaths = Object.entries(relativeRewritePaths).map(([from, to]) => [
@ -61,6 +97,10 @@ module.exports = ({negotiateProtocol}) => {
return {
async compile() {
if (compile === 'tsc') {
await compileTypeScript(protocol.projectDir);
}
return {
extensions: extensions.slice(),
rewritePaths: rewritePaths.slice()

View file

@ -1,11 +1,13 @@
'use strict';
const matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
module.exports = string => {
if (typeof string !== 'string') {
throw new TypeError('Expected a string');
}
return string.replace(matchOperatorsRegex, '\\$&');
// Escape characters with special meaning either inside or outside character sets.
// Use a simple backslash escape when its always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns stricter grammar.
return string
.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
.replace(/-/g, '\\x2d');
};

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View file

@ -1,20 +1,17 @@
{
"name": "escape-string-regexp",
"version": "2.0.0",
"version": "4.0.0",
"description": "Escape RegExp special characters",
"license": "MIT",
"repository": "sindresorhus/escape-string-regexp",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"maintainers": [
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
"Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
],
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
@ -27,17 +24,15 @@
"escape",
"regex",
"regexp",
"re",
"regular",
"expression",
"string",
"str",
"special",
"characters"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
"tsd": "^0.11.0",
"xo": "^0.28.3"
}
}

View file

@ -2,14 +2,12 @@
> Escape RegExp special characters
## Install
```
$ npm install escape-string-regexp
```
## Usage
```js
@ -23,7 +21,14 @@ new RegExp(escapedString);
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
---
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View file

@ -1,9 +1,9 @@
{
"name": "@ava/typescript",
"version": "1.1.1",
"version": "2.0.0",
"description": "TypeScript provider for AVA",
"engines": {
"node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0"
"node": ">=12.22 <13 || >=14.16 <15 || >=15"
},
"files": [
"index.js"
@ -16,25 +16,36 @@
"typescript"
],
"scripts": {
"test": "xo && nyc ava"
"test": "xo && c8 ava"
},
"dependencies": {
"escape-string-regexp": "^2.0.0"
"escape-string-regexp": "^4.0.0",
"execa": "^5.0.0"
},
"devDependencies": {
"ava": "^3.0.0",
"execa": "^4.0.0",
"nyc": "^15.0.0",
"xo": "^0.25.3"
"ava": "^3.15.0",
"c8": "^7.7.1",
"del": "^6.0.0",
"typescript": "^4.2.4",
"xo": "^0.38.2"
},
"nyc": {
"c8": {
"reporter": [
"html",
"lcov",
"text"
]
},
"ava": {
"files": [
"!test/broken-fixtures/**"
],
"timeout": "60s"
},
"xo": {
"ignores": [
"test/broken-fixtures"
],
"rules": {
"import/order": "off"
}

View file

@ -1,63 +0,0 @@
# Change Log
All notable changes to this resolver will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com).
## Unreleased
## v0.3.4 - 2020-06-16
### Added
- add `.node` extension ([#1663])
## v0.3.3 - 2020-01-10
### Changed
- [meta] copy LICENSE file to all npm packages on prepublish ([#1595], thanks [@opichals])
## v0.3.2 - 2018-01-05
### Added
- `.mjs` extension detected by default to support `experimental-modules` ([#939])
### Deps
- update `debug`, `resolve`
## v0.3.1 - 2017-06-23
### Changed
- bumped `debug` dep to match other packages
## v0.3.0 - 2016-12-15
### Changed
- bumped `resolve` to fix issues with Node builtins (thanks [@SkeLLLa] and [@ljharb])
### Fixed
- use `files` in `package.json` to ship only `index.js` ([#531], thanks for noticing [@lukeapage])
## v0.2.3 - 2016-08-20
### Added
- debug logging (use `DEBUG=eslint-plugin-import:resolver:node eslint [...]`)
## v0.2.2 - 2016-07-14
### Fixed
- Node resolver no longer declares the import plugin as a `peerDependency`. See [#437]
for a well-articulated and thoughtful expression of why this doesn't make sense.
Thanks [@jasonkarns] for the issue and the PR to fix it ([#438]).
Also, apologies to the others who expressed this before, but I never understood
what the problem was.😅
## v0.2.1
### Fixed
- find files with `.json` extensions (#333, thanks for noticing @jfmengels)
[#438]: https://github.com/benmosher/eslint-plugin-import/pull/438
[#1663]: https://github.com/benmosher/eslint-plugin-import/issues/1663
[#1595]: https://github.com/benmosher/eslint-plugin-import/pull/1595
[#939]: https://github.com/benmosher/eslint-plugin-import/issues/939
[#531]: https://github.com/benmosher/eslint-plugin-import/issues/531
[#437]: https://github.com/benmosher/eslint-plugin-import/issues/437
[@jasonkarns]: https://github.com/jasonkarns
[@lukeapage]: https://github.com/lukeapage
[@SkeLLLa]: https://github.com/SkeLLLa
[@ljharb]: https://github.com/ljharb
[@opichals]: https://github.com/opichals

View file

@ -1,47 +1,51 @@
var resolve = require('resolve')
, path = require('path')
'use strict';
var log = require('debug')('eslint-plugin-import:resolver:node')
const resolve = require('resolve');
const path = require('path');
exports.interfaceVersion = 2
const log = require('debug')('eslint-plugin-import:resolver:node');
exports.interfaceVersion = 2;
exports.resolve = function (source, file, config) {
log('Resolving:', source, 'from:', file)
var resolvedPath
log('Resolving:', source, 'from:', file);
let resolvedPath;
if (resolve.isCore(source)) {
log('resolved to core')
return { found: true, path: null }
log('resolved to core');
return { found: true, path: null };
}
try {
resolvedPath = resolve.sync(source, opts(file, config))
log('Resolved to:', resolvedPath)
return { found: true, path: resolvedPath }
resolvedPath = resolve.sync(source, opts(file, config));
log('Resolved to:', resolvedPath);
return { found: true, path: resolvedPath };
} catch (err) {
log('resolve threw error:', err)
return { found: false }
log('resolve threw error:', err);
return { found: false };
}
}
};
function opts(file, config) {
return Object.assign({
// more closely matches Node (#333)
// plus 'mjs' for native modules! (#939)
extensions: ['.mjs', '.js', '.json', '.node'],
},
config,
{
// path.resolve will handle paths relative to CWD
basedir: path.dirname(path.resolve(file)),
packageFilter: packageFilter,
// more closely matches Node (#333)
// plus 'mjs' for native modules! (#939)
extensions: ['.mjs', '.js', '.json', '.node'],
},
config,
{
// path.resolve will handle paths relative to CWD
basedir: path.dirname(path.resolve(file)),
packageFilter: packageFilter,
})
});
}
function packageFilter(pkg) {
if (pkg['jsnext:main']) {
pkg['main'] = pkg['jsnext:main']
if (pkg.module) {
pkg.main = pkg.module;
} else if (pkg['jsnext:main']) {
pkg.main = pkg['jsnext:main'];
}
return pkg
return pkg;
}

View file

@ -1 +0,0 @@
repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve

View file

@ -1,11 +0,0 @@
{
"env": {
"browser": true,
"node": true
},
"rules": {
"no-console": 0,
"no-empty": [1, { "allowEmptyCatch": true }]
},
"extends": "eslint:recommended"
}

View file

@ -1,9 +0,0 @@
support
test
examples
example
*.sock
dist
yarn.lock
coverage
bower.json

View file

@ -1,14 +0,0 @@
language: node_js
node_js:
- "6"
- "5"
- "4"
install:
- make node_modules
script:
- make lint
- make test
- make coveralls

View file

@ -1,4 +1,37 @@
3.1.0 / 2017-09-26
==================
* Add `DEBUG_HIDE_DATE` env var (#486)
* Remove ReDoS regexp in %o formatter (#504)
* Remove "component" from package.json
* Remove `component.json`
* Ignore package-lock.json
* Examples: fix colors printout
* Fix: browser detection
* Fix: spelling mistake (#496, @EdwardBetts)
3.0.1 / 2017-08-24
==================
* Fix: Disable colors in Edge and Internet Explorer (#489)
3.0.0 / 2017-08-08
==================
* Breaking: Remove DEBUG_FD (#406)
* Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
* Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
* Addition: document `enabled` flag (#465)
* Addition: add 256 colors mode (#481)
* Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
* Update: component: update "ms" to v2.0.0
* Update: separate the Node and Browser tests in Travis-CI
* Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
* Update: separate Node.js and web browser examples for organization
* Update: update "browserify" to v14.4.0
* Fix: fix Readme typo (#473)
2.6.9 / 2017-09-22
==================
@ -27,7 +60,7 @@
2.6.4 / 2017-04-20
==================
* Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)

View file

@ -1,50 +0,0 @@
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
# BIN directory
BIN := $(THIS_DIR)/node_modules/.bin
# Path
PATH := node_modules/.bin:$(PATH)
SHELL := /bin/bash
# applications
NODE ?= $(shell which node)
YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify
.FORCE:
install: node_modules
node_modules: package.json
@NODE_ENV= $(PKG) install
@touch node_modules
lint: .FORCE
eslint browser.js debug.js index.js node.js
test-node: .FORCE
istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
test-browser: .FORCE
mkdir -p dist
@$(BROWSERIFY) \
--standalone debug \
. > dist/debug.js
karma start --single-run
rimraf dist
test: .FORCE
concurrently \
"make test-node" \
"make test-browser"
coveralls:
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
.PHONY: all install clean distclean

View file

@ -1,12 +1,11 @@
# debug
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
A tiny node.js debugging utility modelled after node core's debugging technique.
**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
A tiny JavaScript debugging utility modelled after Node.js core's debugging
technique. Works in Node.js and web browsers.
## Installation
@ -18,7 +17,7 @@ $ npm install debug
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
Example _app.js_:
Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
@ -27,7 +26,7 @@ var debug = require('debug')('http')
// fake app
debug('booting %s', name);
debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
@ -41,81 +40,148 @@ http.createServer(function(req, res){
require('./worker');
```
Example _worker.js_:
Example [_worker.js_](./examples/node/worker.js):
```js
var debug = require('debug')('worker');
var a = require('debug')('worker:a')
, b = require('debug')('worker:b');
setInterval(function(){
debug('doing some work');
}, 1000);
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
}
work();
function workb() {
b('doing some work');
setTimeout(workb, Math.random() * 2000);
}
workb();
```
The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
The `DEBUG` environment variable is then used to enable these based on space or
comma-delimited names.
![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
Here are some examples:
![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows note
#### Windows command prompt notes
On Windows the environment variable is set using the `set` command.
##### CMD
```cmd
set DEBUG=*,-not_this
```
On Windows the environment variable is set using the `set` command.
Note that PowerShell uses different syntax to set environment variables.
```cmd
set DEBUG=*,-not_this
```
```cmd
$env:DEBUG = "*,-not_this"
```
Example:
```cmd
set DEBUG=* & node app.js
```
##### PowerShell (VS Code default)
PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
Example:
```cmd
$env:DEBUG='app';node app.js
```
Then, run the program to be debugged as usual.
npm script example:
```js
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
```
## Namespace Colors
Every debug instance has a color generated for it based on its namespace name.
This helps when visually parsing the debug output to identify which debug instance
a debug line belongs to.
#### Node.js
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
otherwise debug will only use a small handful of basic colors.
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
#### Web Browser
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
option. These are WebKit web inspectors, Firefox ([since version
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
and the Firebug plugin for Firefox (any version).
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
## Millisecond diff
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
## Conventions
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
The `*` character may be used as a wildcard. Suppose for example your library has
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
instead of listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
You can also exclude specific debuggers by prefixing them with a "-" character.
For example, `DEBUG=*,-connect:*` would include all debuggers except those
starting with "connect:".
## Environment Variables
When running through Node.js, you can set a few environment variables that will
change the behavior of the debug logging:
When running through Node.js, you can set a few environment variables that will
change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
__Note:__ The environment variables beginning with `DEBUG_` end up being
converted into an Options object that gets used with `%o`/`%O` formatters.
See the Node.js documentation for
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
for the complete list.
__Note:__ The environment variables beginning with `DEBUG_` end up being
converted into an Options object that gets used with `%o`/`%O` formatters.
See the Node.js documentation for
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
for the complete list.
## Formatters
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
@ -126,9 +192,12 @@ Then, run the program to be debugged as usual.
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
### Custom formatters
You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
You can add custom formatters by extending the `debug.formatters` object.
For example, if you wanted to add support for rendering a Buffer as hex with
`%h`, you could do something like:
```js
const createDebug = require('debug')
@ -142,14 +211,16 @@ debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
## Browser support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this using `localStorage.debug`:
## Browser Support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
@ -170,23 +241,12 @@ setInterval(function(){
}, 1200);
```
#### Web Inspector Colors
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
option. These are WebKit web inspectors, Firefox ([since version
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
and the Firebug plugin for Firefox (any version).
Colored output looks something like:
![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
Example _stdout.js_:
Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
@ -208,13 +268,78 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
## Extend
You can simply extend debugger
```js
const log = require('debug')('auth');
//creates new debug instance with extended namespace
const logSign = log.extend('sign');
const logLogin = log.extend('login');
log('hello'); // auth hello
logSign('hello'); //auth:sign hello
logLogin('hello'); //auth:login hello
```
## Set dynamically
You can also enable debug dynamically by calling the `enable()` method :
```js
let debug = require('debug');
console.log(1, debug.enabled('test'));
debug.enable('test');
console.log(2, debug.enabled('test'));
debug.disable();
console.log(3, debug.enabled('test'));
```
print :
```
1 false
2 true
3 false
```
Usage :
`enable(namespaces)`
`namespaces` can include modes separated by a colon and wildcards.
Note that calling `enable()` completely overrides previously set DEBUG variable :
```
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
=> false
```
## Checking whether a debug target is enabled
After you've created a debug instance, you can determine whether or not it is
enabled by checking the `enabled` property:
```javascript
const debug = require('debug')('http');
if (debug.enabled) {
// do stuff...
}
```
You can also manually toggle this property to force the debug instance to be
enabled or disabled.
## Authors
- TJ Holowaychuk
- Nathan Rajlich
- Andrew Rhyne
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
@ -290,7 +415,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
(The MIT License)
Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View file

@ -1,19 +0,0 @@
{
"name": "debug",
"repo": "visionmedia/debug",
"description": "small debugging utility",
"version": "2.6.9",
"keywords": [
"debug",
"log",
"debugger"
],
"main": "src/browser.js",
"scripts": [
"src/browser.js",
"src/debug.js"
],
"dependencies": {
"rauchg/ms.js": "0.7.1"
}
}

View file

@ -1,70 +0,0 @@
// Karma configuration
// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon'],
// list of files / patterns to load in the browser
files: [
'dist/debug.js',
'test/*spec.js'
],
// list of files to exclude
exclude: [
'src/node.js'
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}

View file

@ -1,6 +1,6 @@
{
"name": "debug",
"version": "2.6.9",
"version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
@ -11,6 +11,13 @@
"log",
"debugger"
],
"files": [
"src",
"node.js",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
@ -18,32 +25,27 @@
],
"license": "MIT",
"dependencies": {
"ms": "2.0.0"
"ms": "^2.1.1"
},
"devDependencies": {
"browserify": "9.0.3",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^2.11.15",
"eslint": "^3.12.1",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"karma": "^1.3.0",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sinon": "^1.0.5",
"mocha": "^3.2.0",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0"
"xo": "^0.23.0"
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"component": {
"scripts": {
"debug/index.js": "browser.js",
"debug/debug.js": "debug.js"
}
}
"unpkg": "./dist/debug.js"
}

View file

@ -1,33 +1,23 @@
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = require('./debug');
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = 'undefined' != typeof chrome
&& 'undefined' != typeof chrome.storage
? chrome.storage.local
: localstorage();
exports.storage = localstorage();
/**
* Colors.
*/
exports.colors = [
'lightseagreen',
'forestgreen',
'goldenrod',
'dodgerblue',
'darkorchid',
'crimson'
];
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
@ -35,79 +25,65 @@ exports.colors = [
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
}
} // Internet Explorer and Edge do not support colors.
// is webkit? http://stackoverflow.com/a/16459606/376773
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
} // Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
// is firebug? http://stackoverflow.com/a/398120/376773
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
// is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
// double check webkit in userAgent just in case we are in a worker
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
exports.formatters.j = function(v) {
try {
return JSON.stringify(v);
} catch (err) {
return '[UnexpectedJSONParseError]: ' + err.message;
}
};
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
var useColors = this.useColors;
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
args[0] = (useColors ? '%c' : '')
+ this.namespace
+ (useColors ? ' %c' : ' ')
+ args[0]
+ (useColors ? '%c ' : ' ')
+ '+' + exports.humanize(this.diff);
if (!useColors) return;
if (!this.useColors) {
return;
}
var c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit')
// the final "%c" is somewhat tricky, because there could be other
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, function(match) {
if ('%%' === match) return;
args[0].replace(/%[a-zA-Z%]/g, function (match) {
if (match === '%%') {
return;
}
index++;
if ('%c' === match) {
// we only are interested in the *last* %c
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
@ -115,14 +91,14 @@ function formatArgs(args) {
* @api public
*/
function log() {
// this hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return 'object' === typeof console
&& console.log
&& Function.prototype.apply.call(console.log, console, arguments);
}
function log() {
var _console;
// This hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
}
/**
* Save `namespaces`.
*
@ -130,16 +106,18 @@ function log() {
* @api private
*/
function save(namespaces) {
try {
if (null == namespaces) {
exports.storage.removeItem('debug');
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.debug = namespaces;
exports.storage.removeItem('debug');
}
} catch(e) {}
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
@ -147,26 +125,23 @@ function save(namespaces) {
* @api private
*/
function load() {
var r;
try {
r = exports.storage.debug;
} catch(e) {}
try {
r = exports.storage.getItem('debug');
} catch (error) {} // Swallow
// XXX (@Qix-) should we be logging these?
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Enable namespaces listed in `localStorage.debug` initially.
*/
exports.enable(load());
/**
* Localstorage attempts to return the localstorage.
*
@ -178,8 +153,28 @@ exports.enable(load());
* @api private
*/
function localstorage() {
try {
return window.localStorage;
} catch (e) {}
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};

View file

@ -0,0 +1,249 @@
"use strict";
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
Object.keys(env).forEach(function (key) {
createDebug[key] = env[key];
});
/**
* Active `debug` instances.
*/
createDebug.instances = [];
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
var hash = 0;
for (var i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
var prevTime;
function debug() {
// Disabled?
if (!debug.enabled) {
return;
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var self = debug; // Set `diff` timestamp
var curr = Number(new Date());
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
} // Apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return match;
}
index++;
var formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
var val = args[index];
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
}); // Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
var logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = createDebug.enabled(namespace);
debug.useColors = createDebug.useColors();
debug.color = selectColor(namespace);
debug.destroy = destroy;
debug.extend = extend; // Debug.formatArgs = formatArgs;
// debug.rawLog = rawLog;
// env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
createDebug.instances.push(debug);
return debug;
}
function destroy() {
var index = createDebug.instances.indexOf(this);
if (index !== -1) {
createDebug.instances.splice(index, 1);
return true;
}
return false;
}
function extend(namespace, delimiter) {
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.names = [];
createDebug.skips = [];
var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
for (i = 0; i < createDebug.instances.length; i++) {
var instance = createDebug.instances[i];
instance.enabled = createDebug.enabled(instance.namespace);
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
createDebug.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
var i;
var len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;

View file

@ -1,202 +0,0 @@
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;
exports.humanize = require('ms');
/**
* The currently active debug mode names, and names to skip.
*/
exports.names = [];
exports.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
exports.formatters = {};
/**
* Previous log timestamp.
*/
var prevTime;
/**
* Select a color.
* @param {String} namespace
* @return {Number}
* @api private
*/
function selectColor(namespace) {
var hash = 0, i;
for (i in namespace) {
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return exports.colors[Math.abs(hash) % exports.colors.length];
}
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
function debug() {
// disabled?
if (!debug.enabled) return;
var self = debug;
// set `diff` timestamp
var curr = +new Date();
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
// turn the `arguments` into a proper Array
var args = new Array(arguments.length);
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i];
}
args[0] = exports.coerce(args[0]);
if ('string' !== typeof args[0]) {
// anything else let's inspect with %O
args.unshift('%O');
}
// apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
// if we encounter an escaped % then don't increase the array index
if (match === '%%') return match;
index++;
var formatter = exports.formatters[format];
if ('function' === typeof formatter) {
var val = args[index];
match = formatter.call(self, val);
// now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
});
// apply env-specific formatting (colors, etc.)
exports.formatArgs.call(self, args);
var logFn = debug.log || exports.log || console.log.bind(console);
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = exports.enabled(namespace);
debug.useColors = exports.useColors();
debug.color = selectColor(namespace);
// env-specific initialization logic for debug instances
if ('function' === typeof exports.init) {
exports.init(debug);
}
return debug;
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
exports.save(namespaces);
exports.names = [];
exports.skips = [];
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (var i = 0; i < len; i++) {
if (!split[i]) continue; // ignore empty strings
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
exports.names.push(new RegExp('^' + namespaces + '$'));
}
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
exports.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
var i, len;
for (i = 0, len = exports.skips.length; i < len; i++) {
if (exports.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = exports.names.length; i < len; i++) {
if (exports.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) return val.stack || val.message;
return val;
}

View file

@ -1,10 +1,12 @@
"use strict";
/**
* Detect Electron renderer process, which is node, but we should
* Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
if (typeof process !== 'undefined' && process.type === 'renderer') {
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
}

View file

@ -1,15 +0,0 @@
module.exports = inspectorLog;
// black hole
const nullStream = new (require('stream').Writable)();
nullStream._write = () => {};
/**
* Outputs a `console.log()` to the Node.js Inspector console *only*.
*/
function inspectorLog() {
const stdout = console._stdout;
console._stdout = nullStream;
console.log.apply(console, arguments);
console._stdout = stdout;
}

View file

@ -1,134 +1,112 @@
"use strict";
/**
* Module dependencies.
*/
var tty = require('tty');
var util = require('util');
var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = require('./debug');
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
var supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
}
} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
return /^debug_/i.test(key);
}).reduce(function (obj, key) {
// camel-case
var prop = key
.substring(6)
.toLowerCase()
.replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
// Camel-case
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
return k.toUpperCase();
}); // Coerce string value into JS value
// coerce string value into JS value
var val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
else if (val === 'null') val = null;
else val = Number(val);
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* The file descriptor to write the `debug()` calls to.
* Set the `DEBUG_FD` env variable to override with another value. i.e.:
*
* $ DEBUG_FD=3 node script.js 3>debug.log
*/
var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
if (1 !== fd && 2 !== fd) {
util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
}
var stream = 1 === fd ? process.stdout :
2 === fd ? process.stderr :
createWritableStdioStream(fd);
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts
? Boolean(exports.inspectOpts.colors)
: tty.isatty(fd);
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
/**
* Map %o to `util.inspect()`, all on a single line.
*/
exports.formatters.o = function(v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n').map(function(str) {
return str.trim()
}).join(' ');
};
/**
* Map %o to `util.inspect()`, allowing multiple lines if needed.
*/
exports.formatters.O = function(v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
var name = this.namespace;
var useColors = this.useColors;
var name = this.namespace,
useColors = this.useColors;
if (useColors) {
var c = this.color;
var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = new Date().toUTCString()
+ ' ' + name + ' ' + args[0];
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to `stream`.
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
return stream.write(util.format.apply(util, arguments) + '\n');
}
function log() {
return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
* Save `namespaces`.
*
@ -136,16 +114,16 @@ function log() {
* @api private
*/
function save(namespaces) {
if (null == namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
} else {
process.env.DEBUG = namespaces;
}
}
/**
* Load `namespaces`.
*
@ -153,78 +131,10 @@ function save(namespaces) {
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Copied from `node/src/node.js`.
*
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
*/
function createWritableStdioStream (fd) {
var stream;
var tty_wrap = process.binding('tty_wrap');
// Note stream._type is used for test-module-load-list.js
switch (tty_wrap.guessHandleType(fd)) {
case 'TTY':
stream = new tty.WriteStream(fd);
stream._type = 'tty';
// Hack to have stream not keep the event loop alive.
// See https://github.com/joyent/node/issues/1726
if (stream._handle && stream._handle.unref) {
stream._handle.unref();
}
break;
case 'FILE':
var fs = require('fs');
stream = new fs.SyncWriteStream(fd, { autoClose: false });
stream._type = 'fs';
break;
case 'PIPE':
case 'TCP':
var net = require('net');
stream = new net.Socket({
fd: fd,
readable: false,
writable: true
});
// FIXME Should probably have an option in net.Socket to create a
// stream from an existing fd which is writable only. But for now
// we'll just add this hack and set the `readable` member to false.
// Test: ./node test/fixtures/echo.js < /etc/passwd
stream.readable = false;
stream.read = null;
stream._type = 'pipe';
// FIXME Hack to have stream not keep the event loop alive.
// See https://github.com/joyent/node/issues/1726
if (stream._handle && stream._handle.unref) {
stream._handle.unref();
}
break;
default:
// Probably an error on in uv_guess_handle()
throw new Error('Implement me. Unknown stream file type!');
}
// For supporting legacy API we put the FD here.
stream.fd = fd;
stream._isStdio = true;
return stream;
}
/**
* Init logic for `debug` instances.
*
@ -232,17 +142,36 @@ function createWritableStdioStream (fd) {
* differently for a particular `debug` instance.
*/
function init (debug) {
debug.inspectOpts = {};
function init(debug) {
debug.inspectOpts = {};
var keys = Object.keys(exports.inspectOpts);
for (var i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
var formatters = module.exports.formatters;
/**
* Enable namespaces listed in `process.env.DEBUG` initially.
* Map %o to `util.inspect()`, all on a single line.
*/
exports.enable(load());
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(function (str) { return str.trim(); })
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};

View file

@ -1,152 +0,0 @@
/**
* Helpers.
*/
var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var y = d * 365.25;
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} [options]
* @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
module.exports = function(val, options) {
options = options || {};
var type = typeof val;
if (type === 'string' && val.length > 0) {
return parse(val);
} else if (type === 'number' && isNaN(val) === false) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
'val is not a non-empty string or a valid number. val=' +
JSON.stringify(val)
);
};
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
return;
}
var n = parseFloat(match[1]);
var type = (match[2] || 'ms').toLowerCase();
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
return n * y;
case 'days':
case 'day':
case 'd':
return n * d;
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
return n * h;
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
return n * m;
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
return n * s;
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
return n;
default:
return undefined;
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtShort(ms) {
if (ms >= d) {
return Math.round(ms / d) + 'd';
}
if (ms >= h) {
return Math.round(ms / h) + 'h';
}
if (ms >= m) {
return Math.round(ms / m) + 'm';
}
if (ms >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtLong(ms) {
return plural(ms, d, 'day') ||
plural(ms, h, 'hour') ||
plural(ms, m, 'minute') ||
plural(ms, s, 'second') ||
ms + ' ms';
}
/**
* Pluralization helper.
*/
function plural(ms, n, name) {
if (ms < n) {
return;
}
if (ms < n * 1.5) {
return Math.floor(ms / n) + ' ' + name;
}
return Math.ceil(ms / n) + ' ' + name + 's';
}

View file

@ -1,37 +0,0 @@
{
"name": "ms",
"version": "2.0.0",
"description": "Tiny milisecond conversion utility",
"repository": "zeit/ms",
"main": "./index",
"files": [
"index.js"
],
"scripts": {
"precommit": "lint-staged",
"lint": "eslint lib/* bin/*",
"test": "mocha tests.js"
},
"eslintConfig": {
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
}
},
"lint-staged": {
"*.js": [
"npm run lint",
"prettier --single-quote --write",
"git add"
]
},
"license": "MIT",
"devDependencies": {
"eslint": "3.19.0",
"expect.js": "0.3.1",
"husky": "0.13.3",
"lint-staged": "3.4.1",
"mocha": "3.4.1"
}
}

View file

@ -1,51 +0,0 @@
# ms
[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
Use this package to easily convert various time formats to milliseconds.
## Examples
```js
ms('2 days') // 172800000
ms('1d') // 86400000
ms('10h') // 36000000
ms('2.5 hrs') // 9000000
ms('2h') // 7200000
ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
```
### Convert from milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
ms(ms('10 hours')) // "10h"
```
### Time format written-out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
- Works both in [node](https://nodejs.org) and in the browser.
- If a number is supplied to `ms`, a string with a unit is returned.
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
## Caught a bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
As always, you can run the tests using: `npm test`

View file

@ -1,6 +1,6 @@
{
"name": "eslint-import-resolver-node",
"version": "0.3.4",
"version": "0.3.5",
"description": "Node default behavior import resolution plugin for eslint-plugin-import.",
"main": "index.js",
"files": [
@ -14,7 +14,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/benmosher/eslint-plugin-import"
"url": "https://github.com/import-js/eslint-plugin-import"
},
"keywords": [
"eslint",
@ -26,22 +26,17 @@
"author": "Ben Mosher (me@benmosher.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/benmosher/eslint-plugin-import/issues"
"url": "https://github.com/import-js/eslint-plugin-import/issues"
},
"homepage": "https://github.com/benmosher/eslint-plugin-import",
"homepage": "https://github.com/import-js/eslint-plugin-import",
"dependencies": {
"debug": "^2.6.9",
"resolve": "^1.13.1"
"debug": "^3.2.7",
"resolve": "^1.20.0"
},
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^3.0.0",
"coveralls": "^3.1.0",
"mocha": "^3.5.3",
"nyc": "^11.7.1"
},
"nyc": {
"exclude": [
"test/"
]
"nyc": "^11.9.0"
}
}

5
node_modules/eslint-module-utils/.eslintrc generated vendored Normal file
View file

@ -0,0 +1,5 @@
{
"parserOptions": {
"ecmaVersion": 6,
},
}

View file

@ -5,6 +5,11 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
## Unreleased
## v2.6.2 - 2021-08-08
### Fixed
- Use `context.getPhysicalFilename()` when available (ESLint 7.28+) ([#2160], thanks [@pmcelhaney])
## v2.6.1 - 2021-05-13
### Fixed
@ -85,33 +90,35 @@ Yanked due to critical issue with cache key resulting from #839.
### Fixed
- `unambiguous.test()` regex is now properly in multiline mode
[#2026]: https://github.com/benmosher/eslint-plugin-import/pull/2026
[#1786]: https://github.com/benmosher/eslint-plugin-import/pull/1786
[#1671]: https://github.com/benmosher/eslint-plugin-import/pull/1671
[#1606]: https://github.com/benmosher/eslint-plugin-import/pull/1606
[#1602]: https://github.com/benmosher/eslint-plugin-import/pull/1602
[#1591]: https://github.com/benmosher/eslint-plugin-import/pull/1591
[#1551]: https://github.com/benmosher/eslint-plugin-import/pull/1551
[#1435]: https://github.com/benmosher/eslint-plugin-import/pull/1435
[#1409]: https://github.com/benmosher/eslint-plugin-import/pull/1409
[#1356]: https://github.com/benmosher/eslint-plugin-import/pull/1356
[#1290]: https://github.com/benmosher/eslint-plugin-import/pull/1290
[#1218]: https://github.com/benmosher/eslint-plugin-import/pull/1218
[#1166]: https://github.com/benmosher/eslint-plugin-import/issues/1166
[#1160]: https://github.com/benmosher/eslint-plugin-import/pull/1160
[#1035]: https://github.com/benmosher/eslint-plugin-import/issues/1035
[#599]: https://github.com/benmosher/eslint-plugin-import/pull/599
[#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160
[#2026]: https://github.com/import-js/eslint-plugin-import/pull/2026
[#1786]: https://github.com/import-js/eslint-plugin-import/pull/1786
[#1671]: https://github.com/import-js/eslint-plugin-import/pull/1671
[#1606]: https://github.com/import-js/eslint-plugin-import/pull/1606
[#1602]: https://github.com/import-js/eslint-plugin-import/pull/1602
[#1591]: https://github.com/import-js/eslint-plugin-import/pull/1591
[#1551]: https://github.com/import-js/eslint-plugin-import/pull/1551
[#1435]: https://github.com/import-js/eslint-plugin-import/pull/1435
[#1409]: https://github.com/import-js/eslint-plugin-import/pull/1409
[#1356]: https://github.com/import-js/eslint-plugin-import/pull/1356
[#1290]: https://github.com/import-js/eslint-plugin-import/pull/1290
[#1218]: https://github.com/import-js/eslint-plugin-import/pull/1218
[#1166]: https://github.com/import-js/eslint-plugin-import/issues/1166
[#1160]: https://github.com/import-js/eslint-plugin-import/pull/1160
[#1035]: https://github.com/import-js/eslint-plugin-import/issues/1035
[#599]: https://github.com/import-js/eslint-plugin-import/pull/599
[@hulkish]: https://github.com/hulkish
[@timkraut]: https://github.com/timkraut
[@vikr01]: https://github.com/vikr01
[@bradzacher]: https://github.com/bradzacher
[@christophercurrie]: https://github.com/christophercurrie
[@brettz9]: https://github.com/brettz9
[@JounQin]: https://github.com/JounQin
[@aladdin-add]: https://github.com/aladdin-add
[@arcanis]: https://github.com/arcanis
[@sompylasar]: https://github.com/sompylasar
[@bradzacher]: https://github.com/bradzacher
[@brettz9]: https://github.com/brettz9
[@christophercurrie]: https://github.com/christophercurrie
[@hulkish]: https://github.com/hulkish
[@iamnapo]: https://github.com/iamnapo
[@JounQin]: https://github.com/JounQin
[@kaiyoma]: https://github.com/kaiyoma
[@manuth]: https://github.com/manuth
[@aladdin-add]: https://github.com/aladdin-add
[@pmcelhaney]: https://github.com/pmcelhaney
[@sompylasar]: https://github.com/sompylasar
[@timkraut]: https://github.com/timkraut
[@vikr01]: https://github.com/vikr01

View file

@ -1,6 +1,6 @@
{
"name": "eslint-module-utils",
"version": "2.6.1",
"version": "2.6.2",
"description": "Core utilities to support eslint-plugin-import and other module-related plugins.",
"engines": {
"node": ">=4"
@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/benmosher/eslint-plugin-import.git"
"url": "git+https://github.com/import-js/eslint-plugin-import.git"
},
"keywords": [
"eslint-plugin-import",
@ -22,9 +22,9 @@
"author": "Ben Mosher <me@benmosher.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/benmosher/eslint-plugin-import/issues"
"url": "https://github.com/import-js/eslint-plugin-import/issues"
},
"homepage": "https://github.com/benmosher/eslint-plugin-import#readme",
"homepage": "https://github.com/import-js/eslint-plugin-import#readme",
"dependencies": {
"debug": "^3.2.7",
"pkg-dir": "^2.0.0"

View file

@ -35,7 +35,7 @@ exports.default = function parse(path, content, context) {
// @typescript-eslint/parser will parse the entire project with typechecking if you provide
// "project" or "projects" in parserOptions. Removing these options means the parser will
// only parse one file in isolate mode, which is much, much faster.
// https://github.com/benmosher/eslint-plugin-import/issues/1408#issuecomment-509298962
// https://github.com/import-js/eslint-plugin-import/issues/1408#issuecomment-509298962
delete parserOptions.project;
delete parserOptions.projects;
@ -52,11 +52,7 @@ exports.default = function parse(path, content, context) {
console.warn('Line ' + e.lineNumber + ', column ' + e.column + ': ' + e.message);
}
if (!ast || typeof ast !== 'object') {
console.warn(
'`parseForESLint` from parser `' +
parserPath +
'` is invalid and will just be ignored'
);
console.warn('`parseForESLint` from parser `' + parserPath + '` is invalid and will just be ignored');
} else {
return ast;
}

View file

@ -217,10 +217,7 @@ const erroredContexts = new Set();
*/
function resolve(p, context) {
try {
return relative( p
, context.getFilename()
, context.settings
);
return relative(p, context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(), context.settings);
} catch (err) {
if (!erroredContexts.has(context)) {
// The `err.stack` string starts with `err.name` followed by colon and `err.message`.

View file

@ -13,6 +13,14 @@ module.exports = {
'github/unescaped-html-literal': 'error',
'github/no-useless-passive': 'error',
'github/require-passive-events': 'error',
'github/prefer-observers': 'error'
'github/prefer-observers': 'error',
'import/no-nodejs-modules': 'error',
'no-restricted-syntax': [
'error',
{
selector: "NewExpression[callee.name='URL'][arguments.length=1]",
message: 'Please pass in `window.location.origin` as the 2nd argument to `new URL()`'
}
]
}
}

View file

@ -8,7 +8,7 @@ module.exports = {
env: {
es6: true
},
plugins: ['github', 'prettier', 'eslint-comments', 'import'],
plugins: ['github', 'prettier', 'eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
rules: {
'constructor-super': 'error',
'eslint-comments/disable-enable-pair': 'off',
@ -18,16 +18,20 @@ module.exports = {
'eslint-comments/no-unused-disable': 'error',
'eslint-comments/no-unused-enable': 'error',
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
'filenames/match-regex': ['error', '^[a-z0-9-]+(.d)?$'],
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
'github/array-foreach': 'error',
'github/no-implicit-buggy-globals': 'error',
'github/no-then': 'error',
'i18n-text/no-en': ['error'],
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'error',
'import/first': 'error',
'import/named': 'error',
'import/namespace': 'error',
'import/no-absolute-path': 'error',
'import/no-amd': 'error',
'import/no-anonymous-default-export': [
'error',
{
@ -39,12 +43,17 @@ module.exports = {
allowObject: true
}
],
'import/no-commonjs': 'error',
'import/no-deprecated': 'error',
'import/no-duplicates': 'error',
'import/no-dynamic-require': 'error',
'import/no-extraneous-dependencies': [0, {devDependencies: false}],
'import/no-mutable-exports': 'error',
'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
'import/no-namespace': 'error',
'import/no-unresolved': 'error',
'import/no-webpack-loader-syntax': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
@ -76,10 +85,17 @@ module.exports = {
'no-new-symbol': 'error',
'no-obj-calls': 'error',
'no-octal': 'error',
'no-only-tests/no-only-tests': [
'error',
{
block: ['describe', 'it', 'context', 'test', 'tape', 'fixture', 'serial', 'suite']
}
],
'no-redeclare': 'error',
'no-regex-spaces': 'error',
'no-return-assign': 'error',
'no-self-assign': 'error',
'no-sequences': ['error'],
'no-shadow': 'error',
'no-sparse-arrays': 'error',
'no-this-before-super': 'error',
@ -94,6 +110,7 @@ module.exports = {
'no-useless-escape': 'error',
'no-var': 'error',
'object-shorthand': ['error', 'always', {avoidQuotes: true}],
'one-var': ['error', 'never'],
'prefer-const': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-rest-params': 'error',
@ -101,6 +118,7 @@ module.exports = {
'prefer-template': 'error',
'prettier/prettier': 'error',
'require-yield': 'error',
'sort-imports': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
camelcase: ['error', {properties: 'always'}],

View file

@ -1,6 +1,6 @@
{
"name": "eslint-plugin-github",
"version": "4.1.5",
"version": "4.2.0",
"description": "An opinionated collection of ESLint shared configs and rules used by GitHub.",
"main": "lib/index.js",
"entries": [
@ -29,7 +29,10 @@
"@typescript-eslint/parser": "^4.20.0",
"eslint-config-prettier": ">=8.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-i18n-text": "^1.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-rule-documentation": ">=1.0.0",
"prettier": "^2.2.1",

18
node_modules/eslint-plugin-i18n-text/.eslintrc generated vendored Normal file
View file

@ -0,0 +1,18 @@
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"camelcase": "error",
"eqeqeq": ["error", "smart"],
"no-implicit-globals": "error",
"no-unused-expressions": "error",
"no-var": "error",
"prefer-const": "error",
"strict": "error"
}
}

6
node_modules/eslint-plugin-i18n-text/.prettierrc generated vendored Normal file
View file

@ -0,0 +1,6 @@
{
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none"
}

3
node_modules/eslint-plugin-i18n-text/.travis.yml generated vendored Normal file
View file

@ -0,0 +1,3 @@
language: node_js
node_js:
- "node"

20
node_modules/eslint-plugin-i18n-text/LICENSE generated vendored Normal file
View file

@ -0,0 +1,20 @@
Copyright (c) 2017-2019 David Graham
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

61
node_modules/eslint-plugin-i18n-text/README.md generated vendored Normal file
View file

@ -0,0 +1,61 @@
# eslint-plugin-i18n-text
Disallow English text in string literals.
Embedding messages in JavaScript files prevents them from being translated into
other languages. An alternative is to embed the translated text in the markup
and find it with JavaScript.
```html
<div class="js-message" data-success-message="It works!"></div>
```
```js
const el = document.querySelector('.js-message')
el.textContent = el.getAttribute('data-success-message')
```
This pattern allows the web framework that's generating the markup to use
its translation library to insert the appropriate translated text.
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm install eslint --save-dev
```
Next, install `eslint-plugin-i18n-text`:
```
$ npm install eslint-plugin-i18n-text --save-dev
```
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-i18n-text` globally.
## Usage
Add `i18n-text` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": [
"i18n-text"
],
"rules": {
"i18n-text/no-en": 2
}
}
```
## Development
```
npm install
npm test
```
## License
Distributed under the MIT license. See LICENSE for details.

7
node_modules/eslint-plugin-i18n-text/index.js generated vendored Normal file
View file

@ -0,0 +1,7 @@
'use strict'
module.exports = {
rules: {
'no-en': require('./rules/no-en')
}
}

27
node_modules/eslint-plugin-i18n-text/package.json generated vendored Normal file
View file

@ -0,0 +1,27 @@
{
"name": "eslint-plugin-i18n-text",
"version": "1.0.1",
"description": "Disallow English text in string literals",
"repository": "dgraham/eslint-plugin-i18n-text",
"license": "MIT",
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin"
],
"author": "David Graham",
"main": "index.js",
"scripts": {
"pretest": "eslint .",
"test": "mocha --reporter dot tests/"
},
"peerDependencies": {
"eslint": ">=5.0.0"
},
"devDependencies": {
"eslint": "^6.4.0",
"eslint-plugin-prettier": "^3.1.0",
"mocha": "^6.2.0",
"prettier": "^1.18.2"
}
}

96
node_modules/eslint-plugin-i18n-text/rules/no-en.js generated vendored Normal file
View file

@ -0,0 +1,96 @@
'use strict'
const message = 'English text in string literals is not allowed'
function isEnglish(value) {
return typeof value === 'string' && /^[A-Z][a-z]+\s/.test(value)
}
function isConsole(node) {
return (
node.callee.type === 'MemberExpression' &&
node.callee.object.name === 'console'
)
}
function isInvariant(node) {
return node.callee.type === 'Identifier' && node.callee.name === 'invariant'
}
function isSuite(node) {
return node.callee.type === 'Identifier' && node.callee.name === 'suite'
}
function isTest(node) {
return node.callee.type === 'Identifier' && node.callee.name === 'test'
}
function isAssert(node) {
const direct =
node.callee.type === 'Identifier' && node.callee.name === 'assert'
const member =
node.callee.type === 'MemberExpression' &&
node.callee.object.name === 'assert'
return direct || member
}
module.exports = function(context) {
return {
LogicalExpression: function(node) {
if (node.right.type === 'Literal' && isEnglish(node.right.value)) {
context.report({node: node.right, message})
} else if (node.right.type === 'TemplateLiteral') {
if (node.right.quasis.some(el => isEnglish(el.value.raw))) {
context.report({node: node.right, message})
}
}
},
AssignmentExpression: function(node) {
if (node.right.type === 'Literal' && isEnglish(node.right.value)) {
context.report({node: node.right, message})
} else if (node.right.type === 'TemplateLiteral') {
if (node.right.quasis.some(el => isEnglish(el.value.raw))) {
context.report({node: node.right, message})
}
}
},
CallExpression: function(node) {
if (isConsole(node) || isInvariant(node)) return
if (isSuite(node) || isTest(node) || isAssert(node)) return
for (const arg of node.arguments) {
if (arg.type === 'Literal' && isEnglish(arg.value)) {
context.report({node: arg, message})
} else if (arg.type === 'TemplateLiteral') {
if (arg.quasis.some(el => isEnglish(el.value.raw))) {
context.report({node: arg, message})
}
}
}
},
ReturnStatement: function(node) {
if (!node.argument) return
if (node.argument.type === 'Literal' && isEnglish(node.argument.value)) {
context.report({node: node.argument, message})
} else if (node.argument.type === 'TemplateLiteral') {
if (node.argument.quasis.some(el => isEnglish(el.value.raw))) {
context.report({node: node.argument, message})
}
}
},
VariableDeclarator: function(node) {
if (!node.init) return
if (node.init.type === 'Literal' && isEnglish(node.init.value)) {
context.report({node: node.init, message})
} else if (node.init.type === 'TemplateLiteral') {
if (node.init.quasis.some(el => isEnglish(el.value.raw))) {
context.report({node: node.init, message})
}
}
}
}
}
module.exports.schema = []

103
node_modules/eslint-plugin-i18n-text/tests/no-en.js generated vendored Normal file
View file

@ -0,0 +1,103 @@
'use strict'
const rule = require('../rules/no-en')
const RuleTester = require('eslint').RuleTester
const error = 'English text in string literals is not allowed'
const ruleTester = new RuleTester({parserOptions: {ecmaVersion: 6}})
ruleTester.run('no-en', rule, {
valid: [
'invariant(1 == 1, "Assertion message")',
'invariant(1 == 1, `Assertion message`)',
'console.debug("Debugging message")',
'console.debug(`Debugging message`)',
'console.log("Informational message")',
'console.warn("Warning message")',
'console.error("Error message")',
'throw new Error("Error message")',
'throw new Error(`Error message`)',
'var e = new Error("Error message")',
'var e = new Error(`Error message`)',
'var x = {"Object key": 42}',
'var x = {test: "Object value"}',
'x = 42',
'x = "42"',
'x = `42`',
'var x',
'var x = 42',
'var x = "42"',
'function x() { return }',
'function x() { return 42 }',
'function x() { return "42" }',
'document.addEventListener("click", function(){})',
'document.addEventListener(`click`, function(){})',
'suite("Test suite", function(){})',
'test("Test something", function(){})',
'assert.equal(1, 2, "Should be false")',
'assert(false, "Should be true")',
'assert(false, `Should be true`)'
],
invalid: [
{
code: 'el.textContent = "Some message text"',
errors: [{message: error, type: 'Literal'}]
},
{
code: 'var message = "Some message text"',
errors: [{message: error, type: 'Literal'}]
},
{
code: 'message = "Some message text"',
errors: [{message: error, type: 'Literal'}]
},
{
code: 'function x() { return "Some message text" }',
errors: [{message: error, type: 'Literal'}]
},
{
code: 'displayMessage("Some message text")',
errors: [{message: error, type: 'Literal'}]
},
{
code: 'list.push("Some message text")',
errors: [{message: error, type: 'Literal'}]
},
{
code: 'el.textContent = `Some ${x} message text`',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: 'el.textContent = `Some message text`',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: 'var message = `Some message text`',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: 'message = `Some message text`',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: 'function x() { return `Some message text` }',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: 'displayMessage(`Some message text`)',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: 'list.push(`Some message text`)',
errors: [{message: error, type: 'TemplateLiteral'}]
},
{
code: "someValue || 'Something went wrong'",
errors: [{message: error, type: 'Literal'}]
},
{
code: 'someValue || `Something went ${adjective} wrong`',
errors: [{message: error, type: 'TemplateLiteral'}]
}
]
})

View file

@ -6,6 +6,28 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
## [Unreleased]
## [2.24.0] - 2021-08-08
### Added
- [`no-dynamic-require`]: add option `esmodule` ([#1223], thanks [@vikr01])
- [`named`]: add `commonjs` option ([#1222], thanks [@vikr01])
- [`no-namespace`]: Add `ignore` option ([#2112], thanks [@aberezkin])
- [`max-dependencies`]: add option `ignoreTypeImports` ([#1847], thanks [@rfermann])
### Fixed
- [`no-duplicates`]: ensure autofix avoids excessive newlines ([#2028], thanks [@ertrzyiks])
- [`extensions`]: avoid crashing on partially typed import/export statements ([#2118], thanks [@ljharb])
- [`no-extraneous-dependencies`]: add ESM intermediate package.json support] ([#2121], thanks [@paztis])
- Use `context.getPhysicalFilename()` when available (ESLint 7.28+) ([#2160], thanks [@pmcelhaney])
- [`extensions`]/`importType`: fix isScoped treating @/abc as scoped module ([#2146], thanks [@rperello])
### Changed
- [Docs] [`extensions`]: removed incorrect cases ([#2138], thanks [@wenfangdu])
- [Tests] [`order`]: add tests for `pathGroupsExcludedImportTypes: ['type']` ([#2158], thanks [@atav32])
- [Docs] [`order`]: improve the documentation for the `pathGroupsExcludedImportTypes` option ([#2156], thanks [@liby])
- [Tests] [`no-cycle`]: Restructure test files ([#1517], thanks [@soryy708])
- [Docs] add description how to use plugin with yarn berry ([#2179], thanks [@KostyaZgara])
## [2.23.4] - 2021-05-29
### Fixed
@ -742,7 +764,7 @@ Unpublished from npm and re-released as 0.13.0. See [#170].
- Resolver plugins. Now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.!
## Earlier releases (0.10.1 and younger)
See [GitHub release notes](https://github.com/benmosher/eslint-plugin-import/releases?after=v0.11.0)
See [GitHub release notes](https://github.com/import-js/eslint-plugin-import/releases?after=v0.11.0)
for info on changes for earlier releases.
@ -800,432 +822,448 @@ for info on changes for earlier releases.
[`memo-parser`]: ./memo-parser/README.md
[#2099]: https://github.com/benmosher/eslint-plugin-import/pull/2099
[#2097]: https://github.com/benmosher/eslint-plugin-import/pull/2097
[#2090]: https://github.com/benmosher/eslint-plugin-import/pull/2090
[#2087]: https://github.com/benmosher/eslint-plugin-import/pull/2087
[#2083]: https://github.com/benmosher/eslint-plugin-import/pull/2083
[#2075]: https://github.com/benmosher/eslint-plugin-import/pull/2075
[#2071]: https://github.com/benmosher/eslint-plugin-import/pull/2071
[#2034]: https://github.com/benmosher/eslint-plugin-import/pull/2034
[#2026]: https://github.com/benmosher/eslint-plugin-import/pull/2026
[#2022]: https://github.com/benmosher/eslint-plugin-import/pull/2022
[#2021]: https://github.com/benmosher/eslint-plugin-import/pull/2021
[#2012]: https://github.com/benmosher/eslint-plugin-import/pull/2012
[#1997]: https://github.com/benmosher/eslint-plugin-import/pull/1997
[#1993]: https://github.com/benmosher/eslint-plugin-import/pull/1993
[#1990]: https://github.com/benmosher/eslint-plugin-import/pull/1990
[#1985]: https://github.com/benmosher/eslint-plugin-import/pull/1985
[#1983]: https://github.com/benmosher/eslint-plugin-import/pull/1983
[#1974]: https://github.com/benmosher/eslint-plugin-import/pull/1974
[#1958]: https://github.com/benmosher/eslint-plugin-import/pull/1958
[#1948]: https://github.com/benmosher/eslint-plugin-import/pull/1948
[#1947]: https://github.com/benmosher/eslint-plugin-import/pull/1947
[#1944]: https://github.com/benmosher/eslint-plugin-import/pull/1944
[#1940]: https://github.com/benmosher/eslint-plugin-import/pull/1940
[#1897]: https://github.com/benmosher/eslint-plugin-import/pull/1897
[#1889]: https://github.com/benmosher/eslint-plugin-import/pull/1889
[#1878]: https://github.com/benmosher/eslint-plugin-import/pull/1878
[#1860]: https://github.com/benmosher/eslint-plugin-import/pull/1860
[#1848]: https://github.com/benmosher/eslint-plugin-import/pull/1848
[#1846]: https://github.com/benmosher/eslint-plugin-import/pull/1846
[#1836]: https://github.com/benmosher/eslint-plugin-import/pull/1836
[#1835]: https://github.com/benmosher/eslint-plugin-import/pull/1835
[#1833]: https://github.com/benmosher/eslint-plugin-import/pull/1833
[#1831]: https://github.com/benmosher/eslint-plugin-import/pull/1831
[#1830]: https://github.com/benmosher/eslint-plugin-import/pull/1830
[#1824]: https://github.com/benmosher/eslint-plugin-import/pull/1824
[#1823]: https://github.com/benmosher/eslint-plugin-import/pull/1823
[#1822]: https://github.com/benmosher/eslint-plugin-import/pull/1822
[#1820]: https://github.com/benmosher/eslint-plugin-import/pull/1820
[#1819]: https://github.com/benmosher/eslint-plugin-import/pull/1819
[#1802]: https://github.com/benmosher/eslint-plugin-import/pull/1802
[#1788]: https://github.com/benmosher/eslint-plugin-import/pull/1788
[#1786]: https://github.com/benmosher/eslint-plugin-import/pull/1786
[#1785]: https://github.com/benmosher/eslint-plugin-import/pull/1785
[#1776]: https://github.com/benmosher/eslint-plugin-import/pull/1776
[#1770]: https://github.com/benmosher/eslint-plugin-import/pull/1770
[#1764]: https://github.com/benmosher/eslint-plugin-import/pull/1764
[#1763]: https://github.com/benmosher/eslint-plugin-import/pull/1763
[#1751]: https://github.com/benmosher/eslint-plugin-import/pull/1751
[#1744]: https://github.com/benmosher/eslint-plugin-import/pull/1744
[#1736]: https://github.com/benmosher/eslint-plugin-import/pull/1736
[#1735]: https://github.com/benmosher/eslint-plugin-import/pull/1735
[#1726]: https://github.com/benmosher/eslint-plugin-import/pull/1726
[#1724]: https://github.com/benmosher/eslint-plugin-import/pull/1724
[#1719]: https://github.com/benmosher/eslint-plugin-import/pull/1719
[#1696]: https://github.com/benmosher/eslint-plugin-import/pull/1696
[#1691]: https://github.com/benmosher/eslint-plugin-import/pull/1691
[#1690]: https://github.com/benmosher/eslint-plugin-import/pull/1690
[#1689]: https://github.com/benmosher/eslint-plugin-import/pull/1689
[#1681]: https://github.com/benmosher/eslint-plugin-import/pull/1681
[#1676]: https://github.com/benmosher/eslint-plugin-import/pull/1676
[#1666]: https://github.com/benmosher/eslint-plugin-import/pull/1666
[#1664]: https://github.com/benmosher/eslint-plugin-import/pull/1664
[#1658]: https://github.com/benmosher/eslint-plugin-import/pull/1658
[#1651]: https://github.com/benmosher/eslint-plugin-import/pull/1651
[#1626]: https://github.com/benmosher/eslint-plugin-import/pull/1626
[#1620]: https://github.com/benmosher/eslint-plugin-import/pull/1620
[#1619]: https://github.com/benmosher/eslint-plugin-import/pull/1619
[#1612]: https://github.com/benmosher/eslint-plugin-import/pull/1612
[#1611]: https://github.com/benmosher/eslint-plugin-import/pull/1611
[#1605]: https://github.com/benmosher/eslint-plugin-import/pull/1605
[#1586]: https://github.com/benmosher/eslint-plugin-import/pull/1586
[#1572]: https://github.com/benmosher/eslint-plugin-import/pull/1572
[#1569]: https://github.com/benmosher/eslint-plugin-import/pull/1569
[#1563]: https://github.com/benmosher/eslint-plugin-import/pull/1563
[#1560]: https://github.com/benmosher/eslint-plugin-import/pull/1560
[#1551]: https://github.com/benmosher/eslint-plugin-import/pull/1551
[#1542]: https://github.com/benmosher/eslint-plugin-import/pull/1542
[#1534]: https://github.com/benmosher/eslint-plugin-import/pull/1534
[#1528]: https://github.com/benmosher/eslint-plugin-import/pull/1528
[#1526]: https://github.com/benmosher/eslint-plugin-import/pull/1526
[#1521]: https://github.com/benmosher/eslint-plugin-import/pull/1521
[#1519]: https://github.com/benmosher/eslint-plugin-import/pull/1519
[#1507]: https://github.com/benmosher/eslint-plugin-import/pull/1507
[#1506]: https://github.com/benmosher/eslint-plugin-import/pull/1506
[#1496]: https://github.com/benmosher/eslint-plugin-import/pull/1496
[#1495]: https://github.com/benmosher/eslint-plugin-import/pull/1495
[#1494]: https://github.com/benmosher/eslint-plugin-import/pull/1494
[#1493]: https://github.com/benmosher/eslint-plugin-import/pull/1493
[#1491]: https://github.com/benmosher/eslint-plugin-import/pull/1491
[#1472]: https://github.com/benmosher/eslint-plugin-import/pull/1472
[#1470]: https://github.com/benmosher/eslint-plugin-import/pull/1470
[#1447]: https://github.com/benmosher/eslint-plugin-import/pull/1447
[#1439]: https://github.com/benmosher/eslint-plugin-import/pull/1439
[#1436]: https://github.com/benmosher/eslint-plugin-import/pull/1436
[#1435]: https://github.com/benmosher/eslint-plugin-import/pull/1435
[#1425]: https://github.com/benmosher/eslint-plugin-import/pull/1425
[#1419]: https://github.com/benmosher/eslint-plugin-import/pull/1419
[#1412]: https://github.com/benmosher/eslint-plugin-import/pull/1412
[#1409]: https://github.com/benmosher/eslint-plugin-import/pull/1409
[#1404]: https://github.com/benmosher/eslint-plugin-import/pull/1404
[#1401]: https://github.com/benmosher/eslint-plugin-import/pull/1401
[#1393]: https://github.com/benmosher/eslint-plugin-import/pull/1393
[#1389]: https://github.com/benmosher/eslint-plugin-import/pull/1389
[#1386]: https://github.com/benmosher/eslint-plugin-import/pull/1386
[#1377]: https://github.com/benmosher/eslint-plugin-import/pull/1377
[#1375]: https://github.com/benmosher/eslint-plugin-import/pull/1375
[#1372]: https://github.com/benmosher/eslint-plugin-import/pull/1372
[#1371]: https://github.com/benmosher/eslint-plugin-import/pull/1371
[#1370]: https://github.com/benmosher/eslint-plugin-import/pull/1370
[#1363]: https://github.com/benmosher/eslint-plugin-import/pull/1363
[#1360]: https://github.com/benmosher/eslint-plugin-import/pull/1360
[#1358]: https://github.com/benmosher/eslint-plugin-import/pull/1358
[#1356]: https://github.com/benmosher/eslint-plugin-import/pull/1356
[#1354]: https://github.com/benmosher/eslint-plugin-import/pull/1354
[#1352]: https://github.com/benmosher/eslint-plugin-import/pull/1352
[#1347]: https://github.com/benmosher/eslint-plugin-import/pull/1347
[#1345]: https://github.com/benmosher/eslint-plugin-import/pull/1345
[#1342]: https://github.com/benmosher/eslint-plugin-import/pull/1342
[#1340]: https://github.com/benmosher/eslint-plugin-import/pull/1340
[#1333]: https://github.com/benmosher/eslint-plugin-import/pull/1333
[#1331]: https://github.com/benmosher/eslint-plugin-import/pull/1331
[#1330]: https://github.com/benmosher/eslint-plugin-import/pull/1330
[#1320]: https://github.com/benmosher/eslint-plugin-import/pull/1320
[#1319]: https://github.com/benmosher/eslint-plugin-import/pull/1319
[#1312]: https://github.com/benmosher/eslint-plugin-import/pull/1312
[#1308]: https://github.com/benmosher/eslint-plugin-import/pull/1308
[#1304]: https://github.com/benmosher/eslint-plugin-import/pull/1304
[#1297]: https://github.com/benmosher/eslint-plugin-import/pull/1297
[#1295]: https://github.com/benmosher/eslint-plugin-import/pull/1295
[#1294]: https://github.com/benmosher/eslint-plugin-import/pull/1294
[#1290]: https://github.com/benmosher/eslint-plugin-import/pull/1290
[#1277]: https://github.com/benmosher/eslint-plugin-import/pull/1277
[#1257]: https://github.com/benmosher/eslint-plugin-import/pull/1257
[#1253]: https://github.com/benmosher/eslint-plugin-import/pull/1253
[#1248]: https://github.com/benmosher/eslint-plugin-import/pull/1248
[#1238]: https://github.com/benmosher/eslint-plugin-import/pull/1238
[#1237]: https://github.com/benmosher/eslint-plugin-import/pull/1237
[#1235]: https://github.com/benmosher/eslint-plugin-import/pull/1235
[#1234]: https://github.com/benmosher/eslint-plugin-import/pull/1234
[#1232]: https://github.com/benmosher/eslint-plugin-import/pull/1232
[#1218]: https://github.com/benmosher/eslint-plugin-import/pull/1218
[#1176]: https://github.com/benmosher/eslint-plugin-import/pull/1176
[#1163]: https://github.com/benmosher/eslint-plugin-import/pull/1163
[#1157]: https://github.com/benmosher/eslint-plugin-import/pull/1157
[#1151]: https://github.com/benmosher/eslint-plugin-import/pull/1151
[#1142]: https://github.com/benmosher/eslint-plugin-import/pull/1142
[#1139]: https://github.com/benmosher/eslint-plugin-import/pull/1139
[#1137]: https://github.com/benmosher/eslint-plugin-import/pull/1137
[#1135]: https://github.com/benmosher/eslint-plugin-import/pull/1135
[#1128]: https://github.com/benmosher/eslint-plugin-import/pull/1128
[#1126]: https://github.com/benmosher/eslint-plugin-import/pull/1126
[#1122]: https://github.com/benmosher/eslint-plugin-import/pull/1122
[#1112]: https://github.com/benmosher/eslint-plugin-import/pull/1112
[#1107]: https://github.com/benmosher/eslint-plugin-import/pull/1107
[#1106]: https://github.com/benmosher/eslint-plugin-import/pull/1106
[#1105]: https://github.com/benmosher/eslint-plugin-import/pull/1105
[#1093]: https://github.com/benmosher/eslint-plugin-import/pull/1093
[#1085]: https://github.com/benmosher/eslint-plugin-import/pull/1085
[#1068]: https://github.com/benmosher/eslint-plugin-import/pull/1068
[#1049]: https://github.com/benmosher/eslint-plugin-import/pull/1049
[#1046]: https://github.com/benmosher/eslint-plugin-import/pull/1046
[#966]: https://github.com/benmosher/eslint-plugin-import/pull/966
[#944]: https://github.com/benmosher/eslint-plugin-import/pull/944
[#912]: https://github.com/benmosher/eslint-plugin-import/pull/912
[#908]: https://github.com/benmosher/eslint-plugin-import/pull/908
[#891]: https://github.com/benmosher/eslint-plugin-import/pull/891
[#889]: https://github.com/benmosher/eslint-plugin-import/pull/889
[#880]: https://github.com/benmosher/eslint-plugin-import/pull/880
[#871]: https://github.com/benmosher/eslint-plugin-import/pull/871
[#858]: https://github.com/benmosher/eslint-plugin-import/pull/858
[#843]: https://github.com/benmosher/eslint-plugin-import/pull/843
[#804]: https://github.com/benmosher/eslint-plugin-import/pull/804
[#797]: https://github.com/benmosher/eslint-plugin-import/pull/797
[#794]: https://github.com/benmosher/eslint-plugin-import/pull/794
[#744]: https://github.com/benmosher/eslint-plugin-import/pull/744
[#742]: https://github.com/benmosher/eslint-plugin-import/pull/742
[#737]: https://github.com/benmosher/eslint-plugin-import/pull/737
[#727]: https://github.com/benmosher/eslint-plugin-import/pull/727
[#721]: https://github.com/benmosher/eslint-plugin-import/pull/721
[#712]: https://github.com/benmosher/eslint-plugin-import/pull/712
[#696]: https://github.com/benmosher/eslint-plugin-import/pull/696
[#685]: https://github.com/benmosher/eslint-plugin-import/pull/685
[#680]: https://github.com/benmosher/eslint-plugin-import/pull/680
[#654]: https://github.com/benmosher/eslint-plugin-import/pull/654
[#639]: https://github.com/benmosher/eslint-plugin-import/pull/639
[#632]: https://github.com/benmosher/eslint-plugin-import/pull/632
[#630]: https://github.com/benmosher/eslint-plugin-import/pull/630
[#629]: https://github.com/benmosher/eslint-plugin-import/pull/629
[#628]: https://github.com/benmosher/eslint-plugin-import/pull/628
[#596]: https://github.com/benmosher/eslint-plugin-import/pull/596
[#586]: https://github.com/benmosher/eslint-plugin-import/pull/586
[#578]: https://github.com/benmosher/eslint-plugin-import/pull/578
[#568]: https://github.com/benmosher/eslint-plugin-import/pull/568
[#555]: https://github.com/benmosher/eslint-plugin-import/pull/555
[#538]: https://github.com/benmosher/eslint-plugin-import/pull/538
[#527]: https://github.com/benmosher/eslint-plugin-import/pull/527
[#518]: https://github.com/benmosher/eslint-plugin-import/pull/518
[#509]: https://github.com/benmosher/eslint-plugin-import/pull/509
[#508]: https://github.com/benmosher/eslint-plugin-import/pull/508
[#503]: https://github.com/benmosher/eslint-plugin-import/pull/503
[#499]: https://github.com/benmosher/eslint-plugin-import/pull/499
[#489]: https://github.com/benmosher/eslint-plugin-import/pull/489
[#485]: https://github.com/benmosher/eslint-plugin-import/pull/485
[#461]: https://github.com/benmosher/eslint-plugin-import/pull/461
[#449]: https://github.com/benmosher/eslint-plugin-import/pull/449
[#444]: https://github.com/benmosher/eslint-plugin-import/pull/444
[#428]: https://github.com/benmosher/eslint-plugin-import/pull/428
[#395]: https://github.com/benmosher/eslint-plugin-import/pull/395
[#371]: https://github.com/benmosher/eslint-plugin-import/pull/371
[#365]: https://github.com/benmosher/eslint-plugin-import/pull/365
[#359]: https://github.com/benmosher/eslint-plugin-import/pull/359
[#343]: https://github.com/benmosher/eslint-plugin-import/pull/343
[#332]: https://github.com/benmosher/eslint-plugin-import/pull/332
[#322]: https://github.com/benmosher/eslint-plugin-import/pull/322
[#321]: https://github.com/benmosher/eslint-plugin-import/pull/321
[#316]: https://github.com/benmosher/eslint-plugin-import/pull/316
[#314]: https://github.com/benmosher/eslint-plugin-import/pull/314
[#308]: https://github.com/benmosher/eslint-plugin-import/pull/308
[#298]: https://github.com/benmosher/eslint-plugin-import/pull/298
[#297]: https://github.com/benmosher/eslint-plugin-import/pull/297
[#296]: https://github.com/benmosher/eslint-plugin-import/pull/296
[#290]: https://github.com/benmosher/eslint-plugin-import/pull/290
[#289]: https://github.com/benmosher/eslint-plugin-import/pull/289
[#288]: https://github.com/benmosher/eslint-plugin-import/pull/288
[#287]: https://github.com/benmosher/eslint-plugin-import/pull/287
[#278]: https://github.com/benmosher/eslint-plugin-import/pull/278
[#261]: https://github.com/benmosher/eslint-plugin-import/pull/261
[#256]: https://github.com/benmosher/eslint-plugin-import/pull/256
[#254]: https://github.com/benmosher/eslint-plugin-import/pull/254
[#250]: https://github.com/benmosher/eslint-plugin-import/pull/250
[#247]: https://github.com/benmosher/eslint-plugin-import/pull/247
[#245]: https://github.com/benmosher/eslint-plugin-import/pull/245
[#243]: https://github.com/benmosher/eslint-plugin-import/pull/243
[#241]: https://github.com/benmosher/eslint-plugin-import/pull/241
[#239]: https://github.com/benmosher/eslint-plugin-import/pull/239
[#228]: https://github.com/benmosher/eslint-plugin-import/pull/228
[#211]: https://github.com/benmosher/eslint-plugin-import/pull/211
[#164]: https://github.com/benmosher/eslint-plugin-import/pull/164
[#157]: https://github.com/benmosher/eslint-plugin-import/pull/157
[#2067]: https://github.com/benmosher/eslint-plugin-import/issues/2067
[#2056]: https://github.com/benmosher/eslint-plugin-import/issues/2056
[#2063]: https://github.com/benmosher/eslint-plugin-import/issues/2063
[#1965]: https://github.com/benmosher/eslint-plugin-import/issues/1965
[#1924]: https://github.com/benmosher/eslint-plugin-import/issues/1924
[#1854]: https://github.com/benmosher/eslint-plugin-import/issues/1854
[#1841]: https://github.com/benmosher/eslint-plugin-import/issues/1841
[#1834]: https://github.com/benmosher/eslint-plugin-import/issues/1834
[#1814]: https://github.com/benmosher/eslint-plugin-import/issues/1814
[#1811]: https://github.com/benmosher/eslint-plugin-import/issues/1811
[#1808]: https://github.com/benmosher/eslint-plugin-import/issues/1808
[#1805]: https://github.com/benmosher/eslint-plugin-import/issues/1805
[#1801]: https://github.com/benmosher/eslint-plugin-import/issues/1801
[#1722]: https://github.com/benmosher/eslint-plugin-import/issues/1722
[#1704]: https://github.com/benmosher/eslint-plugin-import/issues/1704
[#1702]: https://github.com/benmosher/eslint-plugin-import/issues/1702
[#1635]: https://github.com/benmosher/eslint-plugin-import/issues/1635
[#1631]: https://github.com/benmosher/eslint-plugin-import/issues/1631
[#1616]: https://github.com/benmosher/eslint-plugin-import/issues/1616
[#1613]: https://github.com/benmosher/eslint-plugin-import/issues/1613
[#1589]: https://github.com/benmosher/eslint-plugin-import/issues/1589
[#1565]: https://github.com/benmosher/eslint-plugin-import/issues/1565
[#1366]: https://github.com/benmosher/eslint-plugin-import/issues/1366
[#1334]: https://github.com/benmosher/eslint-plugin-import/issues/1334
[#1323]: https://github.com/benmosher/eslint-plugin-import/issues/1323
[#1322]: https://github.com/benmosher/eslint-plugin-import/issues/1322
[#1300]: https://github.com/benmosher/eslint-plugin-import/issues/1300
[#1293]: https://github.com/benmosher/eslint-plugin-import/issues/1293
[#1266]: https://github.com/benmosher/eslint-plugin-import/issues/1266
[#1256]: https://github.com/benmosher/eslint-plugin-import/issues/1256
[#1233]: https://github.com/benmosher/eslint-plugin-import/issues/1233
[#1175]: https://github.com/benmosher/eslint-plugin-import/issues/1175
[#1166]: https://github.com/benmosher/eslint-plugin-import/issues/1166
[#1144]: https://github.com/benmosher/eslint-plugin-import/issues/1144
[#1058]: https://github.com/benmosher/eslint-plugin-import/issues/1058
[#1035]: https://github.com/benmosher/eslint-plugin-import/issues/1035
[#931]: https://github.com/benmosher/eslint-plugin-import/issues/931
[#886]: https://github.com/benmosher/eslint-plugin-import/issues/886
[#863]: https://github.com/benmosher/eslint-plugin-import/issues/863
[#842]: https://github.com/benmosher/eslint-plugin-import/issues/842
[#839]: https://github.com/benmosher/eslint-plugin-import/issues/839
[#795]: https://github.com/benmosher/eslint-plugin-import/issues/795
[#793]: https://github.com/benmosher/eslint-plugin-import/issues/793
[#720]: https://github.com/benmosher/eslint-plugin-import/issues/720
[#717]: https://github.com/benmosher/eslint-plugin-import/issues/717
[#686]: https://github.com/benmosher/eslint-plugin-import/issues/686
[#671]: https://github.com/benmosher/eslint-plugin-import/issues/671
[#660]: https://github.com/benmosher/eslint-plugin-import/issues/660
[#653]: https://github.com/benmosher/eslint-plugin-import/issues/653
[#627]: https://github.com/benmosher/eslint-plugin-import/issues/627
[#620]: https://github.com/benmosher/eslint-plugin-import/issues/620
[#609]: https://github.com/benmosher/eslint-plugin-import/issues/609
[#604]: https://github.com/benmosher/eslint-plugin-import/issues/604
[#602]: https://github.com/benmosher/eslint-plugin-import/issues/602
[#601]: https://github.com/benmosher/eslint-plugin-import/issues/601
[#592]: https://github.com/benmosher/eslint-plugin-import/issues/592
[#577]: https://github.com/benmosher/eslint-plugin-import/issues/577
[#570]: https://github.com/benmosher/eslint-plugin-import/issues/570
[#567]: https://github.com/benmosher/eslint-plugin-import/issues/567
[#566]: https://github.com/benmosher/eslint-plugin-import/issues/566
[#545]: https://github.com/benmosher/eslint-plugin-import/issues/545
[#530]: https://github.com/benmosher/eslint-plugin-import/issues/530
[#529]: https://github.com/benmosher/eslint-plugin-import/issues/529
[#519]: https://github.com/benmosher/eslint-plugin-import/issues/519
[#507]: https://github.com/benmosher/eslint-plugin-import/issues/507
[#484]: https://github.com/benmosher/eslint-plugin-import/issues/484
[#478]: https://github.com/benmosher/eslint-plugin-import/issues/478
[#456]: https://github.com/benmosher/eslint-plugin-import/issues/456
[#453]: https://github.com/benmosher/eslint-plugin-import/issues/453
[#452]: https://github.com/benmosher/eslint-plugin-import/issues/452
[#447]: https://github.com/benmosher/eslint-plugin-import/issues/447
[#441]: https://github.com/benmosher/eslint-plugin-import/issues/441
[#423]: https://github.com/benmosher/eslint-plugin-import/issues/423
[#416]: https://github.com/benmosher/eslint-plugin-import/issues/416
[#415]: https://github.com/benmosher/eslint-plugin-import/issues/415
[#402]: https://github.com/benmosher/eslint-plugin-import/issues/402
[#386]: https://github.com/benmosher/eslint-plugin-import/issues/386
[#373]: https://github.com/benmosher/eslint-plugin-import/issues/373
[#370]: https://github.com/benmosher/eslint-plugin-import/issues/370
[#348]: https://github.com/benmosher/eslint-plugin-import/issues/348
[#342]: https://github.com/benmosher/eslint-plugin-import/issues/342
[#328]: https://github.com/benmosher/eslint-plugin-import/issues/328
[#317]: https://github.com/benmosher/eslint-plugin-import/issues/317
[#313]: https://github.com/benmosher/eslint-plugin-import/issues/313
[#311]: https://github.com/benmosher/eslint-plugin-import/issues/311
[#306]: https://github.com/benmosher/eslint-plugin-import/issues/306
[#286]: https://github.com/benmosher/eslint-plugin-import/issues/286
[#283]: https://github.com/benmosher/eslint-plugin-import/issues/283
[#281]: https://github.com/benmosher/eslint-plugin-import/issues/281
[#275]: https://github.com/benmosher/eslint-plugin-import/issues/275
[#272]: https://github.com/benmosher/eslint-plugin-import/issues/272
[#270]: https://github.com/benmosher/eslint-plugin-import/issues/270
[#267]: https://github.com/benmosher/eslint-plugin-import/issues/267
[#266]: https://github.com/benmosher/eslint-plugin-import/issues/266
[#216]: https://github.com/benmosher/eslint-plugin-import/issues/216
[#214]: https://github.com/benmosher/eslint-plugin-import/issues/214
[#210]: https://github.com/benmosher/eslint-plugin-import/issues/210
[#200]: https://github.com/benmosher/eslint-plugin-import/issues/200
[#192]: https://github.com/benmosher/eslint-plugin-import/issues/192
[#191]: https://github.com/benmosher/eslint-plugin-import/issues/191
[#189]: https://github.com/benmosher/eslint-plugin-import/issues/189
[#170]: https://github.com/benmosher/eslint-plugin-import/issues/170
[#155]: https://github.com/benmosher/eslint-plugin-import/issues/155
[#119]: https://github.com/benmosher/eslint-plugin-import/issues/119
[#89]: https://github.com/benmosher/eslint-plugin-import/issues/89
[#2179]: https://github.com/import-js/eslint-plugin-import/pull/2179
[#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160
[#2158]: https://github.com/import-js/eslint-plugin-import/pull/2158
[#2156]: https://github.com/import-js/eslint-plugin-import/pull/2156
[#2146]: https://github.com/import-js/eslint-plugin-import/pull/2146
[#2138]: https://github.com/import-js/eslint-plugin-import/pull/2138
[#2121]: https://github.com/import-js/eslint-plugin-import/pull/2121
[#2112]: https://github.com/import-js/eslint-plugin-import/pull/2112
[#2099]: https://github.com/import-js/eslint-plugin-import/pull/2099
[#2097]: https://github.com/import-js/eslint-plugin-import/pull/2097
[#2090]: https://github.com/import-js/eslint-plugin-import/pull/2090
[#2087]: https://github.com/import-js/eslint-plugin-import/pull/2087
[#2083]: https://github.com/import-js/eslint-plugin-import/pull/2083
[#2075]: https://github.com/import-js/eslint-plugin-import/pull/2075
[#2071]: https://github.com/import-js/eslint-plugin-import/pull/2071
[#2034]: https://github.com/import-js/eslint-plugin-import/pull/2034
[#2028]: https://github.com/import-js/eslint-plugin-import/pull/2028
[#2026]: https://github.com/import-js/eslint-plugin-import/pull/2026
[#2022]: https://github.com/import-js/eslint-plugin-import/pull/2022
[#2021]: https://github.com/import-js/eslint-plugin-import/pull/2021
[#2012]: https://github.com/import-js/eslint-plugin-import/pull/2012
[#1997]: https://github.com/import-js/eslint-plugin-import/pull/1997
[#1993]: https://github.com/import-js/eslint-plugin-import/pull/1993
[#1990]: https://github.com/import-js/eslint-plugin-import/pull/1990
[#1985]: https://github.com/import-js/eslint-plugin-import/pull/1985
[#1983]: https://github.com/import-js/eslint-plugin-import/pull/1983
[#1974]: https://github.com/import-js/eslint-plugin-import/pull/1974
[#1958]: https://github.com/import-js/eslint-plugin-import/pull/1958
[#1948]: https://github.com/import-js/eslint-plugin-import/pull/1948
[#1947]: https://github.com/import-js/eslint-plugin-import/pull/1947
[#1944]: https://github.com/import-js/eslint-plugin-import/pull/1944
[#1940]: https://github.com/import-js/eslint-plugin-import/pull/1940
[#1897]: https://github.com/import-js/eslint-plugin-import/pull/1897
[#1889]: https://github.com/import-js/eslint-plugin-import/pull/1889
[#1878]: https://github.com/import-js/eslint-plugin-import/pull/1878
[#1860]: https://github.com/import-js/eslint-plugin-import/pull/1860
[#1848]: https://github.com/import-js/eslint-plugin-import/pull/1848
[#1847]: https://github.com/import-js/eslint-plugin-import/pull/1847
[#1846]: https://github.com/import-js/eslint-plugin-import/pull/1846
[#1836]: https://github.com/import-js/eslint-plugin-import/pull/1836
[#1835]: https://github.com/import-js/eslint-plugin-import/pull/1835
[#1833]: https://github.com/import-js/eslint-plugin-import/pull/1833
[#1831]: https://github.com/import-js/eslint-plugin-import/pull/1831
[#1830]: https://github.com/import-js/eslint-plugin-import/pull/1830
[#1824]: https://github.com/import-js/eslint-plugin-import/pull/1824
[#1823]: https://github.com/import-js/eslint-plugin-import/pull/1823
[#1822]: https://github.com/import-js/eslint-plugin-import/pull/1822
[#1820]: https://github.com/import-js/eslint-plugin-import/pull/1820
[#1819]: https://github.com/import-js/eslint-plugin-import/pull/1819
[#1802]: https://github.com/import-js/eslint-plugin-import/pull/1802
[#1788]: https://github.com/import-js/eslint-plugin-import/pull/1788
[#1786]: https://github.com/import-js/eslint-plugin-import/pull/1786
[#1785]: https://github.com/import-js/eslint-plugin-import/pull/1785
[#1776]: https://github.com/import-js/eslint-plugin-import/pull/1776
[#1770]: https://github.com/import-js/eslint-plugin-import/pull/1770
[#1764]: https://github.com/import-js/eslint-plugin-import/pull/1764
[#1763]: https://github.com/import-js/eslint-plugin-import/pull/1763
[#1751]: https://github.com/import-js/eslint-plugin-import/pull/1751
[#1744]: https://github.com/import-js/eslint-plugin-import/pull/1744
[#1736]: https://github.com/import-js/eslint-plugin-import/pull/1736
[#1735]: https://github.com/import-js/eslint-plugin-import/pull/1735
[#1726]: https://github.com/import-js/eslint-plugin-import/pull/1726
[#1724]: https://github.com/import-js/eslint-plugin-import/pull/1724
[#1719]: https://github.com/import-js/eslint-plugin-import/pull/1719
[#1696]: https://github.com/import-js/eslint-plugin-import/pull/1696
[#1691]: https://github.com/import-js/eslint-plugin-import/pull/1691
[#1690]: https://github.com/import-js/eslint-plugin-import/pull/1690
[#1689]: https://github.com/import-js/eslint-plugin-import/pull/1689
[#1681]: https://github.com/import-js/eslint-plugin-import/pull/1681
[#1676]: https://github.com/import-js/eslint-plugin-import/pull/1676
[#1666]: https://github.com/import-js/eslint-plugin-import/pull/1666
[#1664]: https://github.com/import-js/eslint-plugin-import/pull/1664
[#1658]: https://github.com/import-js/eslint-plugin-import/pull/1658
[#1651]: https://github.com/import-js/eslint-plugin-import/pull/1651
[#1626]: https://github.com/import-js/eslint-plugin-import/pull/1626
[#1620]: https://github.com/import-js/eslint-plugin-import/pull/1620
[#1619]: https://github.com/import-js/eslint-plugin-import/pull/1619
[#1612]: https://github.com/import-js/eslint-plugin-import/pull/1612
[#1611]: https://github.com/import-js/eslint-plugin-import/pull/1611
[#1605]: https://github.com/import-js/eslint-plugin-import/pull/1605
[#1586]: https://github.com/import-js/eslint-plugin-import/pull/1586
[#1572]: https://github.com/import-js/eslint-plugin-import/pull/1572
[#1569]: https://github.com/import-js/eslint-plugin-import/pull/1569
[#1563]: https://github.com/import-js/eslint-plugin-import/pull/1563
[#1560]: https://github.com/import-js/eslint-plugin-import/pull/1560
[#1551]: https://github.com/import-js/eslint-plugin-import/pull/1551
[#1542]: https://github.com/import-js/eslint-plugin-import/pull/1542
[#1534]: https://github.com/import-js/eslint-plugin-import/pull/1534
[#1528]: https://github.com/import-js/eslint-plugin-import/pull/1528
[#1526]: https://github.com/import-js/eslint-plugin-import/pull/1526
[#1521]: https://github.com/import-js/eslint-plugin-import/pull/1521
[#1519]: https://github.com/import-js/eslint-plugin-import/pull/1519
[#1517]: https://github.com/import-js/eslint-plugin-import/pull/1517
[#1507]: https://github.com/import-js/eslint-plugin-import/pull/1507
[#1506]: https://github.com/import-js/eslint-plugin-import/pull/1506
[#1496]: https://github.com/import-js/eslint-plugin-import/pull/1496
[#1495]: https://github.com/import-js/eslint-plugin-import/pull/1495
[#1494]: https://github.com/import-js/eslint-plugin-import/pull/1494
[#1493]: https://github.com/import-js/eslint-plugin-import/pull/1493
[#1491]: https://github.com/import-js/eslint-plugin-import/pull/1491
[#1472]: https://github.com/import-js/eslint-plugin-import/pull/1472
[#1470]: https://github.com/import-js/eslint-plugin-import/pull/1470
[#1447]: https://github.com/import-js/eslint-plugin-import/pull/1447
[#1439]: https://github.com/import-js/eslint-plugin-import/pull/1439
[#1436]: https://github.com/import-js/eslint-plugin-import/pull/1436
[#1435]: https://github.com/import-js/eslint-plugin-import/pull/1435
[#1425]: https://github.com/import-js/eslint-plugin-import/pull/1425
[#1419]: https://github.com/import-js/eslint-plugin-import/pull/1419
[#1412]: https://github.com/import-js/eslint-plugin-import/pull/1412
[#1409]: https://github.com/import-js/eslint-plugin-import/pull/1409
[#1404]: https://github.com/import-js/eslint-plugin-import/pull/1404
[#1401]: https://github.com/import-js/eslint-plugin-import/pull/1401
[#1393]: https://github.com/import-js/eslint-plugin-import/pull/1393
[#1389]: https://github.com/import-js/eslint-plugin-import/pull/1389
[#1386]: https://github.com/import-js/eslint-plugin-import/pull/1386
[#1377]: https://github.com/import-js/eslint-plugin-import/pull/1377
[#1375]: https://github.com/import-js/eslint-plugin-import/pull/1375
[#1372]: https://github.com/import-js/eslint-plugin-import/pull/1372
[#1371]: https://github.com/import-js/eslint-plugin-import/pull/1371
[#1370]: https://github.com/import-js/eslint-plugin-import/pull/1370
[#1363]: https://github.com/import-js/eslint-plugin-import/pull/1363
[#1360]: https://github.com/import-js/eslint-plugin-import/pull/1360
[#1358]: https://github.com/import-js/eslint-plugin-import/pull/1358
[#1356]: https://github.com/import-js/eslint-plugin-import/pull/1356
[#1354]: https://github.com/import-js/eslint-plugin-import/pull/1354
[#1352]: https://github.com/import-js/eslint-plugin-import/pull/1352
[#1347]: https://github.com/import-js/eslint-plugin-import/pull/1347
[#1345]: https://github.com/import-js/eslint-plugin-import/pull/1345
[#1342]: https://github.com/import-js/eslint-plugin-import/pull/1342
[#1340]: https://github.com/import-js/eslint-plugin-import/pull/1340
[#1333]: https://github.com/import-js/eslint-plugin-import/pull/1333
[#1331]: https://github.com/import-js/eslint-plugin-import/pull/1331
[#1330]: https://github.com/import-js/eslint-plugin-import/pull/1330
[#1320]: https://github.com/import-js/eslint-plugin-import/pull/1320
[#1319]: https://github.com/import-js/eslint-plugin-import/pull/1319
[#1312]: https://github.com/import-js/eslint-plugin-import/pull/1312
[#1308]: https://github.com/import-js/eslint-plugin-import/pull/1308
[#1304]: https://github.com/import-js/eslint-plugin-import/pull/1304
[#1297]: https://github.com/import-js/eslint-plugin-import/pull/1297
[#1295]: https://github.com/import-js/eslint-plugin-import/pull/1295
[#1294]: https://github.com/import-js/eslint-plugin-import/pull/1294
[#1290]: https://github.com/import-js/eslint-plugin-import/pull/1290
[#1277]: https://github.com/import-js/eslint-plugin-import/pull/1277
[#1257]: https://github.com/import-js/eslint-plugin-import/pull/1257
[#1253]: https://github.com/import-js/eslint-plugin-import/pull/1253
[#1248]: https://github.com/import-js/eslint-plugin-import/pull/1248
[#1238]: https://github.com/import-js/eslint-plugin-import/pull/1238
[#1237]: https://github.com/import-js/eslint-plugin-import/pull/1237
[#1235]: https://github.com/import-js/eslint-plugin-import/pull/1235
[#1234]: https://github.com/import-js/eslint-plugin-import/pull/1234
[#1232]: https://github.com/import-js/eslint-plugin-import/pull/1232
[#1223]: https://github.com/import-js/eslint-plugin-import/pull/1223
[#1222]: https://github.com/import-js/eslint-plugin-import/pull/1222
[#1218]: https://github.com/import-js/eslint-plugin-import/pull/1218
[#1176]: https://github.com/import-js/eslint-plugin-import/pull/1176
[#1163]: https://github.com/import-js/eslint-plugin-import/pull/1163
[#1157]: https://github.com/import-js/eslint-plugin-import/pull/1157
[#1151]: https://github.com/import-js/eslint-plugin-import/pull/1151
[#1142]: https://github.com/import-js/eslint-plugin-import/pull/1142
[#1139]: https://github.com/import-js/eslint-plugin-import/pull/1139
[#1137]: https://github.com/import-js/eslint-plugin-import/pull/1137
[#1135]: https://github.com/import-js/eslint-plugin-import/pull/1135
[#1128]: https://github.com/import-js/eslint-plugin-import/pull/1128
[#1126]: https://github.com/import-js/eslint-plugin-import/pull/1126
[#1122]: https://github.com/import-js/eslint-plugin-import/pull/1122
[#1112]: https://github.com/import-js/eslint-plugin-import/pull/1112
[#1107]: https://github.com/import-js/eslint-plugin-import/pull/1107
[#1106]: https://github.com/import-js/eslint-plugin-import/pull/1106
[#1105]: https://github.com/import-js/eslint-plugin-import/pull/1105
[#1093]: https://github.com/import-js/eslint-plugin-import/pull/1093
[#1085]: https://github.com/import-js/eslint-plugin-import/pull/1085
[#1068]: https://github.com/import-js/eslint-plugin-import/pull/1068
[#1049]: https://github.com/import-js/eslint-plugin-import/pull/1049
[#1046]: https://github.com/import-js/eslint-plugin-import/pull/1046
[#966]: https://github.com/import-js/eslint-plugin-import/pull/966
[#944]: https://github.com/import-js/eslint-plugin-import/pull/944
[#912]: https://github.com/import-js/eslint-plugin-import/pull/912
[#908]: https://github.com/import-js/eslint-plugin-import/pull/908
[#891]: https://github.com/import-js/eslint-plugin-import/pull/891
[#889]: https://github.com/import-js/eslint-plugin-import/pull/889
[#880]: https://github.com/import-js/eslint-plugin-import/pull/880
[#871]: https://github.com/import-js/eslint-plugin-import/pull/871
[#858]: https://github.com/import-js/eslint-plugin-import/pull/858
[#843]: https://github.com/import-js/eslint-plugin-import/pull/843
[#804]: https://github.com/import-js/eslint-plugin-import/pull/804
[#797]: https://github.com/import-js/eslint-plugin-import/pull/797
[#794]: https://github.com/import-js/eslint-plugin-import/pull/794
[#744]: https://github.com/import-js/eslint-plugin-import/pull/744
[#742]: https://github.com/import-js/eslint-plugin-import/pull/742
[#737]: https://github.com/import-js/eslint-plugin-import/pull/737
[#727]: https://github.com/import-js/eslint-plugin-import/pull/727
[#721]: https://github.com/import-js/eslint-plugin-import/pull/721
[#712]: https://github.com/import-js/eslint-plugin-import/pull/712
[#696]: https://github.com/import-js/eslint-plugin-import/pull/696
[#685]: https://github.com/import-js/eslint-plugin-import/pull/685
[#680]: https://github.com/import-js/eslint-plugin-import/pull/680
[#654]: https://github.com/import-js/eslint-plugin-import/pull/654
[#639]: https://github.com/import-js/eslint-plugin-import/pull/639
[#632]: https://github.com/import-js/eslint-plugin-import/pull/632
[#630]: https://github.com/import-js/eslint-plugin-import/pull/630
[#629]: https://github.com/import-js/eslint-plugin-import/pull/629
[#628]: https://github.com/import-js/eslint-plugin-import/pull/628
[#596]: https://github.com/import-js/eslint-plugin-import/pull/596
[#586]: https://github.com/import-js/eslint-plugin-import/pull/586
[#578]: https://github.com/import-js/eslint-plugin-import/pull/578
[#568]: https://github.com/import-js/eslint-plugin-import/pull/568
[#555]: https://github.com/import-js/eslint-plugin-import/pull/555
[#538]: https://github.com/import-js/eslint-plugin-import/pull/538
[#527]: https://github.com/import-js/eslint-plugin-import/pull/527
[#518]: https://github.com/import-js/eslint-plugin-import/pull/518
[#509]: https://github.com/import-js/eslint-plugin-import/pull/509
[#508]: https://github.com/import-js/eslint-plugin-import/pull/508
[#503]: https://github.com/import-js/eslint-plugin-import/pull/503
[#499]: https://github.com/import-js/eslint-plugin-import/pull/499
[#489]: https://github.com/import-js/eslint-plugin-import/pull/489
[#485]: https://github.com/import-js/eslint-plugin-import/pull/485
[#461]: https://github.com/import-js/eslint-plugin-import/pull/461
[#449]: https://github.com/import-js/eslint-plugin-import/pull/449
[#444]: https://github.com/import-js/eslint-plugin-import/pull/444
[#428]: https://github.com/import-js/eslint-plugin-import/pull/428
[#395]: https://github.com/import-js/eslint-plugin-import/pull/395
[#371]: https://github.com/import-js/eslint-plugin-import/pull/371
[#365]: https://github.com/import-js/eslint-plugin-import/pull/365
[#359]: https://github.com/import-js/eslint-plugin-import/pull/359
[#343]: https://github.com/import-js/eslint-plugin-import/pull/343
[#332]: https://github.com/import-js/eslint-plugin-import/pull/332
[#322]: https://github.com/import-js/eslint-plugin-import/pull/322
[#321]: https://github.com/import-js/eslint-plugin-import/pull/321
[#316]: https://github.com/import-js/eslint-plugin-import/pull/316
[#314]: https://github.com/import-js/eslint-plugin-import/pull/314
[#308]: https://github.com/import-js/eslint-plugin-import/pull/308
[#298]: https://github.com/import-js/eslint-plugin-import/pull/298
[#297]: https://github.com/import-js/eslint-plugin-import/pull/297
[#296]: https://github.com/import-js/eslint-plugin-import/pull/296
[#290]: https://github.com/import-js/eslint-plugin-import/pull/290
[#289]: https://github.com/import-js/eslint-plugin-import/pull/289
[#288]: https://github.com/import-js/eslint-plugin-import/pull/288
[#287]: https://github.com/import-js/eslint-plugin-import/pull/287
[#278]: https://github.com/import-js/eslint-plugin-import/pull/278
[#261]: https://github.com/import-js/eslint-plugin-import/pull/261
[#256]: https://github.com/import-js/eslint-plugin-import/pull/256
[#254]: https://github.com/import-js/eslint-plugin-import/pull/254
[#250]: https://github.com/import-js/eslint-plugin-import/pull/250
[#247]: https://github.com/import-js/eslint-plugin-import/pull/247
[#245]: https://github.com/import-js/eslint-plugin-import/pull/245
[#243]: https://github.com/import-js/eslint-plugin-import/pull/243
[#241]: https://github.com/import-js/eslint-plugin-import/pull/241
[#239]: https://github.com/import-js/eslint-plugin-import/pull/239
[#228]: https://github.com/import-js/eslint-plugin-import/pull/228
[#211]: https://github.com/import-js/eslint-plugin-import/pull/211
[#164]: https://github.com/import-js/eslint-plugin-import/pull/164
[#157]: https://github.com/import-js/eslint-plugin-import/pull/157
[#2118]: https://github.com/import-js/eslint-plugin-import/issues/2118
[#2067]: https://github.com/import-js/eslint-plugin-import/issues/2067
[#2056]: https://github.com/import-js/eslint-plugin-import/issues/2056
[#2063]: https://github.com/import-js/eslint-plugin-import/issues/2063
[#1965]: https://github.com/import-js/eslint-plugin-import/issues/1965
[#1924]: https://github.com/import-js/eslint-plugin-import/issues/1924
[#1854]: https://github.com/import-js/eslint-plugin-import/issues/1854
[#1841]: https://github.com/import-js/eslint-plugin-import/issues/1841
[#1834]: https://github.com/import-js/eslint-plugin-import/issues/1834
[#1814]: https://github.com/import-js/eslint-plugin-import/issues/1814
[#1811]: https://github.com/import-js/eslint-plugin-import/issues/1811
[#1808]: https://github.com/import-js/eslint-plugin-import/issues/1808
[#1805]: https://github.com/import-js/eslint-plugin-import/issues/1805
[#1801]: https://github.com/import-js/eslint-plugin-import/issues/1801
[#1722]: https://github.com/import-js/eslint-plugin-import/issues/1722
[#1704]: https://github.com/import-js/eslint-plugin-import/issues/1704
[#1702]: https://github.com/import-js/eslint-plugin-import/issues/1702
[#1635]: https://github.com/import-js/eslint-plugin-import/issues/1635
[#1631]: https://github.com/import-js/eslint-plugin-import/issues/1631
[#1616]: https://github.com/import-js/eslint-plugin-import/issues/1616
[#1613]: https://github.com/import-js/eslint-plugin-import/issues/1613
[#1589]: https://github.com/import-js/eslint-plugin-import/issues/1589
[#1565]: https://github.com/import-js/eslint-plugin-import/issues/1565
[#1366]: https://github.com/import-js/eslint-plugin-import/issues/1366
[#1334]: https://github.com/import-js/eslint-plugin-import/issues/1334
[#1323]: https://github.com/import-js/eslint-plugin-import/issues/1323
[#1322]: https://github.com/import-js/eslint-plugin-import/issues/1322
[#1300]: https://github.com/import-js/eslint-plugin-import/issues/1300
[#1293]: https://github.com/import-js/eslint-plugin-import/issues/1293
[#1266]: https://github.com/import-js/eslint-plugin-import/issues/1266
[#1256]: https://github.com/import-js/eslint-plugin-import/issues/1256
[#1233]: https://github.com/import-js/eslint-plugin-import/issues/1233
[#1175]: https://github.com/import-js/eslint-plugin-import/issues/1175
[#1166]: https://github.com/import-js/eslint-plugin-import/issues/1166
[#1144]: https://github.com/import-js/eslint-plugin-import/issues/1144
[#1058]: https://github.com/import-js/eslint-plugin-import/issues/1058
[#1035]: https://github.com/import-js/eslint-plugin-import/issues/1035
[#931]: https://github.com/import-js/eslint-plugin-import/issues/931
[#886]: https://github.com/import-js/eslint-plugin-import/issues/886
[#863]: https://github.com/import-js/eslint-plugin-import/issues/863
[#842]: https://github.com/import-js/eslint-plugin-import/issues/842
[#839]: https://github.com/import-js/eslint-plugin-import/issues/839
[#795]: https://github.com/import-js/eslint-plugin-import/issues/795
[#793]: https://github.com/import-js/eslint-plugin-import/issues/793
[#720]: https://github.com/import-js/eslint-plugin-import/issues/720
[#717]: https://github.com/import-js/eslint-plugin-import/issues/717
[#686]: https://github.com/import-js/eslint-plugin-import/issues/686
[#671]: https://github.com/import-js/eslint-plugin-import/issues/671
[#660]: https://github.com/import-js/eslint-plugin-import/issues/660
[#653]: https://github.com/import-js/eslint-plugin-import/issues/653
[#627]: https://github.com/import-js/eslint-plugin-import/issues/627
[#620]: https://github.com/import-js/eslint-plugin-import/issues/620
[#609]: https://github.com/import-js/eslint-plugin-import/issues/609
[#604]: https://github.com/import-js/eslint-plugin-import/issues/604
[#602]: https://github.com/import-js/eslint-plugin-import/issues/602
[#601]: https://github.com/import-js/eslint-plugin-import/issues/601
[#592]: https://github.com/import-js/eslint-plugin-import/issues/592
[#577]: https://github.com/import-js/eslint-plugin-import/issues/577
[#570]: https://github.com/import-js/eslint-plugin-import/issues/570
[#567]: https://github.com/import-js/eslint-plugin-import/issues/567
[#566]: https://github.com/import-js/eslint-plugin-import/issues/566
[#545]: https://github.com/import-js/eslint-plugin-import/issues/545
[#530]: https://github.com/import-js/eslint-plugin-import/issues/530
[#529]: https://github.com/import-js/eslint-plugin-import/issues/529
[#519]: https://github.com/import-js/eslint-plugin-import/issues/519
[#507]: https://github.com/import-js/eslint-plugin-import/issues/507
[#484]: https://github.com/import-js/eslint-plugin-import/issues/484
[#478]: https://github.com/import-js/eslint-plugin-import/issues/478
[#456]: https://github.com/import-js/eslint-plugin-import/issues/456
[#453]: https://github.com/import-js/eslint-plugin-import/issues/453
[#452]: https://github.com/import-js/eslint-plugin-import/issues/452
[#447]: https://github.com/import-js/eslint-plugin-import/issues/447
[#441]: https://github.com/import-js/eslint-plugin-import/issues/441
[#423]: https://github.com/import-js/eslint-plugin-import/issues/423
[#416]: https://github.com/import-js/eslint-plugin-import/issues/416
[#415]: https://github.com/import-js/eslint-plugin-import/issues/415
[#402]: https://github.com/import-js/eslint-plugin-import/issues/402
[#386]: https://github.com/import-js/eslint-plugin-import/issues/386
[#373]: https://github.com/import-js/eslint-plugin-import/issues/373
[#370]: https://github.com/import-js/eslint-plugin-import/issues/370
[#348]: https://github.com/import-js/eslint-plugin-import/issues/348
[#342]: https://github.com/import-js/eslint-plugin-import/issues/342
[#328]: https://github.com/import-js/eslint-plugin-import/issues/328
[#317]: https://github.com/import-js/eslint-plugin-import/issues/317
[#313]: https://github.com/import-js/eslint-plugin-import/issues/313
[#311]: https://github.com/import-js/eslint-plugin-import/issues/311
[#306]: https://github.com/import-js/eslint-plugin-import/issues/306
[#286]: https://github.com/import-js/eslint-plugin-import/issues/286
[#283]: https://github.com/import-js/eslint-plugin-import/issues/283
[#281]: https://github.com/import-js/eslint-plugin-import/issues/281
[#275]: https://github.com/import-js/eslint-plugin-import/issues/275
[#272]: https://github.com/import-js/eslint-plugin-import/issues/272
[#270]: https://github.com/import-js/eslint-plugin-import/issues/270
[#267]: https://github.com/import-js/eslint-plugin-import/issues/267
[#266]: https://github.com/import-js/eslint-plugin-import/issues/266
[#216]: https://github.com/import-js/eslint-plugin-import/issues/216
[#214]: https://github.com/import-js/eslint-plugin-import/issues/214
[#210]: https://github.com/import-js/eslint-plugin-import/issues/210
[#200]: https://github.com/import-js/eslint-plugin-import/issues/200
[#192]: https://github.com/import-js/eslint-plugin-import/issues/192
[#191]: https://github.com/import-js/eslint-plugin-import/issues/191
[#189]: https://github.com/import-js/eslint-plugin-import/issues/189
[#170]: https://github.com/import-js/eslint-plugin-import/issues/170
[#155]: https://github.com/import-js/eslint-plugin-import/issues/155
[#119]: https://github.com/import-js/eslint-plugin-import/issues/119
[#89]: https://github.com/import-js/eslint-plugin-import/issues/89
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.23.4...HEAD
[2.23.4]: https://github.com/benmosher/eslint-plugin-import/compare/v2.23.3...v2.23.4
[2.23.3]: https://github.com/benmosher/eslint-plugin-import/compare/v2.23.2...v2.23.3
[2.23.2]: https://github.com/benmosher/eslint-plugin-import/compare/v2.23.1...v2.23.2
[2.23.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.23.0...v2.23.1
[2.23.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.22.1...v2.23.0
[2.22.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.22.0...v2.22.1
[2.22.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.21.1...v2.22.0
[2.21.2]: https://github.com/benmosher/eslint-plugin-import/compare/v2.21.1...v2.21.2
[2.21.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.21.0...v2.21.1
[2.21.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.20.2...v2.21.0
[2.20.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.20.1...v2.20.2
[2.20.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.20.0...v2.20.1
[2.19.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.19.1...v2.20.0
[2.19.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.19.0...v2.19.1
[2.19.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.2...v2.19.0
[2.18.2]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.1...v2.18.2
[2.18.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.0...v2.18.1
[2.18.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0
[2.17.3]: https://github.com/benmosher/eslint-plugin-import/compare/v2.17.2...v2.17.3
[2.17.2]: https://github.com/benmosher/eslint-plugin-import/compare/v2.17.1...v2.17.2
[2.17.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.17.0...v2.17.1
[2.17.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.16.0...v2.17.0
[2.16.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.15.0...v2.16.0
[2.15.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.14.0...v2.15.0
[2.14.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.13.0...v2.14.0
[2.13.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.12.0...v2.13.0
[2.12.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.11.0...v2.12.0
[2.11.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.10.0...v2.11.0
[2.10.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.9.0...v2.10.0
[2.9.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.8.0...v2.9.0
[2.8.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.7.0...v2.8.0
[2.7.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.6.1...v2.7.0
[2.6.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.6.0...v2.6.1
[2.6.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.5.0...v2.6.0
[2.5.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.16.0...v2.0.0
[1.16.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.15.0...v1.16.0
[1.15.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.14.0...v1.15.0
[1.14.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.13.0...v1.14.0
[1.13.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.12.0...v1.13.0
[1.12.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.11.1...v1.12.0
[1.11.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.11.0...v1.11.1
[1.11.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.3...v1.11.0
[1.10.3]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.2...v1.10.3
[1.10.2]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.1...v1.10.2
[1.10.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.10.0...v1.10.1
[1.10.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.2...v1.10.0
[1.9.2]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.1...v1.9.2
[1.9.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.9.0...v1.9.1
[1.9.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.8.1...v1.9.0
[1.8.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.7.0...v1.8.0
[1.7.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.6.1...v1.7.0
[1.6.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.5.0...1.6.0
[1.5.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.4.0...v1.5.0
[1.4.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.0.4...v1.1.0
[1.0.4]: https://github.com/benmosher/eslint-plugin-import/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/benmosher/eslint-plugin-import/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/benmosher/eslint-plugin-import/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/benmosher/eslint-plugin-import/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/benmosher/eslint-plugin-import/compare/v1.0.0-beta.0...v1.0.0
[1.0.0-beta.0]: https://github.com/benmosher/eslint-plugin-import/compare/v0.13.0...v1.0.0-beta.0
[0.13.0]: https://github.com/benmosher/eslint-plugin-import/compare/v0.12.1...v0.13.0
[0.12.2]: https://github.com/benmosher/eslint-plugin-import/compare/v0.12.1...v0.12.2
[0.12.1]: https://github.com/benmosher/eslint-plugin-import/compare/v0.12.0...v0.12.1
[0.12.0]: https://github.com/benmosher/eslint-plugin-import/compare/v0.11.0...v0.12.0
[0.11.0]: https://github.com/benmosher/eslint-plugin-import/compare/v0.10.1...v0.11.0
[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...HEAD
[2.24.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.0
[2.23.4]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.3...v2.23.4
[2.23.3]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.2...v2.23.3
[2.23.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.1...v2.23.2
[2.23.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.0...v2.23.1
[2.23.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.22.1...v2.23.0
[2.22.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.22.0...v2.22.1
[2.22.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.21.1...v2.22.0
[2.21.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.21.1...v2.21.2
[2.21.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.21.0...v2.21.1
[2.21.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.20.2...v2.21.0
[2.20.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.20.1...v2.20.2
[2.20.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.20.0...v2.20.1
[2.19.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.19.1...v2.20.0
[2.19.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.19.0...v2.19.1
[2.19.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.18.2...v2.19.0
[2.18.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.18.1...v2.18.2
[2.18.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.18.0...v2.18.1
[2.18.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.17.3...v2.18.0
[2.17.3]: https://github.com/import-js/eslint-plugin-import/compare/v2.17.2...v2.17.3
[2.17.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.17.1...v2.17.2
[2.17.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.17.0...v2.17.1
[2.17.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.16.0...v2.17.0
[2.16.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.15.0...v2.16.0
[2.15.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.14.0...v2.15.0
[2.14.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.13.0...v2.14.0
[2.13.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.12.0...v2.13.0
[2.12.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.11.0...v2.12.0
[2.11.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.10.0...v2.11.0
[2.10.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.9.0...v2.10.0
[2.9.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.8.0...v2.9.0
[2.8.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.7.0...v2.8.0
[2.7.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.6.1...v2.7.0
[2.6.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.6.0...v2.6.1
[2.6.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.5.0...v2.6.0
[2.5.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.16.0...v2.0.0
[1.16.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.15.0...v1.16.0
[1.15.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.14.0...v1.15.0
[1.14.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.13.0...v1.14.0
[1.13.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.12.0...v1.13.0
[1.12.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.11.1...v1.12.0
[1.11.1]: https://github.com/import-js/eslint-plugin-import/compare/v1.11.0...v1.11.1
[1.11.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.10.3...v1.11.0
[1.10.3]: https://github.com/import-js/eslint-plugin-import/compare/v1.10.2...v1.10.3
[1.10.2]: https://github.com/import-js/eslint-plugin-import/compare/v1.10.1...v1.10.2
[1.10.1]: https://github.com/import-js/eslint-plugin-import/compare/v1.10.0...v1.10.1
[1.10.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.9.2...v1.10.0
[1.9.2]: https://github.com/import-js/eslint-plugin-import/compare/v1.9.1...v1.9.2
[1.9.1]: https://github.com/import-js/eslint-plugin-import/compare/v1.9.0...v1.9.1
[1.9.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.8.1...v1.9.0
[1.8.1]: https://github.com/import-js/eslint-plugin-import/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.7.0...v1.8.0
[1.7.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.6.1...v1.7.0
[1.6.1]: https://github.com/import-js/eslint-plugin-import/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.5.0...1.6.0
[1.5.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.4.0...v1.5.0
[1.4.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.0.4...v1.1.0
[1.0.4]: https://github.com/import-js/eslint-plugin-import/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/import-js/eslint-plugin-import/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/import-js/eslint-plugin-import/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/import-js/eslint-plugin-import/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/import-js/eslint-plugin-import/compare/v1.0.0-beta.0...v1.0.0
[1.0.0-beta.0]: https://github.com/import-js/eslint-plugin-import/compare/v0.13.0...v1.0.0-beta.0
[0.13.0]: https://github.com/import-js/eslint-plugin-import/compare/v0.12.1...v0.13.0
[0.12.2]: https://github.com/import-js/eslint-plugin-import/compare/v0.12.1...v0.12.2
[0.12.1]: https://github.com/import-js/eslint-plugin-import/compare/v0.12.0...v0.12.1
[0.12.0]: https://github.com/import-js/eslint-plugin-import/compare/v0.11.0...v0.12.0
[0.11.0]: https://github.com/import-js/eslint-plugin-import/compare/v0.10.1...v0.11.0
[@1pete]: https://github.com/1pete
[@3nuc]: https://github.com/3nuc
[@aamulumi]: https://github.com/aamulumi
[@aberezkin]: https://github.com/aberezkin
[@adamborowski]: https://github.com/adamborowski
[@adjerbetian]: https://github.com/adjerbetian
[@ai]: https://github.com/ai
@ -1238,6 +1276,7 @@ for info on changes for earlier releases.
[@arvigeus]: https://github.com/arvigeus
[@asapach]: https://github.com/asapach
[@astorije]: https://github.com/astorije
[@atav32]: https://github.com/atav32
[@atikenny]: https://github.com/atikenny
[@atos1990]: https://github.com/atos1990
[@barbogast]: https://github.com/barbogast
@ -1273,6 +1312,7 @@ for info on changes for earlier releases.
[@ephys]: https://github.com/ephys
[@eps1lon]: https://github.com/eps1lon
[@ernestostifano]: https://github.com/ernestostifano
[@ertrzyiks]: https://github.com/ertrzyiks
[@fa93hws]: https://github.com/fa93hws
[@fengkfengk]: https://github.com/fengkfengk
[@fernandopasik]: https://github.com/fernandopasik
@ -1322,6 +1362,7 @@ for info on changes for earlier releases.
[@kiwka]: https://github.com/kiwka
[@klimashkin]: https://github.com/klimashkin
[@kmui2]: https://github.com/kmui2
[@KostyaZgara]: https://github.com/KostyaZgara
[@knpwrs]: https://github.com/knpwrs
[@laysent]: https://github.com/laysent
[@le0nik]: https://github.com/le0nik
@ -1329,6 +1370,7 @@ for info on changes for earlier releases.
[@lencioni]: https://github.com/lencioni
[@leonardodino]: https://github.com/leonardodino
[@Librazy]: https://github.com/Librazy
[@liby]: https://github.com/liby
[@lilling]: https://github.com/lilling
[@ljharb]: https://github.com/ljharb
[@ljqx]: https://github.com/ljqx
@ -1358,6 +1400,7 @@ for info on changes for earlier releases.
[@paztis]: https://github.com/paztis
[@pcorpet]: https://github.com/pcorpet
[@Pessimistress]: https://github.com/Pessimistress
[@pmcelhaney]: https://github.com/pmcelhaney
[@preco21]: https://github.com/preco21
[@pzhine]: https://github.com/pzhine
[@ramasilveyra]: https://github.com/ramasilveyra
@ -1369,6 +1412,7 @@ for info on changes for earlier releases.
[@richardxia]: https://github.com/richardxia
[@robertrossmann]: https://github.com/robertrossmann
[@rosswarren]: https://github.com/rosswarren
[@rperello]: https://github.com/rperello
[@rsolomon]: https://github.com/rsolomon
[@s-h-a-d-o-w]: https://github.com/s-h-a-d-o-w
[@saschanaz]: https://github.com/saschanaz
@ -1385,6 +1429,7 @@ for info on changes for earlier releases.
[@skozin]: https://github.com/skozin
[@skyrpex]: https://github.com/skyrpex
[@sompylasar]: https://github.com/sompylasar
[@soryy708]: https://github.com/soryy708
[@spalger]: https://github.com/spalger
[@st-sloth]: https://github.com/st-sloth
[@stekycz]: https://github.com/stekycz
@ -1407,6 +1452,7 @@ for info on changes for earlier releases.
[@TrevorBurnham]: https://github.com/TrevorBurnham
[@ttmarek]: https://github.com/ttmarek
[@vikr01]: https://github.com/vikr01
[@wenfangdu]: https://github.com/wenfangdu
[@wKich]: https://github.com/wKich
[@wschurman]: https://github.com/wschurman
[@wtgtybhertgeghgtwtg]: https://github.com/wtgtybhertgeghgtwtg

View file

@ -1,8 +1,8 @@
# eslint-plugin-import
[![build status](https://travis-ci.org/benmosher/eslint-plugin-import.svg?branch=master)](https://travis-ci.org/benmosher/eslint-plugin-import)
[![Coverage Status](https://coveralls.io/repos/github/benmosher/eslint-plugin-import/badge.svg?branch=master)](https://coveralls.io/github/benmosher/eslint-plugin-import?branch=master)
[![win32 build status](https://ci.appveyor.com/api/projects/status/3mw2fifalmjlqf56/branch/master?svg=true)](https://ci.appveyor.com/project/benmosher/eslint-plugin-import/branch/master)
[![build status](https://travis-ci.org/import-js/eslint-plugin-import.svg?branch=master)](https://travis-ci.org/import-js/eslint-plugin-import)
[![Coverage Status](https://coveralls.io/repos/github/import-js/eslint-plugin-import/badge.svg?branch=master)](https://coveralls.io/github/import-js/eslint-plugin-import?branch=master)
[![win32 build status](https://ci.appveyor.com/api/projects/status/3mw2fifalmjlqf56/branch/master?svg=true)](https://ci.appveyor.com/project/import-js/eslint-plugin-import/branch/master)
[![npm](https://img.shields.io/npm/v/eslint-plugin-import.svg)](https://www.npmjs.com/package/eslint-plugin-import)
[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-import.svg?maxAge=2592000)](http://www.npmtrends.com/eslint-plugin-import)
@ -190,7 +190,7 @@ runtime (allowing some modules to be included more traditionally via script tags
In the interest of supporting both of these, v0.11 introduces resolvers.
Currently [Node] and [webpack] resolution have been implemented, but the
resolvers are just npm packages, so [third party packages are supported](https://github.com/benmosher/eslint-plugin-import/wiki/Resolvers) (and encouraged!).
resolvers are just npm packages, so [third party packages are supported](https://github.com/import-js/eslint-plugin-import/wiki/Resolvers) (and encouraged!).
You can reference resolvers in several ways (in order of precedence):
@ -348,6 +348,8 @@ An array of folders. Resolved modules only from those folders will be considered
This option is also useful in a monorepo setup: list here all directories that contain monorepo's packages and they will be treated as external ones no matter which resolver is used.
If you are using `yarn` PnP as your package manager, add the `.yarn` folder and all your installed dependencies will be considered as `external`, instead of `internal`.
Each item in this array is either a folder's name, its subpath, or its absolute prefix path:
- `jspm_modules` will match any file or folder named `jspm_modules` or which has a direct or non-direct parent named `jspm_modules`, e.g. `/home/me/project/jspm_modules` or `/home/me/project/jspm_modules/some-pkg/index.js`.

View file

@ -13,16 +13,16 @@
at last version's tag.
```markdown
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.0.1...HEAD
[2.0.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.0.0...v2.0.1
[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.0.1...HEAD
[2.0.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.0.0...v2.0.1
```
becomes
```markdown
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.1.0...HEAD
[2.1.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.0.0...v2.0.1
[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.1.0...HEAD
[2.1.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.0.0...v2.0.1
```
Generally, don't use `npm version` for this because it creates a tag, which I normally

View file

@ -109,8 +109,6 @@ import foo from './foo';
import bar from './bar';
import Component from './Component';
import express from 'express';
```
The following patterns are not considered problems when configuration set to "always":
@ -122,8 +120,6 @@ import bar from './bar.json';
import Component from './Component.jsx';
import express from 'express/index.js';
import * as path from 'path';
```

View file

@ -67,4 +67,4 @@ enable this rule.
- Issue [#255]
[`import/order`]: ./order.md
[#255]: https://github.com/benmosher/eslint-plugin-import/issues/255
[#255]: https://github.com/import-js/eslint-plugin-import/issues/255

View file

@ -1,3 +1,3 @@
# imports-first
This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md).
This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/first.md).

View file

@ -5,7 +5,7 @@ Verifies that all named imports are part of the set of named exports in the refe
For `export`, verifies that all named exports exist in the referenced module.
Note: for packages, the plugin will find exported names
from [`jsnext:main`], if present in `package.json`.
from [`jsnext:main`] (deprecated) or `module`, if present in `package.json`.
Redux's npm module includes this key, and thereby is lintable, for example.
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported. Note that type imports and exports, as used by [Flow], are always ignored.
@ -91,8 +91,10 @@ runtime, you will likely see false positives with this rule.
## Further Reading
- [`import/ignore`] setting
- [`jsnext:main`] (Rollup)
- [`jsnext:main`] deprecation
- [`pkg.module`] (Rollup)
[`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
[`jsnext:main`]: https://github.com/jsforum/jsforum/issues/5
[`pkg.module`]: https://github.com/rollup/rollup/wiki/pkg.module
[`import/ignore`]: ../../README.md#importignore

View file

@ -83,7 +83,7 @@ this rule enabled.
## Further Reading
- [Original inspiring issue](https://github.com/benmosher/eslint-plugin-import/issues/941)
- [Original inspiring issue](https://github.com/import-js/eslint-plugin-import/issues/941)
- Rule to detect that module imports itself: [`no-self-import`]
- [`import/external-module-folders`] setting

View file

@ -7,7 +7,7 @@ ESLint core has a similar rule ([`no-duplicate-imports`](http://eslint.org/docs/
is different in two key ways:
1. the paths in the source code don't have to exactly match, they just have to point to the same module on the filesystem. (i.e. `./foo` and `./foo.js`)
2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/benmosher/eslint-plugin-import/pull/334))
2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/import-js/eslint-plugin-import/pull/334))
## Rule Details

View file

@ -5,6 +5,12 @@ Enforce a convention of not using namespace (a.k.a. "wildcard" `*`) imports.
+(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule, provided that the namespace object is only used for direct member access, e.g. `namespace.a`.
The `--fix` functionality for this rule requires ESLint 5 or newer.
### Options
This rule supports the following options:
- `ignore`: array of glob strings for modules that should be ignored by the rule.
## Rule Details
Valid:
@ -15,6 +21,11 @@ import { a, b } from './bar'
import defaultExport, { a, b } from './foobar'
```
```js
/* eslint import/no-namespace: ["error", {ignore: ['*.ext']] */
import * as bar from './ignored-module.ext';
```
Invalid:
```js

View file

@ -10,7 +10,7 @@ Note: dynamic imports are currently not supported.
### Usage
In order for this plugin to work, one of the options `missingExports` or `unusedExports` must be enabled (see "Options" section below). In the future, these options will be enabled by default (see https://github.com/benmosher/eslint-plugin-import/issues/1324)
In order for this plugin to work, one of the options `missingExports` or `unusedExports` must be enabled (see "Options" section below). In the future, these options will be enabled by default (see https://github.com/import-js/eslint-plugin-import/issues/1324)
Example:
```

View file

@ -72,7 +72,7 @@ import "./pages/index"; // should be "./pages" (auto-fixable)
import "./pages/index.js"; // should be "./pages" (auto-fixable)
```
Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/benmosher/eslint-plugin-import#importextensions) for details.
Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/import-js/eslint-plugin-import#importextensions) for details.
### commonjs

View file

@ -148,6 +148,27 @@ Example:
}]
}
```
You can also use `patterns`(e.g., `react`, `react-router-dom`, etc).
Example:
```json
{
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"]
}
]
}
```
The default value is `["builtin", "external"]`.
### `newlines-between: [ignore|always|always-and-inside-groups|never]`:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -12,8 +12,12 @@ getFilePackagePath = getFilePackagePath;exports.
getFilePackageName = getFilePackageName;var _path = require('path');var _findUp = require('find-up');var _findUp2 = _interopRequireDefault(_findUp);var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function getContextPackagePath(context) {return getFilePackagePath(context.getFilename());}function getFilePackagePath(filePath) {const fp = _findUp2.default.sync('package.json', { cwd: filePath });return (0, _path.dirname)(fp);}function getFilePackageName(filePath) {var _readPkgUp$sync =
_readPkgUp2.default.sync({ cwd: filePath, normalize: false });const pkg = _readPkgUp$sync.pkg;
return pkg && pkg.name;
getFilePackageName = getFilePackageName;var _path = require('path');var _findUp = require('find-up');var _findUp2 = _interopRequireDefault(_findUp);var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function getContextPackagePath(context) {return getFilePackagePath(context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename());}function getFilePackagePath(filePath) {var fp = _findUp2['default'].sync('package.json', { cwd: filePath });return (0, _path.dirname)(fp);}function getFilePackageName(filePath) {var _readPkgUp$sync =
_readPkgUp2['default'].sync({ cwd: filePath, normalize: false }),pkg = _readPkgUp$sync.pkg,path = _readPkgUp$sync.path;
if (pkg) {
// recursion in case of intermediate esm package.json without name found
return pkg.name || getFilePackageName((0, _path.dirname)((0, _path.dirname)(path)));
}
return null;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3BhY2thZ2VQYXRoLmpzIl0sIm5hbWVzIjpbImdldENvbnRleHRQYWNrYWdlUGF0aCIsImdldEZpbGVQYWNrYWdlUGF0aCIsImdldEZpbGVQYWNrYWdlTmFtZSIsImNvbnRleHQiLCJnZXRGaWxlbmFtZSIsImZpbGVQYXRoIiwiZnAiLCJmaW5kVXAiLCJzeW5jIiwiY3dkIiwicmVhZFBrZ1VwIiwibm9ybWFsaXplIiwicGtnIiwibmFtZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFLZ0JBLHFCLEdBQUFBLHFCOzs7O0FBSUFDLGtCLEdBQUFBLGtCOzs7OztBQUtBQyxrQixHQUFBQSxrQixDQWRoQiw0QkFDQSxpQywrQ0FDQSx3QyxrSkFHTyxTQUFTRixxQkFBVCxDQUErQkcsT0FBL0IsRUFBd0MsQ0FDN0MsT0FBT0YsbUJBQW1CRSxRQUFRQyxXQUFSLEVBQW5CLENBQVAsQ0FDRCxDQUVNLFNBQVNILGtCQUFULENBQTRCSSxRQUE1QixFQUFzQyxDQUMzQyxNQUFNQyxLQUFLQyxpQkFBT0MsSUFBUCxDQUFZLGNBQVosRUFBNEIsRUFBRUMsS0FBS0osUUFBUCxFQUE1QixDQUFYLENB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YWNrYWdlTmFtZShkaXJuYW1lKGRpcm5hbWUocGF0aCkpKTtcbiAgfVxuICByZXR1cm4gbnVsbDtcbn1cbiJdfQ==

View file

@ -1,4 +1,4 @@
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.default =
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
isStaticRequire; // todo: merge with module visitor
function isStaticRequire(node) {return node &&
node.callee &&

View file

@ -1,8 +1,8 @@
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.default =
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
docsUrl;var _package = require('../package.json');var _package2 = _interopRequireDefault(_package);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}const repoUrl = 'https://github.com/benmosher/eslint-plugin-import';function docsUrl(ruleName) {let commitish = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : `v${_package2.default.version}`;
return `${repoUrl}/blob/${commitish}/docs/rules/${ruleName}.md`;
docsUrl;var _package = require('../package.json');var _package2 = _interopRequireDefault(_package);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}var repoUrl = 'https://github.com/import-js/eslint-plugin-import';function docsUrl(ruleName) {var commitish = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'v' + String(_package2['default'].version);
return repoUrl + '/blob/' + String(commitish) + '/docs/rules/' + String(ruleName) + '.md';
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9kb2NzVXJsLmpzIl0sIm5hbWVzIjpbImRvY3NVcmwiLCJyZXBvVXJsIiwicnVsZU5hbWUiLCJjb21taXRpc2giLCJwa2ciLCJ2ZXJzaW9uIl0sIm1hcHBpbmdzIjoiOzs7O0FBSXdCQSxPLENBSnhCLDBDLDhJQUVBLE1BQU1DLFVBQVUsbURBQWhCLENBRWUsU0FBU0QsT0FBVCxDQUFpQkUsUUFBakIsRUFBMEQsS0F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9VcmwgPSAnaHR0cHM6Ly9naXRodWIuY29tL2ltcG9ydC1qcy9lc2xpbnQtcGx1Z2luLWltcG9ydCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGRvY3NVcmwocnVsZU5hbWUsIGNvbW1pdGlzaCA9IGB2JHtwa2cudmVyc2lvbn1gKSB7XG4gIHJldHVybiBgJHtyZXBvVXJsfS9ibG9iLyR7Y29tbWl0aXNofS9kb2NzL3J1bGVzLyR7cnVsZU5hbWV9Lm1kYDtcbn1cbiJdfQ==

View file

@ -1,5 +1,5 @@
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = importDeclaration;function importDeclaration(context) {
const ancestors = context.getAncestors();
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = importDeclaration;function importDeclaration(context) {
var ancestors = context.getAncestors();
return ancestors[ancestors.length - 1];
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbXBvcnREZWNsYXJhdGlvbi5qcyJdLCJuYW1lcyI6WyJpbXBvcnREZWNsYXJhdGlvbiIsImNvbnRleHQiLCJhbmNlc3RvcnMiLCJnZXRBbmNlc3RvcnMiLCJsZW5ndGgiXSwibWFwcGluZ3MiOiI2RkFBd0JBLGlCLENBQVQsU0FBU0EsaUJBQVQsQ0FBMkJDLE9BQTNCLEVBQW9DO0FBQ2pELFFBQU1DLFlBQVlELFFBQVFFLFlBQVIsRUFBbEI7QUFDQSxTQUFPRCxVQUFVQSxVQUFVRSxNQUFWLEdBQW1CLENBQTdCLENBQVA7QUFDRCIsImZpbGUiOiJpbXBvcnREZWNsYXJhdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGltcG9ydERlY2xhcmF0aW9uKGNvbnRleHQpIHtcbiAgY29uc3QgYW5jZXN0b3JzID0gY29udGV4dC5nZXRBbmNlc3RvcnMoKTtcbiAgcmV0dXJuIGFuY2VzdG9yc1thbmNlc3RvcnMubGVuZ3RoIC0gMV07XG59XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbXBvcnREZWNsYXJhdGlvbi5qcyJdLCJuYW1lcyI6WyJpbXBvcnREZWNsYXJhdGlvbiIsImNvbnRleHQiLCJhbmNlc3RvcnMiLCJnZXRBbmNlc3RvcnMiLCJsZW5ndGgiXSwibWFwcGluZ3MiOiJnR0FBd0JBLGlCLENBQVQsU0FBU0EsaUJBQVQsQ0FBMkJDLE9BQTNCLEVBQW9DO0FBQ2pELE1BQU1DLFlBQVlELFFBQVFFLFlBQVIsRUFBbEI7QUFDQSxTQUFPRCxVQUFVQSxVQUFVRSxNQUFWLEdBQW1CLENBQTdCLENBQVA7QUFDRCIsImZpbGUiOiJpbXBvcnREZWNsYXJhdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGltcG9ydERlY2xhcmF0aW9uKGNvbnRleHQpIHtcbiAgY29uc3QgYW5jZXN0b3JzID0gY29udGV4dC5nZXRBbmNlc3RvcnMoKTtcbiAgcmV0dXJuIGFuY2VzdG9yc1thbmNlc3RvcnMubGVuZ3RoIC0gMV07XG59XG4iXX0=

File diff suppressed because one or more lines are too long

View file

@ -1,40 +1,40 @@
'use strict';var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'problem',
docs: {
url: (0, _docsUrl2.default)('default') },
url: (0, _docsUrl2['default'])('default') },
schema: [] },
create: function (context) {
create: function () {function create(context) {
function checkDefault(specifierType, node) {
function checkDefault(specifierType, node) {
const defaultSpecifier = node.specifiers.find(
specifier => specifier.type === specifierType);
var defaultSpecifier = node.specifiers.find(
function (specifier) {return specifier.type === specifierType;});
if (!defaultSpecifier) return;
const imports = _ExportMap2.default.get(node.source.value, context);
if (imports == null) return;
if (!defaultSpecifier) return;
var imports = _ExportMap2['default'].get(node.source.value, context);
if (imports == null) return;
if (imports.errors.length) {
imports.reportErrors(context, node);
} else if (imports.get('default') === undefined) {
context.report({
node: defaultSpecifier,
message: `No default export found in imported module "${node.source.value}".` });
if (imports.errors.length) {
imports.reportErrors(context, node);
} else if (imports.get('default') === undefined) {
context.report({
node: defaultSpecifier,
message: 'No default export found in imported module "' + String(node.source.value) + '".' });
}
}
}
return {
'ImportDeclaration': checkDefault.bind(null, 'ImportDefaultSpecifier'),
'ExportNamedDeclaration': checkDefault.bind(null, 'ExportDefaultSpecifier') };
return {
'ImportDeclaration': checkDefault.bind(null, 'ImportDefaultSpecifier'),
'ExportNamedDeclaration': checkDefault.bind(null, 'ExportDefaultSpecifier') };
} };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwiY2hlY2tEZWZhdWx0Iiwic3BlY2lmaWVyVHlwZSIsIm5vZGUiLCJkZWZhdWx0U3BlY2lmaWVyIiwic3BlY2lmaWVycyIsImZpbmQiLCJzcGVjaWZpZXIiLCJpbXBvcnRzIiwiRXhwb3J0cyIsImdldCIsInNvdXJjZSIsInZhbHVlIiwiZXJyb3JzIiwibGVuZ3RoIiwicmVwb3J0RXJyb3JzIiwidW5kZWZpbmVkIiwic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gZGVmYXVsdCBleHBvcnQgZm91bmQgaW4gaW1wb3J0ZWQgbW9kdWxlIFwiJHtub2RlLnNvdXJjZS52YWx1ZX1cIi5gLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgJ0ltcG9ydERlY2xhcmF0aW9uJzogY2hlY2tEZWZhdWx0LmJpbmQobnVsbCwgJ0ltcG9ydERlZmF1bHRTcGVjaWZpZXInKSxcbiAgICAgICdFeHBvcnROYW1lZERlY2xhcmF0aW9uJzogY2hlY2tEZWZhdWx0LmJpbmQobnVsbCwgJ0V4cG9ydERlZmF1bHRTcGVjaWZpZXInKSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ==

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more