Iván Ovejero
dc8c94d036
ci: Introduce lint rule no-type-unsafe-event-emitter
(no-changelog) ( #10254 )
2024-08-02 12:01:42 +02:00
Iván Ovejero
8e529219df
refactor(core): Lint to restrict @n8n/typeorm
to persistence layer (no-changelog) ( #9840 )
2024-06-24 10:24:05 +02:00
Iván Ovejero
d1b2affd2c
ci: Add lint rule no-dynamic-import-template
(no-changelog) ( #8089 )
...
Follow-up to: https://github.com/n8n-io/n8n/pull/8086
`tsc-alias` as of 1.8.7 is unable to resolve template strings in dynamic
imports. Since the module name mapper in Jest is able to, this issue is
hard to detect, hence the new lint rule `no-dynamic-import-template`.
This is for now specific to `@/` in the `cli` package - we can
generalize later if needed. Ideally we should contribute a fix upstream
when we have more time.
<img width="940" alt="Capture 2023-12-19 at 12 39 55@2x"
src="https://github.com/n8n-io/n8n/assets/44588767/78d4a277-ccff-455c-8610-d1bba39d93f2 ">
2023-12-21 14:15:37 +01:00
Iván Ovejero
8cb9c6b3ea
ci: Introduce no-plain-errors
lint rule for BE packages (no-changelog) ( #7961 )
...
## Summary
Require `ApplicationError` or its child classes instead of plain `Error`
in BE packages. This ensures the error will be normalized when reported
to Sentry, if applicable.
Follow-up to:
https://github.com/n8n-io/n8n/pulls?q=is%3Apr+is%3Aclosed+applicationerror
...
#### How to test the change:
1. ...
## Issues fixed
Include links to Github issue or Community forum post or **Linear
ticket**:
> Important in order to close automatically and provide context to
reviewers
...
## Review / Merge checklist
- [ ] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md ))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs ) or follow-up
ticket created.
- [ ] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again. A feature is not complete without tests.
>
> *(internal)* You can use Slack commands to trigger [e2e
tests](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#a39f9e5ba64a48b58a71d81c837e8227 )
or [deploy test
instance](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#f6a177d32bde4b57ae2da0b8e454bfce )
or [deploy early access version on
Cloud](https://www.notion.so/n8n/Cloudbot-3dbe779836004972b7057bc989526998?pvs=4#fef2d36ab02247e1a0f65a74f6fb534e ).
2023-12-08 12:51:49 +01:00
Iván Ovejero
96144bd983
ci: Add rule dangerously-use-html-string-missing
(no-changelog) ( #6299 )
2023-05-24 10:12:41 +02:00
Iván Ovejero
fe937a0ee3
ci: Forbid skipping tests (no-changelog) ( #6199 )
2023-05-24 09:45:37 +02:00
Iván Ovejero
946f7f38ba
ci: Fix catch clause lint rule ( #5875 )
...
🐛 Fix catch clause lint rule
2023-03-31 19:16:51 +02:00
Iván Ovejero
62751b5a0b
refactor: Add lint rule no-unused-param-in-catch-clause
( #5868 )
...
👕 Add lint rule `no-unused-param-in-catch-clause`
2023-03-31 16:44:08 +02:00
Iván Ovejero
0b47f9ce4e
refactor: Lint for no interpolation in regular string ( #5060 ) (no-changelog)
...
* ✨ Create rule `no-interpolation-in-regular-string`
* 👕 Enable rule
* ⚡ Run rule (no issues) and add exception
* ⚡ Simplify regex
To account for expressions and to make it less expensive
2022-12-29 14:24:19 +01:00
Iván Ovejero
d9b98fc8be
refactor: Lint for no unneeded backticks ( #5057 ) (no-changelog)
...
* ✨ Create rule `no-unneeded-backticks`
* 👕 Enable rule
* ⚡ Run rule on `cli`
* ⚡ Run rule on `core`
* ⚡ Run rule on `workflow`
* ⚡ Rule rule on `design-system`
* ⚡ Run rule on `node-dev`
* ⚡ Run rule on `editor-ui`
* ⚡ Run rule on `nodes-base`
2022-12-29 12:20:43 +01:00
Iván Ovejero
1732324965
fix(core): amend typing for jsonParse()
options ( #4423 )
...
* 📘 Amend typing for `jsonParse()` options
* ✏️ Update rule message and description
* 🔀 Cherrypick Adi's work
* 🐛 Account for falsy fallback values
* ♻️ Use `else if`
* ⚡ Add explicit error message as type
* ⚡ Consolidate utils tests
* ♻️ Use optional chaining
* 🔥 Remove patchy type error
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <[email protected] >
2022-10-24 12:48:16 +02:00
Iván Ovejero
6a1838d8c1
refactor: lint for inefficient deep clones ( #4378 )
...
* 👕 Create rule `no-json-parse-json-stringify`
* 🧪 Add tests
* 👕 Enable new rule
* 👕 FIx unrelated lint issue
2022-10-19 09:36:25 +02:00
Mike Arvela
31391a5b19
feat(eslint-config): add custom eslint rule 'no-uncaught-json-parse' ( #4087 )
...
feat(eslint-config): add custom eslint rule 'no-uncaugh-json-parse'
Co-authored-by: Iván Ovejero <[email protected] >
2022-09-26 11:08:59 +03:00