immosquare-cleaner 0.1.34 → 0.1.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/lib/immosquare-cleaner.rb +2 -2
- data/linters/eslint.config.mjs +30 -0
- data/linters/rubocop-3.2.2.yml +2 -0
- data/node_modules/function-bind/README.md +27 -25
- data/node_modules/function-bind/implementation.js +12 -44
- data/node_modules/function-bind/package.json +14 -38
- data/node_modules/is-core-module/CHANGELOG.md +0 -7
- data/node_modules/is-core-module/index.js +2 -2
- data/node_modules/is-core-module/package.json +4 -4
- data/package.json +2 -4
- metadata +3 -180
- data/linters/eslintrc.json +0 -57
- data/node_modules/.bin/rimraf +0 -1
- data/node_modules/eslint-config-airbnb-base/CHANGELOG.md +0 -374
- data/node_modules/eslint-config-airbnb-base/LICENSE.md +0 -21
- data/node_modules/eslint-config-airbnb-base/README.md +0 -112
- data/node_modules/eslint-config-airbnb-base/index.js +0 -17
- data/node_modules/eslint-config-airbnb-base/legacy.js +0 -34
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/LICENSE +0 -15
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/README.md +0 -443
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/bin/semver.js +0 -174
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/package.json +0 -38
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/range.bnf +0 -16
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/semver.js +0 -1643
- data/node_modules/eslint-config-airbnb-base/package.json +0 -95
- data/node_modules/eslint-config-airbnb-base/rules/best-practices.js +0 -408
- data/node_modules/eslint-config-airbnb-base/rules/errors.js +0 -179
- data/node_modules/eslint-config-airbnb-base/rules/es6.js +0 -185
- data/node_modules/eslint-config-airbnb-base/rules/imports.js +0 -273
- data/node_modules/eslint-config-airbnb-base/rules/node.js +0 -43
- data/node_modules/eslint-config-airbnb-base/rules/strict.js +0 -6
- data/node_modules/eslint-config-airbnb-base/rules/style.js +0 -529
- data/node_modules/eslint-config-airbnb-base/rules/variables.js +0 -56
- data/node_modules/eslint-config-airbnb-base/test/requires.js +0 -13
- data/node_modules/eslint-config-airbnb-base/test/test-base.js +0 -32
- data/node_modules/eslint-config-airbnb-base/whitespace-async.js +0 -96
- data/node_modules/eslint-config-airbnb-base/whitespace.js +0 -102
- data/node_modules/eslint-plugin-import/CHANGELOG.md +0 -1925
- data/node_modules/eslint-plugin-import/CONTRIBUTING.md +0 -84
- data/node_modules/eslint-plugin-import/LICENSE +0 -22
- data/node_modules/eslint-plugin-import/README.md +0 -500
- data/node_modules/eslint-plugin-import/RELEASE.md +0 -54
- data/node_modules/eslint-plugin-import/SECURITY.md +0 -11
- data/node_modules/eslint-plugin-import/config/electron.js +0 -8
- data/node_modules/eslint-plugin-import/config/errors.js +0 -14
- data/node_modules/eslint-plugin-import/config/react-native.js +0 -13
- data/node_modules/eslint-plugin-import/config/react.js +0 -18
- data/node_modules/eslint-plugin-import/config/recommended.js +0 -28
- data/node_modules/eslint-plugin-import/config/stage-0.js +0 -12
- data/node_modules/eslint-plugin-import/config/typescript.js +0 -34
- data/node_modules/eslint-plugin-import/config/warnings.js +0 -12
- data/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md +0 -91
- data/node_modules/eslint-plugin-import/docs/rules/default.md +0 -72
- data/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md +0 -92
- data/node_modules/eslint-plugin-import/docs/rules/export.md +0 -37
- data/node_modules/eslint-plugin-import/docs/rules/exports-last.md +0 -51
- data/node_modules/eslint-plugin-import/docs/rules/extensions.md +0 -174
- data/node_modules/eslint-plugin-import/docs/rules/first.md +0 -75
- data/node_modules/eslint-plugin-import/docs/rules/group-exports.md +0 -118
- data/node_modules/eslint-plugin-import/docs/rules/imports-first.md +0 -9
- data/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md +0 -70
- data/node_modules/eslint-plugin-import/docs/rules/named.md +0 -102
- data/node_modules/eslint-plugin-import/docs/rules/namespace.md +0 -106
- data/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md +0 -167
- data/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md +0 -54
- data/node_modules/eslint-plugin-import/docs/rules/no-amd.md +0 -37
- data/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md +0 -83
- data/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md +0 -96
- data/node_modules/eslint-plugin-import/docs/rules/no-cycle.md +0 -111
- data/node_modules/eslint-plugin-import/docs/rules/no-default-export.md +0 -65
- data/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md +0 -62
- data/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md +0 -109
- data/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md +0 -25
- data/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md +0 -49
- data/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md +0 -139
- data/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md +0 -81
- data/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md +0 -136
- data/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md +0 -54
- data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md +0 -52
- data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md +0 -53
- data/node_modules/eslint-plugin-import/docs/rules/no-named-default.md +0 -36
- data/node_modules/eslint-plugin-import/docs/rules/no-named-export.md +0 -79
- data/node_modules/eslint-plugin-import/docs/rules/no-namespace.md +0 -44
- data/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md +0 -42
- data/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md +0 -70
- data/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md +0 -123
- data/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md +0 -198
- data/node_modules/eslint-plugin-import/docs/rules/no-self-import.md +0 -32
- data/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md +0 -60
- data/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md +0 -110
- data/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md +0 -125
- data/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md +0 -85
- data/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md +0 -39
- data/node_modules/eslint-plugin-import/docs/rules/order.md +0 -365
- data/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md +0 -185
- data/node_modules/eslint-plugin-import/docs/rules/unambiguous.md +0 -57
- data/node_modules/eslint-plugin-import/lib/ExportMap.js +0 -856
- data/node_modules/eslint-plugin-import/lib/core/importType.js +0 -129
- data/node_modules/eslint-plugin-import/lib/core/packagePath.js +0 -22
- data/node_modules/eslint-plugin-import/lib/core/staticRequire.js +0 -11
- data/node_modules/eslint-plugin-import/lib/docsUrl.js +0 -8
- data/node_modules/eslint-plugin-import/lib/importDeclaration.js +0 -5
- data/node_modules/eslint-plugin-import/lib/index.js +0 -71
- data/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js +0 -221
- data/node_modules/eslint-plugin-import/lib/rules/default.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js +0 -120
- data/node_modules/eslint-plugin-import/lib/rules/export.js +0 -250
- data/node_modules/eslint-plugin-import/lib/rules/exports-last.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/extensions.js +0 -193
- data/node_modules/eslint-plugin-import/lib/rules/first.js +0 -144
- data/node_modules/eslint-plugin-import/lib/rules/group-exports.js +0 -155
- data/node_modules/eslint-plugin-import/lib/rules/imports-first.js +0 -16
- data/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js +0 -60
- data/node_modules/eslint-plugin-import/lib/rules/named.js +0 -143
- data/node_modules/eslint-plugin-import/lib/rules/namespace.js +0 -218
- data/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js +0 -237
- data/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/no-amd.js +0 -47
- data/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js +0 -103
- data/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js +0 -141
- data/node_modules/eslint-plugin-import/lib/rules/no-cycle.js +0 -158
- data/node_modules/eslint-plugin-import/lib/rules/no-default-export.js +0 -43
- data/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js +0 -138
- data/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js +0 -354
- data/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js +0 -77
- data/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js +0 -105
- data/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js +0 -301
- data/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js +0 -85
- data/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js +0 -144
- data/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js +0 -59
- data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js +0 -96
- data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js +0 -45
- data/node_modules/eslint-plugin-import/lib/rules/no-named-default.js +0 -31
- data/node_modules/eslint-plugin-import/lib/rules/no-named-export.js +0 -39
- data/node_modules/eslint-plugin-import/lib/rules/no-namespace.js +0 -175
- data/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js +0 -44
- data/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js +0 -71
- data/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js +0 -48
- data/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js +0 -245
- data/node_modules/eslint-plugin-import/lib/rules/no-self-import.js +0 -39
- data/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js +0 -79
- data/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js +0 -60
- data/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js +0 -945
- data/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js +0 -147
- data/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js +0 -26
- data/node_modules/eslint-plugin-import/lib/rules/order.js +0 -785
- data/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js +0 -116
- data/node_modules/eslint-plugin-import/lib/rules/unambiguous.js +0 -38
- data/node_modules/eslint-plugin-import/memo-parser/LICENSE +0 -22
- data/node_modules/eslint-plugin-import/memo-parser/README.md +0 -21
- data/node_modules/eslint-plugin-import/memo-parser/index.js +0 -41
- data/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md +0 -395
- data/node_modules/eslint-plugin-import/node_modules/debug/LICENSE +0 -19
- data/node_modules/eslint-plugin-import/node_modules/debug/README.md +0 -437
- data/node_modules/eslint-plugin-import/node_modules/debug/node.js +0 -1
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/index.js +0 -162
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/license.md +0 -21
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/package.json +0 -38
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/readme.md +0 -59
- data/node_modules/eslint-plugin-import/node_modules/debug/package.json +0 -51
- data/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js +0 -180
- data/node_modules/eslint-plugin-import/node_modules/debug/src/common.js +0 -249
- data/node_modules/eslint-plugin-import/node_modules/debug/src/index.js +0 -12
- data/node_modules/eslint-plugin-import/node_modules/debug/src/node.js +0 -177
- data/node_modules/eslint-plugin-import/node_modules/doctrine/CHANGELOG.md +0 -94
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE +0 -177
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.closure-compiler +0 -202
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.esprima +0 -19
- data/node_modules/eslint-plugin-import/node_modules/doctrine/README.md +0 -165
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/doctrine.js +0 -899
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/typed.js +0 -1305
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/utility.js +0 -35
- data/node_modules/eslint-plugin-import/node_modules/doctrine/package.json +0 -57
- data/node_modules/eslint-plugin-import/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/eslint-plugin-import/node_modules/minimatch/README.md +0 -230
- data/node_modules/eslint-plugin-import/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/eslint-plugin-import/node_modules/minimatch/package.json +0 -33
- data/node_modules/eslint-plugin-import/node_modules/semver/LICENSE +0 -15
- data/node_modules/eslint-plugin-import/node_modules/semver/README.md +0 -443
- data/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js +0 -174
- data/node_modules/eslint-plugin-import/node_modules/semver/package.json +0 -38
- data/node_modules/eslint-plugin-import/node_modules/semver/range.bnf +0 -16
- data/node_modules/eslint-plugin-import/node_modules/semver/semver.js +0 -1643
- data/node_modules/eslint-plugin-import/package.json +0 -124
- data/node_modules/function-bind/CHANGELOG.md +0 -136
@@ -1,158 +0,0 @@
|
|
1
|
-
'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}(); /**
|
2
|
-
* @fileOverview Ensures that no imported module imports the linted module.
|
3
|
-
* @author Ben Mosher
|
4
|
-
*/
|
5
|
-
|
6
|
-
var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);
|
7
|
-
var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap);
|
8
|
-
var _importType = require('../core/importType');
|
9
|
-
var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor);
|
10
|
-
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}}
|
11
|
-
|
12
|
-
var traversed = new Set();
|
13
|
-
|
14
|
-
module.exports = {
|
15
|
-
meta: {
|
16
|
-
type: 'suggestion',
|
17
|
-
docs: {
|
18
|
-
category: 'Static analysis',
|
19
|
-
description: 'Forbid a module from importing a module with a dependency path back to itself.',
|
20
|
-
url: (0, _docsUrl2['default'])('no-cycle') },
|
21
|
-
|
22
|
-
schema: [(0, _moduleVisitor.makeOptionsSchema)({
|
23
|
-
maxDepth: {
|
24
|
-
anyOf: [
|
25
|
-
{
|
26
|
-
description: 'maximum dependency depth to traverse',
|
27
|
-
type: 'integer',
|
28
|
-
minimum: 1 },
|
29
|
-
|
30
|
-
{
|
31
|
-
'enum': ['∞'],
|
32
|
-
type: 'string' }] },
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
ignoreExternal: {
|
37
|
-
description: 'ignore external modules',
|
38
|
-
type: 'boolean',
|
39
|
-
'default': false },
|
40
|
-
|
41
|
-
allowUnsafeDynamicCyclicDependency: {
|
42
|
-
description: 'Allow cyclic dependency if there is at least one dynamic import in the chain',
|
43
|
-
type: 'boolean',
|
44
|
-
'default': false } })] },
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
create: function () {function create(context) {
|
50
|
-
var myPath = context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename();
|
51
|
-
if (myPath === '<text>') {return {};} // can't cycle-check a non-file
|
52
|
-
|
53
|
-
var options = context.options[0] || {};
|
54
|
-
var maxDepth = typeof options.maxDepth === 'number' ? options.maxDepth : Infinity;
|
55
|
-
var ignoreModule = function () {function ignoreModule(name) {return options.ignoreExternal && (0, _importType.isExternalModule)(
|
56
|
-
name,
|
57
|
-
(0, _resolve2['default'])(name, context),
|
58
|
-
context);}return ignoreModule;}();
|
59
|
-
|
60
|
-
|
61
|
-
function checkSourceValue(sourceNode, importer) {
|
62
|
-
if (ignoreModule(sourceNode.value)) {
|
63
|
-
return; // ignore external modules
|
64
|
-
}
|
65
|
-
if (
|
66
|
-
options.allowUnsafeDynamicCyclicDependency && (
|
67
|
-
// Ignore `import()`
|
68
|
-
importer.type === 'ImportExpression'
|
69
|
-
// `require()` calls are always checked (if possible)
|
70
|
-
|| importer.type === 'CallExpression' && importer.callee.name !== 'require'))
|
71
|
-
|
72
|
-
{
|
73
|
-
return; // cycle via dynamic import allowed by config
|
74
|
-
}
|
75
|
-
|
76
|
-
if (
|
77
|
-
importer.type === 'ImportDeclaration' && (
|
78
|
-
// import type { Foo } (TS and Flow)
|
79
|
-
importer.importKind === 'type'
|
80
|
-
// import { type Foo } (Flow)
|
81
|
-
|| importer.specifiers.every(function (_ref) {var importKind = _ref.importKind;return importKind === 'type';})))
|
82
|
-
|
83
|
-
{
|
84
|
-
return; // ignore type imports
|
85
|
-
}
|
86
|
-
|
87
|
-
var imported = _ExportMap2['default'].get(sourceNode.value, context);
|
88
|
-
|
89
|
-
if (imported == null) {
|
90
|
-
return; // no-unresolved territory
|
91
|
-
}
|
92
|
-
|
93
|
-
if (imported.path === myPath) {
|
94
|
-
return; // no-self-import territory
|
95
|
-
}
|
96
|
-
|
97
|
-
var untraversed = [{ mget: function () {function mget() {return imported;}return mget;}(), route: [] }];
|
98
|
-
function detectCycle(_ref2) {var mget = _ref2.mget,route = _ref2.route;
|
99
|
-
var m = mget();
|
100
|
-
if (m == null) {return;}
|
101
|
-
if (traversed.has(m.path)) {return;}
|
102
|
-
traversed.add(m.path);var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try {
|
103
|
-
|
104
|
-
for (var _iterator = m.imports[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var _ref3 = _step.value;var _ref4 = _slicedToArray(_ref3, 2);var path = _ref4[0];var _ref4$ = _ref4[1];var getter = _ref4$.getter;var declarations = _ref4$.declarations;
|
105
|
-
if (traversed.has(path)) {continue;}
|
106
|
-
var toTraverse = [].concat(_toConsumableArray(declarations)).filter(function (_ref5) {var source = _ref5.source,isOnlyImportingTypes = _ref5.isOnlyImportingTypes;return !ignoreModule(source.value)
|
107
|
-
// Ignore only type imports
|
108
|
-
&& !isOnlyImportingTypes;});
|
109
|
-
|
110
|
-
|
111
|
-
/*
|
112
|
-
If cyclic dependency is allowed via dynamic import, skip checking if any module is imported dynamically
|
113
|
-
*/
|
114
|
-
if (options.allowUnsafeDynamicCyclicDependency && toTraverse.some(function (d) {return d.dynamic;})) {return;}
|
115
|
-
|
116
|
-
/*
|
117
|
-
Only report as a cycle if there are any import declarations that are considered by
|
118
|
-
the rule. For example:
|
119
|
-
a.ts:
|
120
|
-
import { foo } from './b' // should not be reported as a cycle
|
121
|
-
b.ts:
|
122
|
-
import type { Bar } from './a'
|
123
|
-
*/
|
124
|
-
|
125
|
-
|
126
|
-
if (path === myPath && toTraverse.length > 0) {return true;}
|
127
|
-
if (route.length + 1 < maxDepth) {var _iteratorNormalCompletion2 = true;var _didIteratorError2 = false;var _iteratorError2 = undefined;try {
|
128
|
-
for (var _iterator2 = toTraverse[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {var _ref6 = _step2.value;var source = _ref6.source;
|
129
|
-
untraversed.push({ mget: getter, route: route.concat(source) });
|
130
|
-
}} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}}
|
131
|
-
}
|
132
|
-
}} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}}
|
133
|
-
}
|
134
|
-
|
135
|
-
while (untraversed.length > 0) {
|
136
|
-
var next = untraversed.shift(); // bfs!
|
137
|
-
if (detectCycle(next)) {
|
138
|
-
var message = next.route.length > 0 ? 'Dependency cycle via ' + String(
|
139
|
-
routeString(next.route)) :
|
140
|
-
'Dependency cycle detected.';
|
141
|
-
context.report(importer, message);
|
142
|
-
return;
|
143
|
-
}
|
144
|
-
}
|
145
|
-
}
|
146
|
-
|
147
|
-
return Object.assign((0, _moduleVisitor2['default'])(checkSourceValue, context.options[0]), {
|
148
|
-
'Program:exit': function () {function ProgramExit() {
|
149
|
-
traversed.clear();
|
150
|
-
}return ProgramExit;}() });
|
151
|
-
|
152
|
-
}return create;}() };
|
153
|
-
|
154
|
-
|
155
|
-
function routeString(route) {
|
156
|
-
return route.map(function (s) {return String(s.value) + ':' + String(s.loc.start.line);}).join('=>');
|
157
|
-
}
|
158
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1jeWNsZS5qcyJdLCJuYW1lcyI6WyJ0cmF2ZXJzZWQiLCJTZXQiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiL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V4dC5yZXBvcnQoaW1wb3J0ZXIsIG1lc3NhZ2UpO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBPYmplY3QuYXNzaWduKG1vZHVsZVZpc2l0b3IoY2hlY2tTb3VyY2VWYWx1ZSwgY29udGV4dC5vcHRpb25zWzBdKSwge1xuICAgICAgJ1Byb2dyYW06ZXhpdCcoKSB7XG4gICAgICAgIHRyYXZlcnNlZC5jbGVhcigpO1xuICAgICAgfSxcbiAgICB9KTtcbiAgfSxcbn07XG5cbmZ1bmN0aW9uIHJvdXRlU3RyaW5nKHJvdXRlKSB7XG4gIHJldHVybiByb3V0ZS5tYXAoKHMpID0+IGAke3MudmFsdWV9OiR7cy5sb2Muc3RhcnQubGluZX1gKS5qb2luKCc9PicpO1xufVxuIl19
|
@@ -1,43 +0,0 @@
|
|
1
|
-
'use strict';var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
meta: {
|
5
|
-
type: 'suggestion',
|
6
|
-
docs: {
|
7
|
-
category: 'Style guide',
|
8
|
-
description: 'Forbid default exports.',
|
9
|
-
url: (0, _docsUrl2['default'])('no-default-export') },
|
10
|
-
|
11
|
-
schema: [] },
|
12
|
-
|
13
|
-
|
14
|
-
create: function () {function create(context) {
|
15
|
-
// ignore non-modules
|
16
|
-
if (context.parserOptions.sourceType !== 'module') {
|
17
|
-
return {};
|
18
|
-
}
|
19
|
-
|
20
|
-
var preferNamed = 'Prefer named exports.';
|
21
|
-
var noAliasDefault = function () {function noAliasDefault(_ref) {var local = _ref.local;return 'Do not alias `' + String(local.name) + '` as `default`. Just export `' + String(local.name) + '` itself instead.';}return noAliasDefault;}();
|
22
|
-
|
23
|
-
return {
|
24
|
-
ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) {var _ref2 =
|
25
|
-
context.getSourceCode().getFirstTokens(node)[1] || {},loc = _ref2.loc;
|
26
|
-
context.report({ node: node, message: preferNamed, loc: loc });
|
27
|
-
}return ExportDefaultDeclaration;}(),
|
28
|
-
|
29
|
-
ExportNamedDeclaration: function () {function ExportNamedDeclaration(node) {
|
30
|
-
node.specifiers.
|
31
|
-
filter(function (specifier) {return (specifier.exported.name || specifier.exported.value) === 'default';}).
|
32
|
-
forEach(function (specifier) {var _ref3 =
|
33
|
-
context.getSourceCode().getFirstTokens(node)[1] || {},loc = _ref3.loc;
|
34
|
-
if (specifier.type === 'ExportDefaultSpecifier') {
|
35
|
-
context.report({ node: node, message: preferNamed, loc: loc });
|
36
|
-
} else if (specifier.type === 'ExportSpecifier') {
|
37
|
-
context.report({ node: node, message: noAliasDefault(specifier), loc: loc });
|
38
|
-
}
|
39
|
-
});
|
40
|
-
}return ExportNamedDeclaration;}() };
|
41
|
-
|
42
|
-
}return create;}() };
|
43
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kZWZhdWx0LWV4cG9ydC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwiY2F0ZWdvcnkiLCJkZXNjcmlwdGlvbiIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwic291cmNlVHlwZSIsInByZWZlck5hbWVkIiwibm9BbGlhc0RlZmF1bHQiLCJsb2NhbCIsIm5hbWUiLCJFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24iLCJub2RlIiwiZ2V0U291cmNlQ29kZSIsImdldEZpcnN0VG9rZW5zIiwibG9jIiwicmVwb3J0IiwibWVzc2FnZSIsIkV4cG9ydE5hbWVkRGVjbGFyYXRpb24iLCJzcGVjaWZpZXJzIiwiZmlsdGVyIiwic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BpZiAoc3BlY2lmaWVyLnR5cGUgPT09ICdFeHBvcnREZWZhdWx0U3BlY2lmaWVyJykge1xuICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2U6IHByZWZlck5hbWVkLCBsb2MgfSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNwZWNpZmllci50eXBlID09PSAnRXhwb3J0U3BlY2lmaWVyJykge1xuICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2U6IG5vQWxpYXNEZWZhdWx0KHNwZWNpZmllciksIGxvYyAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19
|
@@ -1,138 +0,0 @@
|
|
1
|
-
'use strict';var _declaredScope = require('eslint-module-utils/declaredScope');var _declaredScope2 = _interopRequireDefault(_declaredScope);
|
2
|
-
var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap);
|
3
|
-
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
|
4
|
-
|
5
|
-
function message(deprecation) {
|
6
|
-
return 'Deprecated' + (deprecation.description ? ': ' + String(deprecation.description) : '.');
|
7
|
-
}
|
8
|
-
|
9
|
-
function getDeprecation(metadata) {
|
10
|
-
if (!metadata || !metadata.doc) {return;}
|
11
|
-
|
12
|
-
return metadata.doc.tags.find(function (t) {return t.title === 'deprecated';});
|
13
|
-
}
|
14
|
-
|
15
|
-
module.exports = {
|
16
|
-
meta: {
|
17
|
-
type: 'suggestion',
|
18
|
-
docs: {
|
19
|
-
category: 'Helpful warnings',
|
20
|
-
description: 'Forbid imported names marked with `@deprecated` documentation tag.',
|
21
|
-
url: (0, _docsUrl2['default'])('no-deprecated') },
|
22
|
-
|
23
|
-
schema: [] },
|
24
|
-
|
25
|
-
|
26
|
-
create: function () {function create(context) {
|
27
|
-
var deprecated = new Map();
|
28
|
-
var namespaces = new Map();
|
29
|
-
|
30
|
-
function checkSpecifiers(node) {
|
31
|
-
if (node.type !== 'ImportDeclaration') {return;}
|
32
|
-
if (node.source == null) {return;} // local export, ignore
|
33
|
-
|
34
|
-
var imports = _ExportMap2['default'].get(node.source.value, context);
|
35
|
-
if (imports == null) {return;}
|
36
|
-
|
37
|
-
var moduleDeprecation = imports.doc && imports.doc.tags.find(function (t) {return t.title === 'deprecated';});
|
38
|
-
if (moduleDeprecation) {
|
39
|
-
context.report({ node: node, message: message(moduleDeprecation) });
|
40
|
-
}
|
41
|
-
|
42
|
-
if (imports.errors.length) {
|
43
|
-
imports.reportErrors(context, node);
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
|
47
|
-
node.specifiers.forEach(function (im) {
|
48
|
-
var imported = void 0;var local = void 0;
|
49
|
-
switch (im.type) {
|
50
|
-
|
51
|
-
case 'ImportNamespaceSpecifier':{
|
52
|
-
if (!imports.size) {return;}
|
53
|
-
namespaces.set(im.local.name, imports);
|
54
|
-
return;
|
55
|
-
}
|
56
|
-
|
57
|
-
case 'ImportDefaultSpecifier':
|
58
|
-
imported = 'default';
|
59
|
-
local = im.local.name;
|
60
|
-
break;
|
61
|
-
|
62
|
-
case 'ImportSpecifier':
|
63
|
-
imported = im.imported.name;
|
64
|
-
local = im.local.name;
|
65
|
-
break;
|
66
|
-
|
67
|
-
default:return; // can't handle this one
|
68
|
-
}
|
69
|
-
|
70
|
-
// unknown thing can't be deprecated
|
71
|
-
var exported = imports.get(imported);
|
72
|
-
if (exported == null) {return;}
|
73
|
-
|
74
|
-
// capture import of deep namespace
|
75
|
-
if (exported.namespace) {namespaces.set(local, exported.namespace);}
|
76
|
-
|
77
|
-
var deprecation = getDeprecation(imports.get(imported));
|
78
|
-
if (!deprecation) {return;}
|
79
|
-
|
80
|
-
context.report({ node: im, message: message(deprecation) });
|
81
|
-
|
82
|
-
deprecated.set(local, deprecation);
|
83
|
-
|
84
|
-
});
|
85
|
-
}
|
86
|
-
|
87
|
-
return {
|
88
|
-
Program: function () {function Program(_ref) {var body = _ref.body;return body.forEach(checkSpecifiers);}return Program;}(),
|
89
|
-
|
90
|
-
Identifier: function () {function Identifier(node) {
|
91
|
-
if (node.parent.type === 'MemberExpression' && node.parent.property === node) {
|
92
|
-
return; // handled by MemberExpression
|
93
|
-
}
|
94
|
-
|
95
|
-
// ignore specifier identifiers
|
96
|
-
if (node.parent.type.slice(0, 6) === 'Import') {return;}
|
97
|
-
|
98
|
-
if (!deprecated.has(node.name)) {return;}
|
99
|
-
|
100
|
-
if ((0, _declaredScope2['default'])(context, node.name) !== 'module') {return;}
|
101
|
-
context.report({
|
102
|
-
node: node,
|
103
|
-
message: message(deprecated.get(node.name)) });
|
104
|
-
|
105
|
-
}return Identifier;}(),
|
106
|
-
|
107
|
-
MemberExpression: function () {function MemberExpression(dereference) {
|
108
|
-
if (dereference.object.type !== 'Identifier') {return;}
|
109
|
-
if (!namespaces.has(dereference.object.name)) {return;}
|
110
|
-
|
111
|
-
if ((0, _declaredScope2['default'])(context, dereference.object.name) !== 'module') {return;}
|
112
|
-
|
113
|
-
// go deep
|
114
|
-
var namespace = namespaces.get(dereference.object.name);
|
115
|
-
var namepath = [dereference.object.name];
|
116
|
-
// while property is namespace and parent is member expression, keep validating
|
117
|
-
while (namespace instanceof _ExportMap2['default'] && dereference.type === 'MemberExpression') {
|
118
|
-
// ignore computed parts for now
|
119
|
-
if (dereference.computed) {return;}
|
120
|
-
|
121
|
-
var metadata = namespace.get(dereference.property.name);
|
122
|
-
|
123
|
-
if (!metadata) {break;}
|
124
|
-
var deprecation = getDeprecation(metadata);
|
125
|
-
|
126
|
-
if (deprecation) {
|
127
|
-
context.report({ node: dereference.property, message: message(deprecation) });
|
128
|
-
}
|
129
|
-
|
130
|
-
// stash and pop
|
131
|
-
namepath.push(dereference.property.name);
|
132
|
-
namespace = metadata.namespace;
|
133
|
-
dereference = dereference.parent;
|
134
|
-
}
|
135
|
-
}return MemberExpression;}() };
|
136
|
-
|
137
|
-
}return create;}() };
|
138
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kZXByZWNhdGVkLmpzIl0sIm5hbWVzIjpbIm1lc3NhZ2UiLCJkZXByZWNhdGlvbiIsImRlc2NyaXB0aW9uIiwiZ2V0RGVwcmVjYXRpb24iLCJtZXRhZGF0YSIsImRvYyIsInRhZ3MiLCJmaW5kIiwidCIsInRpdGxlIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImNhdGVnb3J5IiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsImRlcHJlY2F0ZWQiLCJNYXAiLCJuYW1lc3BhY2VzIiwiY2hlY2tTcGVjaWZpZXJzIiwibm9kZSIsInNvdXJjZSIsImltcG9ydHMiLCJFeHBvcnRzIiwiZ2V0IiwidmFsdWUiLCJtb2R1bGVEZXByZWNhdGlvbiIsInJlcG9ydCIsImVycm9ycyIsImxlbmd0aCIsInJlcG9ydEVycm9ycyIsInNwZWNpZmllcnMiLCJmb3JFYWNoIiwiaW0iLCJpbXBvcnRlZCIsImxvY2FsIiwic2l6ZSIsInNldCIsIm5hbWUiLCJleHBvcnRlZCIsIm5hbWVzcGFjZSIsIlByb2dyYW0iLCJib2R5IiwiSWRlbnRpZmllciIsInBhcmVudCIsInByb3BlcnR5Iiwic2xpY2UiLCJoYXMiLCJNZW1iZXJFeHByZXNzaW9uIiwiZGVyZWZlcmVuY2UiLCJvYmplY3QiLCJuYW1lcGF0aCIsImNvbXB1dGVkIiwicHVzaCJdLCJtYXBwaW5ncyI6ImFBQUEsa0U7QUFDQSx5QztBQUNBLHFDOztBQUVBLFNBQVNBLE9BQVQsQ0FBaUJDLFdBQWpCLEVBQThCO0FBQzVCLHlCQUFvQ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