Skip to content

Commit

Permalink
feat: add missing ESLint rules (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
lytovka committed Apr 18, 2023
1 parent 70f6664 commit f4ba148
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
50 changes: 49 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,72 @@ module.exports = {
],
"no-unused-private-class-members": "error",
"no-array-constructor": "error",
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-console": "off", // becomes quite problematic in Node environment
"no-const-assign": "error",
"no-constant-condition": "off", // meh
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-class-members": "error",
"no-empty": "off", // empty blocks are sometimes used as placeholders
"no-div-regex": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-ex-assign": "error",
"no-extra-semi": "error",
"no-fallthrough": ["error", { allowEmptyCase: true }],
"no-func-assign": "error",
"no-global-assign": "error",
"no-implied-eval": "error",
"no-import-assign": "error",
"no-inner-declarations": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-misleading-character-class": "error",
"no-new-symbol": "error",
"no-nonoctal-decimal-escape": "error",
"no-label-var": "error",
"no-loop-func": "error",
"no-negated-condition": "off", // legibility of a negated condition should be decided on a per-case basis
"no-new-native-nonconstructor": "error",
"no-obj-calls": "error",
"no-octal": "error",
"no-prototype-builtins": "error",
"no-param-reassign": "off", // let's see if this ever becomes a problem...
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-restricted-exports": "off",
"no-restricted-syntax": "off", // nothing immediate comes to mind
"no-self-assign": "error",
"no-self-compare": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-ternary": "off",
"no-this-before-super": "error",
"no-undef": "error",
"no-underscore-dangle": "off", // can emphasize that an identifier is special
"no-unused-expressions": "off", // an expression might be used later
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-expressions": "off", // an expression might be used later
"no-unused-labels": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-var": "error",
"no-with": "off",
"one-var": ["error", { initialized: "never" }],
"prefer-const": "error",
"prefer-numeric-literals": "error",
Expand Down Expand Up @@ -178,6 +223,8 @@ module.exports = {
"no-new-object": "error",
"no-void": "off",
radix: "error",
"use-isnan": "error",
"require-yield": "error",
"no-octal-escape": "error",
"no-warning-comments": "off", // ["error", { "terms": ["todo", "fixme"], "location": "start" }]
"require-unicode-regexp": "off",
Expand All @@ -191,6 +238,7 @@ module.exports = {
"prefer-object-spread": "error",
"no-unreachable-loop": "error",
"prefer-rest-params": "error",
"valid-typeof": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"engineStrict": true,
"scripts": {
"lint": "eslint --config index.js .",
"find-new-rules:main": "eslint-find-rules --unused ./index.js"
"find-new-rules": "eslint-find-rules --unused ./index.js"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.47.0",
Expand Down

0 comments on commit f4ba148

Please sign in to comment.