@fullstacksjs/eslint-config 6.6.0-0 → 6.7.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/LICENSE CHANGED
@@ -1,7 +1,21 @@
1
- Copyright 2018 Frontendmonster
1
+ MIT License
2
2
 
3
- 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:
3
+ Copyright (c) 2021 FullstacksJS
4
4
 
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
6
11
 
7
- 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.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -13,26 +13,38 @@
13
13
  ## Installation
14
14
 
15
15
  If you use [ESLint](https://eslint.org/) alongside [TypeScript](https://typescriptlang.org/)
16
+
16
17
  ### npm :
18
+
17
19
  ```sh
18
20
  $ npm install --save-dev @fullstacksjs/eslint-config eslint prettier typescript
19
21
  ```
22
+
20
23
  ### yarn :
24
+
21
25
  ```sh
22
26
  $ yarn add --dev @fullstacksjs/eslint-config eslint prettier typescript
23
27
  ```
28
+
24
29
  for JavaScript development
30
+
25
31
  ### npm :
32
+
26
33
  ```sh
27
34
  $ npm install --save-dev @fullstacksjs/eslint-config eslint prettier
28
35
  ```
36
+
29
37
  ### yarn :
38
+
30
39
  ```sh
31
40
  $ yarn add --dev @fullstacksjs/eslint-config eslint prettier
32
41
  ```
42
+
33
43
  optional dependencies (if you need):
44
+
34
45
  * react
35
46
  * jest
47
+ * cypress
36
48
 
37
49
  ## Usage
38
50
 
@@ -56,6 +68,7 @@ It reads your root `package.json` dependencies and includes necessary rules.
56
68
  "@fullstacksjs/eslint-config/react",
57
69
  "@fullstacksjs/eslint-config/typescript",
58
70
  "@fullstacksjs/eslint-config/strict",
71
+ "@fullstacksjs/eslint-config/cypress",
59
72
  "@fullstacksjs/eslint-config/typecheck" // ⚠️ Needs configurations (not included in default config)
60
73
  ]
61
74
  }
@@ -82,6 +95,7 @@ If you need more advanced `typescript-eslint` rules, then you can extend from `"
82
95
  * @typescript-eslint/eslint-plugin
83
96
  * eslint-plugin-import
84
97
  * eslint-plugin-jest
98
+ * eslint-plugin-cypress
85
99
  * eslint-plugin-jsx-a11y
86
100
  * eslint-plugin-prettier
87
101
  * eslint-plugin-react
package/cypress.js ADDED
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ overrides: [
3
+ {
4
+ files: ['**/cypress/**/*.js', '**/cypress/**/*.ts'],
5
+ plugins: ['cypress'],
6
+ env: {
7
+ 'cypress/globals': true,
8
+ },
9
+ extends: ['./rules/cypress'],
10
+ },
11
+ ],
12
+ };
package/index.js CHANGED
@@ -14,5 +14,6 @@ module.exports = {
14
14
  packages.ifAnyDep('jest', () => require.resolve('./jest')),
15
15
  packages.ifAnyDep('react', () => require.resolve('./react')),
16
16
  packages.ifAnyDep('typescript', () => require.resolve('./typescript')),
17
+ packages.ifAnyDep('cypress', () => require.resolve('./cypress')),
17
18
  ].filter(Boolean),
18
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "6.6.0-0",
3
+ "version": "6.7.2",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -16,6 +16,7 @@
16
16
  "base.js",
17
17
  "index.js",
18
18
  "jest.js",
19
+ "cypress.js",
19
20
  "react.js",
20
21
  "typescript.js",
21
22
  "typecheck.js"
@@ -26,6 +27,7 @@
26
27
  "check-rules:jest": "eslint-find-rules --no-core --unused ./tests/jest.js",
27
28
  "check-rules:react": "eslint-find-rules --no-core --unused ./tests/react.js",
28
29
  "check-rules:typescript": "eslint-find-rules --no-core --unused ./tests/typescript.js",
30
+ "check-rules:cypress": "eslint-find-rules --no-core --unused ./tests/cypress.js",
29
31
  "test": "npm-run-all --parallel check-rules:*",
30
32
  "prepare": "husky install",
31
33
  "prepublishOnly": "pinst --disable",
@@ -35,10 +37,11 @@
35
37
  "main": "index.js",
36
38
  "dependencies": {
37
39
  "@frontendmonster/utils": "0.3.11",
38
- "@typescript-eslint/eslint-plugin": "4.32.0",
39
- "@typescript-eslint/parser": "4.32.0",
40
+ "@typescript-eslint/eslint-plugin": "4.33.0",
41
+ "@typescript-eslint/parser": "4.33.0",
40
42
  "eslint-config-prettier": "8.3.0",
41
43
  "eslint-import-resolver-typescript": "2.5.0",
44
+ "eslint-plugin-cypress": "2.12.1",
42
45
  "eslint-plugin-fp": "2.3.0",
43
46
  "eslint-plugin-import": "2.24.2",
44
47
  "eslint-plugin-jest": "24.4.0",
@@ -67,7 +70,8 @@
67
70
  "eslint": ">=7",
68
71
  "prettier": ">=1",
69
72
  "react": ">=16",
70
- "typescript": ">=4"
73
+ "typescript": ">=4",
74
+ "cypress": ">=8"
71
75
  },
72
76
  "peerDependenciesMeta": {
73
77
  "typescript": {
@@ -75,6 +79,12 @@
75
79
  },
76
80
  "react": {
77
81
  "optional": true
82
+ },
83
+ "cypress": {
84
+ "optional": true
85
+ },
86
+ "jest": {
87
+ "optional": true
78
88
  }
79
89
  }
80
90
  }
@@ -0,0 +1,15 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'cypress/no-assigning-return-values': 'error',
4
+ 'cypress/no-unnecessary-waiting': 'error',
5
+ 'cypress/assertion-before-screenshot': 'warn',
6
+ 'cypress/no-force': 'warn',
7
+ 'cypress/no-async-tests': 'error',
8
+ 'cypress/no-pause': 'error',
9
+
10
+ // other modules
11
+ 'max-lines-per-function': ['off'],
12
+ '@typescript-eslint/method-signature-style': ['off'],
13
+ '@typescript-eslint/no-namespace ': ['off'],
14
+ },
15
+ };