diff options
author | 2021-08-05 08:58:28 +0200 | |
---|---|---|
committer | 2021-08-05 08:05:49 +0000 | |
commit | 305c2c5ecb49a1349be2efb1ef557d61da9a64dc (patch) | |
tree | 19a05ed4ddfc1e5b5bb7fc3ecc071ad562da820f /.eslintrc | |
parent | refactor: minor refactoring: solve name-clash of env vars vs vars in the program (diff) | |
download | ferdium-app-305c2c5ecb49a1349be2efb1ef557d61da9a64dc.tar.gz ferdium-app-305c2c5ecb49a1349be2efb1ef557d61da9a64dc.tar.zst ferdium-app-305c2c5ecb49a1349be2efb1ef557d61da9a64dc.zip |
refactor: general code improvements
- replace deprecated fs.exists with fs.existsSync
- replace console.log with debug
- replace hardcoded FERDI_VERSION in start.js with dynamic one from package.json
- correct JSDoc annotations in Handler.js
- simplify macOSPermissions.js
- updates to various eslint rules
- add FileReader to known globals
Diffstat (limited to '.eslintrc')
-rw-r--r-- | .eslintrc | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -89,7 +89,8 @@ | |||
89 | "localStorage": true, | 89 | "localStorage": true, |
90 | "navigator": true, | 90 | "navigator": true, |
91 | "Element": true, | 91 | "Element": true, |
92 | "use": true | 92 | "use": true, |
93 | "FileReader": true | ||
93 | }, | 94 | }, |
94 | "env": { | 95 | "env": { |
95 | "jest/globals": true | 96 | "jest/globals": true |
@@ -97,18 +98,23 @@ | |||
97 | "rules": { | 98 | "rules": { |
98 | // eslint | 99 | // eslint |
99 | "arrow-parens": 0, | 100 | "arrow-parens": 0, |
100 | "class-methods-use-this": 1, | 101 | "class-methods-use-this": 0, |
101 | "consistent-return": 1, | 102 | "consistent-return": 1, |
103 | "implicit-arrow-linebreak": 0, | ||
104 | "function-paren-newline": 0, | ||
102 | "max-len": 0, | 105 | "max-len": 0, |
106 | "no-await-in-loop": 1, | ||
107 | "no-console": [1, { "allow": ["warn", "error"] }], | ||
103 | "no-param-reassign": 1, | 108 | "no-param-reassign": 1, |
104 | "no-restricted-syntax": 0, | 109 | "no-restricted-syntax": 0, |
105 | "no-underscore-dangle": 0, | 110 | "no-underscore-dangle": 0, |
106 | "operator-linebreak": 0, | 111 | "operator-linebreak": 0, |
107 | "prefer-destructuring": 1, | 112 | "prefer-destructuring": 1, |
113 | "object-curly-newline": 0, | ||
108 | // eslint-plugin-import | 114 | // eslint-plugin-import |
109 | "import/extensions": 1, | 115 | "import/extensions": 1, |
110 | "import/prefer-default-export": 0, | 116 | "import/prefer-default-export": 0, |
111 | "import/no-extraneous-dependencies": 1, | 117 | "import/no-extraneous-dependencies": 0, // various false positives, re-enable at some point |
112 | "import/no-unresolved": 1, | 118 | "import/no-unresolved": 1, |
113 | // eslint-plugin-react | 119 | // eslint-plugin-react |
114 | "react/forbid-prop-types": 1, | 120 | "react/forbid-prop-types": 1, |