Skip to content

Commit

Permalink
Restrict enum usage for typescript (#51)
Browse files Browse the repository at this point in the history
* Restrict `enum` usage for typescript

* normalize version
  • Loading branch information
juliamokh authored Aug 28, 2023
1 parent 01e47ed commit 99d9026
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## 2.1.0

- Restrict `enum` usage for typescript
- Add `no-throw-literal` rule for typescript

## 2.0.0

- update dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-yola",
"version": "2.0.0",
"version": "2.1.0",
"main": "index.js",
"scripts": {
"lint": "eslint -c .eslintrc.js ./",
Expand Down
5 changes: 2 additions & 3 deletions src/eslint-config-yola/typescript/rules/ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ module.exports = {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-invalid-void-type': 'error',
Expand All @@ -89,7 +87,6 @@ module.exports = {
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-useless-empty-export': 'error',
'@typescript-eslint/prefer-enum-initializers': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
Expand All @@ -115,5 +112,7 @@ module.exports = {
default: 'array-simple',
},
],
'@typescript-eslint/no-throw-literal': 'error',
'no-restricted-syntax': ['error', 'TSEnumDeclaration'],
},
};

0 comments on commit 99d9026

Please sign in to comment.