Skip to content

Commit

Permalink
updating .estlintrc
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldosc committed Jan 18, 2023
1 parent fef3e0d commit 799cc42
Showing 1 changed file with 19 additions and 76 deletions.
95 changes: 19 additions & 76 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@ module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2022, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
ecmaVersion: 2022,
sourceType: "module",
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"]
},

rules: {
"prettier/prettier": "error",

"@typescript-eslint/no-floating-promises": "error",

// Possible Errors
"no-async-promise-executor": "error",
"no-await-in-loop": "error",
"no-misleading-character-class": "error",
"no-template-curly-in-string": "error",

// TypeScript-ESLint (Prettier)
"@typescript-eslint/member-delimiter-style": "off",

Expand All @@ -35,73 +27,24 @@ module.exports = {
],
"@typescript-eslint/no-use-before-define": "off",

ignorePatterns: ["node_modules", "dist", ".eslintrc.js"],

"semi": "off",
"@typescript-eslint/semi": "error",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",

"prettier",
"plugin:prettier/recommended" /* recommended listing it at last */
],

/* "no-restricted-syntax": [
"error",
// ban all enums
{
"selector": "TSEnumDeclaration",
"message": "My reason for not using any enums at all"
},
// ban just const enums
{
"selector": "TSEnumDeclaration[const=true]",
"message": "My reason for not using const enums"
},
// ban just non-const enums
{
"selector": "TSEnumDeclaration:not([const=true])",
"message": "My reason for not using non-const enums"
}
] */
},

ignorePatterns: ["node_modules", "dist", ".eslintrc.js"],

plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",

"prettier",
"plugin:prettier/recommended" /* recommends being the last in list */
],

extends: ["prettier"],
plugins: ["prettier"],
rules: {
"prettier/prettier": "error",
"arrow-body-style": "off",
"prefer-arrow-callback": "off"
},
extends: ["prettier"],
plugins: ["prettier"],
rules: {
// "prettier/prettier": "error",
"arrow-body-style": "off",
"prefer-arrow-callback": "off"
},
}
}

/*
// Possible Errors
"no-async-promise-executor": "error",
"no-await-in-loop": "error",
"no-misleading-character-class": "error",
"no-template-curly-in-string": "error",
// TypeScript-ESLint (Prettier)
"@typescript-eslint/member-delimiter-style": "off",
// TypeScript-ESLint
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": true
}
],
"@typescript-eslint/no-use-before-define": "off"
*/

0 comments on commit 799cc42

Please sign in to comment.