Skip to content

Commit

Permalink
refactor: Enable eslint RegEx rules (#240)
Browse files Browse the repository at this point in the history
With the introduction of ESLint 9 and the update of `typescript-eslint`,
there are new rules that will be applied to the code. Those rules are
mainly focused on Regex patterns.

With #230 those rules have been
turned off to keep it consistent with the old behavior.
This change aims to enable those rules.

**Note:** The base for this change is
#230 and not the **main** branch.
This way it's clearer what the real changes are.
  • Loading branch information
d3xter666 authored Aug 12, 2024
1 parent 58d2a51 commit 48faecf
Show file tree
Hide file tree
Showing 4 changed files with 1,284 additions and 205 deletions.
8 changes: 5 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export default tseslint.config(
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
],
ignores: [
// This file is a copy of an openui5 resource which is located at
// https://github.com/SAP/openui5/blob/master/lib/jsdoc/transformApiJson.js
"src/formatter/lib/resolveLinks.ts",
],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
Expand All @@ -67,9 +72,6 @@ export default tseslint.config(
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/prefer-includes": "off",
},
}, {
// To be discussed: Type-aware checks might add quite some additional work when writing tests
Expand Down
Loading

0 comments on commit 48faecf

Please sign in to comment.