Skip to content

Commit

Permalink
fix(eslint-config): removed damn rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurchishin committed Sep 26, 2023
1 parent 99339eb commit aa97cf2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-config/src/shared/import-ts.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { createImportConfig } = require('./import.cjs')

module.exports = createImportConfig(false)
module.exports = createImportConfig(true)
3 changes: 3 additions & 0 deletions packages/eslint-config/src/shared/regexp.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ module.exports = {
sourceType: 'module',
},
extends: ['plugin:regexp/recommended'],
rules: {
'regexp/strict': 'off',
},
}
32 changes: 14 additions & 18 deletions packages/eslint-config/src/shared/typescript.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
fixStyle: 'separate-type-imports',
},
],
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/member-ordering': [
Expand Down Expand Up @@ -141,7 +141,7 @@ module.exports = {
'protected-decorated-method',
],
optionalityOrder: 'optional-first',
order: 'alphabetically-case-insensitive',
order: 'as-written',
},
},
],
Expand All @@ -150,18 +150,24 @@ module.exports = {
'error',
{
selector: ['accessor', 'method', 'parameterProperty', 'property', 'function', 'parameter'],
format: ['camelCase'],
format: ['camelCase', 'PascalCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'forbid',
},
{
selector: ['variable'],
format: ['camelCase', 'UPPER_CASE'],
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'forbid',
},
{
selector: ['class', 'enum', 'enumMember', 'interface', 'typeAlias', 'typeParameter'],
selector: ['typeAlias'],
format: ['PascalCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'forbid',
},
{
selector: ['class', 'enum', 'enumMember', 'interface', 'typeParameter'],
format: ['PascalCase'],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
Expand Down Expand Up @@ -236,7 +242,7 @@ module.exports = {
'@typescript-eslint/parameter-properties': [
'error',
{
prefer: 'parameter-property',
prefer: 'class-property',
},
],
'@typescript-eslint/prefer-as-const': 'error',
Expand All @@ -254,7 +260,7 @@ module.exports = {
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/prefer-readonly-parameter-types': 'error',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/prefer-return-this-type': 'error',
Expand Down Expand Up @@ -288,17 +294,7 @@ module.exports = {
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/typedef': [
'error',
{
arrayDestructuring: false,
arrowParameter: true,
memberVariableDeclaration: true,
objectDestructuring: false,
parameter: true,
propertyDeclaration: true,
},
],
'@typescript-eslint/typedef': 'off',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/unified-signatures': 'error',

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/src/shared/unicorn.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module.exports = {
'unicorn/prefer-node-protocol': 'error',
'unicorn/prefer-number-properties': 'error',
'unicorn/prefer-switch': ['error', { minimumCases: 5 }],
'unicorn/prevent-abbreviations': 'error',
'unicorn/prevent-abbreviations': 'off',
'unicorn/relative-url-style': 'error',
'unicorn/text-encoding-identifier-case': 'error',

Expand Down
8 changes: 7 additions & 1 deletion packages/eslint-config/src/tests.cjs
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
module.exports = {}
module.exports = {
rules: {
'@typescript-eslint/no-confusing-void-expression': 'off',
'id-length': 'off',
'unicorn/better-regexp': 'off',
},
}

0 comments on commit aa97cf2

Please sign in to comment.