eslint-plugin-testing-library
Advanced tools
Comparing version 3.1.0-beta.2 to 3.1.0-beta.3
47
index.js
"use strict"; | ||
var tslib_1 = require("tslib"); | ||
var await_async_query_1 = tslib_1.__importDefault(require("./rules/await-async-query")); | ||
var await_async_utils_1 = tslib_1.__importDefault(require("./rules/await-async-utils")); | ||
var await_fire_event_1 = tslib_1.__importDefault(require("./rules/await-fire-event")); | ||
var consistent_data_testid_1 = tslib_1.__importDefault(require("./rules/consistent-data-testid")); | ||
var no_await_sync_query_1 = tslib_1.__importDefault(require("./rules/no-await-sync-query")); | ||
var no_debug_1 = tslib_1.__importDefault(require("./rules/no-debug")); | ||
var no_dom_import_1 = tslib_1.__importDefault(require("./rules/no-dom-import")); | ||
var no_manual_cleanup_1 = tslib_1.__importDefault(require("./rules/no-manual-cleanup")); | ||
var no_wait_for_empty_callback_1 = tslib_1.__importDefault(require("./rules/no-wait-for-empty-callback")); | ||
var prefer_explicit_assert_1 = tslib_1.__importDefault(require("./rules/prefer-explicit-assert")); | ||
var prefer_presence_queries_1 = tslib_1.__importDefault(require("./rules/prefer-presence-queries")); | ||
var prefer_screen_queries_1 = tslib_1.__importDefault(require("./rules/prefer-screen-queries")); | ||
var prefer_wait_for_1 = tslib_1.__importDefault(require("./rules/prefer-wait-for")); | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var await_async_query_1 = __importDefault(require("./rules/await-async-query")); | ||
var await_async_utils_1 = __importDefault(require("./rules/await-async-utils")); | ||
var await_fire_event_1 = __importDefault(require("./rules/await-fire-event")); | ||
var consistent_data_testid_1 = __importDefault(require("./rules/consistent-data-testid")); | ||
var no_await_sync_query_1 = __importDefault(require("./rules/no-await-sync-query")); | ||
var no_debug_1 = __importDefault(require("./rules/no-debug")); | ||
var no_dom_import_1 = __importDefault(require("./rules/no-dom-import")); | ||
var no_manual_cleanup_1 = __importDefault(require("./rules/no-manual-cleanup")); | ||
var no_wait_for_empty_callback_1 = __importDefault(require("./rules/no-wait-for-empty-callback")); | ||
var prefer_explicit_assert_1 = __importDefault(require("./rules/prefer-explicit-assert")); | ||
var prefer_presence_queries_1 = __importDefault(require("./rules/prefer-presence-queries")); | ||
var prefer_screen_queries_1 = __importDefault(require("./rules/prefer-screen-queries")); | ||
var prefer_wait_for_1 = __importDefault(require("./rules/prefer-wait-for")); | ||
var rules = { | ||
@@ -45,13 +58,13 @@ 'await-async-query': await_async_query_1.default, | ||
plugins: ['testing-library'], | ||
rules: tslib_1.__assign(tslib_1.__assign({}, recommendedRules), { 'testing-library/no-debug': 'warn', 'testing-library/no-dom-import': ['error', 'angular'] }), | ||
rules: __assign(__assign({}, recommendedRules), { 'testing-library/no-debug': 'warn', 'testing-library/no-dom-import': ['error', 'angular'] }), | ||
}, | ||
react: { | ||
plugins: ['testing-library'], | ||
rules: tslib_1.__assign(tslib_1.__assign({}, recommendedRules), { 'testing-library/no-debug': 'warn', 'testing-library/no-dom-import': ['error', 'react'] }), | ||
rules: __assign(__assign({}, recommendedRules), { 'testing-library/no-debug': 'warn', 'testing-library/no-dom-import': ['error', 'react'] }), | ||
}, | ||
vue: { | ||
plugins: ['testing-library'], | ||
rules: tslib_1.__assign(tslib_1.__assign({}, recommendedRules), { 'testing-library/await-fire-event': 'error', 'testing-library/no-debug': 'warn', 'testing-library/no-dom-import': ['error', 'vue'] }), | ||
rules: __assign(__assign({}, recommendedRules), { 'testing-library/await-fire-event': 'error', 'testing-library/no-debug': 'warn', 'testing-library/no-dom-import': ['error', 'vue'] }), | ||
}, | ||
}, | ||
}; |
{ | ||
"name": "eslint-plugin-testing-library", | ||
"version": "3.1.0-beta.2", | ||
"version": "3.1.0-beta.3", | ||
"description": "ESLint rules for Testing Library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var experimental_utils_1 = require("@typescript-eslint/experimental-utils"); | ||
@@ -17,3 +23,3 @@ var utils_1 = require("../utils"); | ||
function isRenderFunction(callNode, renderFunctions) { | ||
return tslib_1.__spreadArrays(['render'], renderFunctions).some(function (name) { return node_utils_1.isIdentifier(callNode.callee) && name === callNode.callee.name; }); | ||
return __spreadArrays(['render'], renderFunctions).some(function (name) { return node_utils_1.isIdentifier(callNode.callee) && name === callNode.callee.name; }); | ||
} | ||
@@ -20,0 +26,0 @@ function isRenderVariableDeclarator(node, renderFunctions) { |
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var experimental_utils_1 = require("@typescript-eslint/experimental-utils"); | ||
@@ -34,3 +40,3 @@ var utils_1 = require("../utils"); | ||
fix: function (fixer) { | ||
var excludedImports = tslib_1.__spreadArrays(DEPRECATED_METHODS, ['waitFor']); | ||
var excludedImports = __spreadArrays(DEPRECATED_METHODS, ['waitFor']); | ||
var newImports = node.specifiers | ||
@@ -37,0 +43,0 @@ .filter(function (specifier) { |
12
utils.js
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var combineQueries = function (variants, methods) { | ||
@@ -22,3 +28,3 @@ var combinedQueries = []; | ||
exports.ASYNC_QUERIES_VARIANTS = ASYNC_QUERIES_VARIANTS; | ||
var ALL_QUERIES_VARIANTS = tslib_1.__spreadArrays(SYNC_QUERIES_VARIANTS, ASYNC_QUERIES_VARIANTS); | ||
var ALL_QUERIES_VARIANTS = __spreadArrays(SYNC_QUERIES_VARIANTS, ASYNC_QUERIES_VARIANTS); | ||
exports.ALL_QUERIES_VARIANTS = ALL_QUERIES_VARIANTS; | ||
@@ -40,3 +46,3 @@ var ALL_QUERIES_METHODS = [ | ||
exports.ASYNC_QUERIES_COMBINATIONS = ASYNC_QUERIES_COMBINATIONS; | ||
var ALL_QUERIES_COMBINATIONS = tslib_1.__spreadArrays(SYNC_QUERIES_COMBINATIONS, ASYNC_QUERIES_COMBINATIONS); | ||
var ALL_QUERIES_COMBINATIONS = __spreadArrays(SYNC_QUERIES_COMBINATIONS, ASYNC_QUERIES_COMBINATIONS); | ||
exports.ALL_QUERIES_COMBINATIONS = ALL_QUERIES_COMBINATIONS; | ||
@@ -43,0 +49,0 @@ var ASYNC_UTILS = [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
74029
1281
0