@croct/eslint-plugin 0.8.0 → 0.8.2
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/configs/cypress.js +27 -19
- package/configs/index.js +10 -11
- package/configs/javascript.js +848 -875
- package/configs/react.js +333 -318
- package/configs/typescript.js +107 -89
- package/index.js +26 -4
- package/package.json +8 -7
- package/rules/argument-spacing/index.js +3 -2
- package/rules/complex-expression-spacing/index.js +4 -3
- package/rules/jsx-attribute-spacing/index.js +4 -2
- package/rules/newline-per-chained-call/index.js +18 -17
package/configs/cypress.js
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.cypress = {
|
|
5
|
-
extends: [
|
|
6
|
-
'plugin:@croct/javascript',
|
|
7
|
-
],
|
|
8
|
-
plugins: [
|
|
9
|
-
'cypress',
|
|
10
|
-
'@croct',
|
|
11
|
-
],
|
|
12
|
-
rules: {
|
|
13
|
-
'no-loop-func': 0,
|
|
14
|
-
'cypress/no-assigning-return-values': 'warn',
|
|
15
|
-
'cypress/no-unnecessary-waiting': 'error',
|
|
16
|
-
'cypress/assertion-before-screenshot': 'warn',
|
|
17
|
-
'cypress/no-async-tests': 'error',
|
|
18
|
-
'cypress/no-pause': 'error',
|
|
19
|
-
'@typescript-eslint/no-namespace': 'off',
|
|
20
|
-
},
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
4
|
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createCypressConfig = createCypressConfig;
|
|
7
|
+
const eslint_plugin_cypress_1 = __importDefault(require("eslint-plugin-cypress"));
|
|
8
|
+
// Factory function to create Cypress config with the plugin reference
|
|
9
|
+
function createCypressConfig(plugin, javascriptConfig) {
|
|
10
|
+
return [
|
|
11
|
+
...javascriptConfig,
|
|
12
|
+
{
|
|
13
|
+
name: '@croct/cypress',
|
|
14
|
+
plugins: {
|
|
15
|
+
cypress: eslint_plugin_cypress_1.default,
|
|
16
|
+
'@croct': plugin,
|
|
17
|
+
},
|
|
18
|
+
rules: {
|
|
19
|
+
'no-loop-func': 0,
|
|
20
|
+
'cypress/no-assigning-return-values': 'warn',
|
|
21
|
+
'cypress/no-unnecessary-waiting': 'error',
|
|
22
|
+
'cypress/assertion-before-screenshot': 'warn',
|
|
23
|
+
'cypress/no-async-tests': 'error',
|
|
24
|
+
'cypress/no-pause': 'error',
|
|
25
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
}
|
package/configs/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
3
|
+
exports.baseRules = exports.createJavaScriptConfig = exports.createTypescriptConfig = exports.createReactConfig = exports.createCypressConfig = void 0;
|
|
4
|
+
var cypress_1 = require("./cypress");
|
|
5
|
+
Object.defineProperty(exports, "createCypressConfig", { enumerable: true, get: function () { return cypress_1.createCypressConfig; } });
|
|
6
|
+
var react_1 = require("./react");
|
|
7
|
+
Object.defineProperty(exports, "createReactConfig", { enumerable: true, get: function () { return react_1.createReactConfig; } });
|
|
8
|
+
var typescript_1 = require("./typescript");
|
|
9
|
+
Object.defineProperty(exports, "createTypescriptConfig", { enumerable: true, get: function () { return typescript_1.createTypescriptConfig; } });
|
|
10
|
+
var javascript_1 = require("./javascript");
|
|
11
|
+
Object.defineProperty(exports, "createJavaScriptConfig", { enumerable: true, get: function () { return javascript_1.createJavaScriptConfig; } });
|
|
12
|
+
Object.defineProperty(exports, "baseRules", { enumerable: true, get: function () { return javascript_1.baseRules; } });
|