UNPKG

eslint-config-ts-lib

Version:

ts-lib-scripts创建的ts库项目使用的ESLint配置

32 lines (30 loc) 1.03 kB
const functionRules = { // disallow reassignment of function parameters // disallow parameter object manipulation except for specific exclusions // rule: https://eslint.org/docs/rules/no-param-reassign.html 'no-param-reassign': [ 'error', { props: true, ignorePropertyModificationsFor: [ 'acc', // for reduce accumulators 'accumulator', // for reduce accumulators 'e', // for e.returnvalue 'ctx', // for Koa routing 'req', // for Express requests 'request', // for Express requests 'res', // for Express responses 'response', // for Express responses '$scope', // for Angular 1 scopes 'staticContext', // for ReactRouter context 'draft', // for immer 'draftState', // for immer 'ref', // for React ref.current ], }, ], '@typescript-eslint/explicit-function-return-type': 0, 'no-empty-function': 'off', 'arrow-body-style': ['error', 'as-needed'], }; module.exports = functionRules;