Skip to content

Commit

Permalink
✨ Remove style related rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Švagr committed Dec 2, 2024
1 parent 5942576 commit d8371a7
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export = {
},
ignorePatterns: [],
rules: {
// code formatting
'security/detect-object-injection': 0,
'@typescript-eslint/no-unused-vars': [
'warn',
{
Expand All @@ -26,54 +26,28 @@ export = {
ignoreRestSiblings: true,
},
],
'@typescript-eslint/comma-dangle': [
'error',
{
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'never',
enums: 'only-multiline',
generics: 'only-multiline',
tuples: 'only-multiline',
},
],
'@typescript-eslint/indent': 0,
'@typescript-eslint/space-before-function-paren': [
2,
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'@typescript-eslint/no-extra-semi': 0,
'@typescript-eslint/member-delimiter-style': 0,
// error prevention
'security/detect-object-injection': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/strict-boolean-expressions': 0,
'@typescript-eslint/restrict-template-expressions': [
2,
'error',
{
allowNumber: true,
allowBoolean: false,
allowNullish: false,
},
],
'@typescript-eslint/no-floating-promises': [2, { ignoreVoid: true }],
'no-void': [2, { allowAsStatement: true }],
'no-fallthrough': 1,
'no-constant-condition': [1, { checkLoops: false }],
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
'no-void': ['error', { allowAsStatement: true }],
'no-fallthrough': 'warn',
'no-constant-condition': ['warn', { checkLoops: false }],

// Less strictness over ??
'@typescript-eslint/prefer-nullish-coalescing': 1,
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
// consistent code
'@typescript-eslint/promise-function-async': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/return-await': [2, 'in-try-catch'],
'@typescript-eslint/return-await': ['error', 'in-try-catch'],
'@typescript-eslint/no-misused-promises': [
'error',
{
Expand All @@ -92,15 +66,15 @@ export = {
'new-cap': 0,

// code smells
'sonarjs/cognitive-complexity': 1,
'sonarjs/no-duplicate-string': 1,
'@typescript-eslint/no-non-null-assertion': 1,
'@typescript-eslint/no-use-before-define': 1,
'sonarjs/no-identical-functions': 1,
'@typescript-eslint/no-var-requires': 1,
'@typescript-eslint/require-array-sort-compare': 1,
'no-async-promise-executor': 1,
'sonarjs/no-unused-collection': 1,
'sonarjs/cognitive-complexity': 'warn',
'sonarjs/no-duplicate-string': 'warn',
'sonarjs/no-identical-functions': 'warn',
'sonarjs/no-unused-collection': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/require-array-sort-compare': 'warn',
'no-async-promise-executor': 'warn',
},
settings: {
node: {
Expand Down

0 comments on commit d8371a7

Please sign in to comment.