diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2023-07-26 06:29:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 17:59:03 +0530 |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /.eslintrc.js | |
parent | Add Excalidraw recipe (#393) (diff) | |
download | ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.gz ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.zst ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.zip |
chore: improve lint setup (#397)
- update eslint config to closely mirror the ones from ferdium-app
- add .eslintignore
- opt in to eslint `reportUnusedDisableDirectives` config option
- remove `trailingComma: all` from `prettier` config which is default in `prettier` v3
- autofix or disable a lot of lint issues throughout codebase
- add `volta` configuration to `package.json` to autoload correct `node` and `pnpm` versions
- upgrade all `eslint` and `prettier` related dependencies to latest
- update lint:fix npm script
- reformat touched files with prettier
- bumped up minor version for all recipes that have changes
- introduced injection of 'service.css' where it was missing in many recipes
---------
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 25e75f3..7c1f725 100644 --- a/.eslintrc.js +++ b/.eslintrc.js | |||
@@ -11,8 +11,23 @@ module.exports = { | |||
11 | jquery: true, | 11 | jquery: true, |
12 | }, | 12 | }, |
13 | extends: ['eslint:recommended', 'plugin:unicorn/recommended'], | 13 | extends: ['eslint:recommended', 'plugin:unicorn/recommended'], |
14 | reportUnusedDisableDirectives: true, | ||
14 | rules: { | 15 | rules: { |
15 | // eslint-plugin-unicorn | 16 | // eslint |
17 | 'array-callback-return': 1, | ||
18 | 'consistent-return': 1, | ||
19 | 'no-await-in-loop': 1, | ||
20 | 'no-return-assign': 1, | ||
21 | 'no-console': [ | ||
22 | 1, | ||
23 | { | ||
24 | allow: ['warn', 'error'], | ||
25 | }, | ||
26 | ], | ||
27 | 'no-param-reassign': 1, | ||
28 | 'prefer-destructuring': 0, | ||
29 | // eslint-plugin-unicorn | ||
30 | 'unicorn/filename-case': 0, | ||
16 | 'unicorn/no-null': 0, | 31 | 'unicorn/no-null': 0, |
17 | 'unicorn/no-useless-undefined': 0, | 32 | 'unicorn/no-useless-undefined': 0, |
18 | 'unicorn/prefer-module': 0, | 33 | 'unicorn/prefer-module': 0, |
@@ -31,5 +46,7 @@ module.exports = { | |||
31 | 'unicorn/consistent-destructuring': 0, | 46 | 'unicorn/consistent-destructuring': 0, |
32 | 'unicorn/no-array-reduce': 0, | 47 | 'unicorn/no-array-reduce': 0, |
33 | 'unicorn/no-nested-ternary': 0, | 48 | 'unicorn/no-nested-ternary': 0, |
49 | 'unicorn/prefer-top-level-await': 0, | ||
50 | 'unicorn/prefer-string-replace-all': 0, | ||
34 | }, | 51 | }, |
35 | }; | 52 | }; |