Created
February 10, 2022 16:06
-
-
Save prettydiff/d2fff78abd374461235c1e0d8a312deb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaVersion": 11, | |
"sourceType": "module" | |
}, | |
"plugins": ["@typescript-eslint"], | |
"root": true, | |
"rules": { | |
"curly": "error", | |
"eqeqeq": "error", | |
"max-params": [ | |
"error", 3 | |
], | |
"one-var": [ | |
"error", "always" | |
], | |
"operator-assignment": [ | |
"error", "never" | |
], | |
"no-console": "error", | |
"no-continue": "error", | |
"no-control-regex": 0, | |
"no-else-return": "error", | |
"no-empty": "error", | |
"no-extra-bind": "error", | |
"no-extra-semi": "error", | |
"no-new": "error", | |
"no-plusplus": "error", | |
"no-restricted-syntax": [ | |
"error", | |
{ | |
"selector": "ExpressionStatement[expression.callee.property.name='apply']", | |
"message": "Function method 'apply' is not allowed." | |
}, | |
{ | |
"selector": "VariableDeclarator[init.callee.property.name='apply']", | |
"message": "Function method 'apply' is not allowed." | |
}, | |
{ | |
"selector": "ExpressionStatement[expression.callee.property.name='bind']", | |
"message": "Function method 'bind' is not allowed." | |
}, { | |
"selector": "VariableDeclarator[init.callee.property.name='bind']", | |
"message": "Function method 'bind' is not allowed." | |
}, { | |
"selector": "ExpressionStatement[expression.callee.property.name='call']", | |
"message": "Function method 'call' is not allowed." | |
}, { | |
"selector": "VariableDeclarator[init.callee.property.name='call']", | |
"message": "Function method 'call' is not allowed." | |
}, { | |
"selector": "ThisExpression", | |
"message": "Use explicit reference names instead of 'this'." | |
}, { | |
"selector": "ThisStatement", | |
"message": "Use explicit reference names instead of 'this'." | |
}, { | |
"selector": "ClassDeclaration", | |
"message": "No classes. Inheritance imposes unseen complexity upon code extension." | |
}, { | |
"selector": "ClassExpression", | |
"message": "No classes. Inheritance imposes unseen complexity upon code extension." | |
}, { | |
"selector": "TryStatement", | |
"message": "Do not use try/catch blocks as these are performance bottlenecks." | |
}, { | |
"selector": "ExpressionStatement[expression.callee.property.name='Promise']", | |
"message": "Do not use Promise. Instead use callbacks and provide documentation to clearly describe the flow control." | |
}, { | |
"selector": "Identifier[name='Promise']", | |
"message": "Do not use Promise. Instead use callbacks then provide comments and documentation to clearly describe the flow control." | |
}, { | |
"selector": "ArrowFunctionExpression[type='ArrowFunctionExpression']", | |
"message": "Do not use arrow functions. Instead use named functions conforming to the naming convention." | |
}, { | |
"selector": "FunctionDeclaration[id.name='asyncCall']", | |
"message": "Do not use async/await. Instead use callbacks then provide comments and documentation to clearly describe the flow control." | |
}, { | |
"selector": "ExpressionStatement[expression.callee.property.name='querySelector']", | |
"message": "Do not use query selectors. Use other DOM methods that do not require string parsing." | |
}, { | |
"selector": "ExpressionStatement[expression.callee.property.name='querySelectorAll']", | |
"message": "Do not use query selectors. Use other DOM methods that do not require string parsing." | |
} | |
], | |
"no-undef": 0, | |
"no-unused-vars": 0, | |
"no-var": "error", | |
"semi": 0, | |
"space-before-function-paren": 0, | |
"strict": [ | |
"error", "function" | |
], | |
"@typescript-eslint/explicit-function-return-type": "error", | |
"@typescript-eslint/member-delimiter-style": [ | |
"error", { | |
"multiline": { | |
"delimiter": "semi", | |
"requireLast": true | |
}, | |
"singleline": { | |
"delimiter": "semi", | |
"requireLast": true | |
} | |
} | |
], | |
"@typescript-eslint/method-signature-style": [ | |
"error", "property" | |
], | |
"@typescript-eslint/no-unused-vars": "error", | |
"@typescript-eslint/no-empty-interface": "error", | |
"@typescript-eslint/no-explicit-any": "error", | |
"@typescript-eslint/no-require-imports": "error", | |
"@typescript-eslint/quotes": [ | |
"error", "double" | |
], | |
"@typescript-eslint/semi": "error", | |
"@typescript-eslint/sort-type-union-intersection-members": "error", | |
"@typescript-eslint/space-before-function-paren": [ | |
"error", "never" | |
], | |
"@typescript-eslint/typedef": "error", | |
"wrap-iife": [ | |
"error", "outside" | |
], | |
"wrap-regex": "error" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment