Skip to content

Commit

Permalink
Merge pull request #19 from ChoTotOSS/feat/adjust-rules
Browse files Browse the repository at this point in the history
adjust rules for supporting parameter properties
  • Loading branch information
tunguyen-ct authored Jun 22, 2023
2 parents f32ee30 + a05ccaf commit 6a4466d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-cooks-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chotot/eslint-config-next': patch
---

adjust rules for supporting parameter property
6 changes: 3 additions & 3 deletions packages/eslint-config-next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
'no-empty-function': [
'error',
{
allow: ['arrowFunctions', 'functions', 'methods'],
allow: ['arrowFunctions', 'functions', 'methods', 'constructors'],
},
],
// Disallow empty destructuring patterns
Expand Down Expand Up @@ -431,7 +431,7 @@ module.exports = {
'no-useless-computed-key': 'error',
// Disallow unnecessary constructors
// https://eslint.org/docs/latest/rules/no-useless-constructor
'no-useless-constructor': 'error',
'no-useless-constructor': 'off',
// Disallow renaming import, export, and destructured assignments to the same name
// https://eslint.org/docs/latest/rules/no-useless-rename
'no-useless-rename': [
Expand Down Expand Up @@ -1638,7 +1638,7 @@ module.exports = {
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
// Require or disallow parameter properties in class constructors.
// https://typescript-eslint.io/rules/parameter-properties
'@typescript-eslint/parameter-properties': 'error',
'@typescript-eslint/parameter-properties': 'off',
// Enforce the use of as const over literal type.
// https://typescript-eslint.io/rules/prefer-as-const
'@typescript-eslint/prefer-as-const': 'error',
Expand Down

0 comments on commit 6a4466d

Please sign in to comment.