@geops/eslint-config-react 1.0.0

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 ADDED
@@ -0,0 +1,15 @@
1
+ # ESLint config for React
2
+
3
+ Run the following command to install the ESLint configuration for React projects:
4
+
5
+ ```bash
6
+ npm install --save-dev @geops/eslint-config-react
7
+ ```
8
+
9
+ Then, create a `.eslintrc.json` file in the root of your project with the following content:
10
+
11
+ ```javascript
12
+ {
13
+ "extends": ["@geops/eslint-config-react"]
14
+ }
15
+ ```
@@ -0,0 +1,62 @@
1
+ module.exports = [
2
+ "addEventListener",
3
+ "blur",
4
+ "close",
5
+ "closed",
6
+ "confirm",
7
+ "defaultStatus",
8
+ "defaultstatus",
9
+ "event",
10
+ "external",
11
+ "find",
12
+ "focus",
13
+ "frameElement",
14
+ "frames",
15
+ "history",
16
+ "innerHeight",
17
+ "innerWidth",
18
+ "isFinite",
19
+ "isNaN",
20
+ "length",
21
+ "location",
22
+ "locationbar",
23
+ "menubar",
24
+ "moveBy",
25
+ "moveTo",
26
+ "name",
27
+ "onblur",
28
+ "onerror",
29
+ "onfocus",
30
+ "onload",
31
+ "onresize",
32
+ "onunload",
33
+ "open",
34
+ "opener",
35
+ "opera",
36
+ "outerHeight",
37
+ "outerWidth",
38
+ "pageXOffset",
39
+ "pageYOffset",
40
+ "parent",
41
+ "print",
42
+ "removeEventListener",
43
+ "resizeBy",
44
+ "resizeTo",
45
+ "screen",
46
+ "screenLeft",
47
+ "screenTop",
48
+ "screenX",
49
+ "screenY",
50
+ "scroll",
51
+ "scrollbars",
52
+ "scrollBy",
53
+ "scrollTo",
54
+ "scrollX",
55
+ "scrollY",
56
+ "self",
57
+ "status",
58
+ "statusbar",
59
+ "stop",
60
+ "toolbar",
61
+ "top",
62
+ ];
package/index.js ADDED
@@ -0,0 +1,25 @@
1
+ const confusingBrowserGlobals = require("./confusing-browser-globals");
2
+
3
+ module.exports = {
4
+ extends: [
5
+ "eslint:recommended",
6
+ "plugin:@typescript-eslint/recommended",
7
+ "plugin:cypress/recommended",
8
+ "plugin:jsx-a11y/recommended",
9
+ "plugin:react/recommended",
10
+ "plugin:react-hooks/recommended",
11
+ "prettier",
12
+ ],
13
+ parser: "@typescript-eslint/parser",
14
+ rules: {
15
+ "import/order": "error",
16
+ "jsx-a11y/click-events-have-key-events": "error",
17
+ "no-nested-ternary": "error",
18
+ "no-param-reassign": "error",
19
+ "no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
20
+ "react/destructuring-assignment": "error",
21
+ "@typescript-eslint/no-shadow": "error",
22
+ "@typescript-eslint/no-unused-vars": "error",
23
+ "@typescript-eslint/no-use-before-define": "error",
24
+ },
25
+ };
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@geops/eslint-config-react",
3
+ "dependencies": {
4
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
5
+ "@typescript-eslint/parser": "^7.14.1",
6
+ "eslint-config-prettier": "^9.1.0",
7
+ "eslint-plugin-cypress": "^3.3.0",
8
+ "eslint-plugin-jsx-a11y": "^6.9.0",
9
+ "eslint-plugin-react": "^7.34.3",
10
+ "eslint-plugin-react-hooks": "^4.6.2"
11
+ },
12
+ "peerDependencies": {
13
+ "eslint": "^8"
14
+ },
15
+ "version": "1.0.0"
16
+ }