eslint-config-teselagen 5.0.9 → 6.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/cypress.js +2 -0
- package/es5.js +1 -0
- package/node.js +3 -0
- package/package.json +15 -13
- package/react.js +3 -0
- package/patch.js +0 -44
package/README.md
CHANGED
package/cypress.js
CHANGED
package/es5.js
CHANGED
package/node.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require("@rushstack/eslint-patch/modern-module-resolution");
|
2
|
+
|
1
3
|
module.exports = {
|
2
4
|
extends: "react-app",
|
3
5
|
env: {
|
@@ -6,6 +8,7 @@ module.exports = {
|
|
6
8
|
mocha: true,
|
7
9
|
},
|
8
10
|
rules: {
|
11
|
+
"import/no-anonymous-default-export": 0,
|
9
12
|
"no-undef": 2,
|
10
13
|
"no-console": [1, { allow: ["warn", "error", "info"] }],
|
11
14
|
"no-unused-vars": 1,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint-config-teselagen",
|
3
|
-
"version": "
|
3
|
+
"version": "6.0.3",
|
4
4
|
"description": "teselagen linter rules",
|
5
5
|
"repository": "https://github.com/TeselaGen/eslint-config-teselagen.git",
|
6
6
|
"author": "teselagen team@teselagen",
|
@@ -9,18 +9,20 @@
|
|
9
9
|
"extends": "./node.js"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"@
|
13
|
-
"@typescript-eslint/
|
14
|
-
"
|
15
|
-
"eslint": "^
|
16
|
-
"eslint
|
17
|
-
"eslint-
|
18
|
-
"eslint-plugin-
|
19
|
-
"eslint-plugin-
|
20
|
-
"eslint-plugin-
|
21
|
-
"eslint-plugin-
|
22
|
-
"eslint-plugin-no-only-tests": "^2.
|
23
|
-
"eslint-plugin-react
|
12
|
+
"@rushstack/eslint-patch": "^1.1.0",
|
13
|
+
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
14
|
+
"@typescript-eslint/parser": "^4.0.0",
|
15
|
+
"babel-eslint": "^10.0.0",
|
16
|
+
"eslint": "7.32.0",
|
17
|
+
"eslint-config-react-app": "^6.0.0",
|
18
|
+
"eslint-plugin-cypress": "^2.12.1",
|
19
|
+
"eslint-plugin-flowtype": "^5.2.0",
|
20
|
+
"eslint-plugin-import": "^2.22.0",
|
21
|
+
"eslint-plugin-jsx-a11y": "^6.3.1",
|
22
|
+
"eslint-plugin-no-only-tests": "^2.6.0",
|
23
|
+
"eslint-plugin-react": "^7.20.3",
|
24
|
+
"eslint-plugin-react-app": "^6.2.2",
|
25
|
+
"eslint-plugin-react-hooks": "^4.0.8"
|
24
26
|
},
|
25
27
|
"peerDependencies": {
|
26
28
|
"husky": "^0.14.3",
|
package/react.js
CHANGED
package/patch.js
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
2
|
-
// See LICENSE in the project root for license information.
|
3
|
-
|
4
|
-
// This is a workaround for https://github.com/eslint/eslint/issues/3458
|
5
|
-
//
|
6
|
-
// To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file:
|
7
|
-
//
|
8
|
-
// require("@microsoft/eslint-config-scalable-ts/patch-eslint");
|
9
|
-
//
|
10
|
-
const path = require('path');
|
11
|
-
|
12
|
-
let currentModule = module;
|
13
|
-
while (!/[\\/]eslint[\\/]lib[\\/]cli-engine[\\/]config-array-factory\.js/i.test(currentModule.filename)) {
|
14
|
-
if (!currentModule.parent) {
|
15
|
-
// This was tested with ESLint 6.1.0; other versions may not work
|
16
|
-
throw new Error('Failed to patch ESLint because the calling module was not recognized');
|
17
|
-
}
|
18
|
-
currentModule = currentModule.parent;
|
19
|
-
}
|
20
|
-
const eslintFolder = path.join(path.dirname(currentModule.filename), '../..');
|
21
|
-
|
22
|
-
const configArrayFactoryPath = path.join(eslintFolder, "lib/cli-engine/config-array-factory");
|
23
|
-
const ConfigArrayFactory = require(configArrayFactoryPath).ConfigArrayFactory;
|
24
|
-
|
25
|
-
if (!ConfigArrayFactory.__patched) {
|
26
|
-
ConfigArrayFactory.__patched = true;
|
27
|
-
|
28
|
-
const moduleResolverPath = path.join(eslintFolder, "lib/shared/relative-module-resolver");
|
29
|
-
const ModuleResolver = require(moduleResolverPath);
|
30
|
-
|
31
|
-
const originalLoadPlugin = ConfigArrayFactory.prototype._loadPlugin;
|
32
|
-
ConfigArrayFactory.prototype._loadPlugin = function(name, importerPath, importerName) {
|
33
|
-
const originalResolve = ModuleResolver.resolve;
|
34
|
-
try {
|
35
|
-
ModuleResolver.resolve = function (moduleName, relativeToPath) {
|
36
|
-
// resolve using importerPath instead of relativeToPath
|
37
|
-
return originalResolve.call(this, moduleName, importerPath);
|
38
|
-
};
|
39
|
-
return originalLoadPlugin.apply(this, arguments);
|
40
|
-
} finally {
|
41
|
-
ModuleResolver.resolve = originalResolve;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|