Skip to content

Commit

Permalink
Updated stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
RillingDev committed Oct 15, 2021
1 parent 8d8a1d1 commit 7e176ce
Show file tree
Hide file tree
Showing 4 changed files with 537 additions and 2,635 deletions.
93 changes: 26 additions & 67 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,105 +5,46 @@ module.exports = {
tsconfigRootDir: __dirname,
project: ["./src/tsconfig.json", "./spec/tsconfig.json"],
},
plugins: ["@typescript-eslint", "prettier", "import"],
plugins: ["@typescript-eslint", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
],
rules: {
/*
* ESLint
*/
// Error prevention
"no-undef-init": "error",
"no-loss-of-precision": "error",
"no-promise-executor-return": "error",
"no-template-curly-in-string": "warn",
"no-implicit-coercion": "warn",
radix: "warn",
"array-callback-return": "warn",
"consistent-return": "warn",
"no-constructor-return": "warn",
"no-implicit-coercion": "warn",
"no-promise-executor-return": "error",
"no-template-curly-in-string": "warn",
"no-undef-init": "error",
"no-unreachable-loop": "warn",
"require-atomic-updates": "warn",
radix: "warn",

/*
* Prettier
*/
"prettier/prettier": "warn",

/*
* Imports
*/
// Error prevention
"import/no-unresolved": "off", // Covered by TS
"import/named": "off", // Covered by TS
"import/namespace": "off", // Covered by TS
"import/no-self-import": "error",
"import/no-absolute-path": "error",
"import/no-mutable-exports": "warn",
"import/no-webpack-loader-syntax": "warn",

// Styleguide
"import/no-default-export": "warn",
"import/no-useless-path-segments": "warn",

/*
* Typescript
*/
// Error prevention
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/prefer-enum-initializers": "warn",

// Styleguide
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/require-array-sort-compare": "warn",
"@typescript-eslint/prefer-regexp-exec": "warn",
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
"@typescript-eslint/no-extra-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/method-signature-style": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/consistent-type-assertions": [
"warn",
{
assertionStyle: "as",
},
],
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
allowExpressions: true,
},
],
"@typescript-eslint/ban-types": [
"warn",
{
types: {
object: false,
},
},
],
"@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/method-signature-style": "warn",
"@typescript-eslint/naming-convention": [
"warn",
{
Expand Down Expand Up @@ -137,5 +78,23 @@ module.exports = {
{ selector: "enum", format: ["StrictPascalCase"] },
{ selector: "enumMember", format: ["UPPER_CASE"] },
],
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-non-null-assertion": "off", // Essential when working with maps
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/prefer-enum-initializers": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/require-array-sort-compare": "warn",
"@typescript-eslint/strict-boolean-expressions": "warn",
},
};
Loading

0 comments on commit 7e176ce

Please sign in to comment.