manifold/functions/.eslintrc.js
Marshall Polaris 5217270073
Serious business API validation & big cleanup of createContract, placeBet (#302)
* Add the great Zod as a dependency to help us

* Tweak eslint

* Rewrite a ton of stuff in createContract and placeBet

* Clean up error reporting in API

* Make sure the UI is enforcing validated limits on lengths

* Remove unnecessary Math.abs

* Better type on `BetInfo`

* Kill `manaLimitPerUser`

* Clean up hacky parameters on bet info functions

* Validate `closeTime` as a valid timestamp in the future
2022-05-26 14:37:51 -07:00

26 lines
561 B
JavaScript

module.exports = {
plugins: ['lodash'],
extends: ['eslint:recommended'],
ignorePatterns: ['lib'],
env: {
node: true,
},
overrides: [
{
files: ['**/*.ts'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
},
],
rules: {
'no-extra-semi': 'off',
'no-unused-vars': 'off',
'no-constant-condition': ['error', { checkLoops: false }],
'lodash/import-scope': [2, 'member'],
},
}