UNPKG

jinbi-utils

Version:

这是一个实用工具库,包含了多个常用的功能模块。以下是各个模块的详细说明:

54 lines 2.22 kB
module.exports = { "env": { "browser": true, "commonjs": true, "es6": true, "node": true }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "parserOptions": { "ecmaVersion": 2015, "sourceType": "module", "project": "./tsconfig.json" }, "rules": { 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'prefer-promise-reject-errors': 'off', // 要求使用 Error 对象作为 Promise 拒绝的原因 'linebreak-style': 'off', // 回车换行风格 'no-trailing-spaces': 1, // 允许在空行、在注释块中使用空白符 'import/prefer-default-export': 'off', // 'object-curly-newline': 'off', // 不强制花括号内换行 'import/named': 'off', // 停用 import/named 校验 'no-underscore-dangle': 'off', // 禁止标识符中有悬空下划线 'import/order': 'off', 'prefer-object-spread': 1, // 禁止使用以对象字面量作为第一个参数的 Object.assign,优先使用对象扩展。 'arrow-parens': [2, "as-needed", { "requireForBlockBody": true }], // 要求箭头函数的参数使用圆括号 "comma-dangle": ["error", "always-multiline"], // 要求或禁止使用拖尾逗号 "semi": 2, // 要求或禁止使用分号代替 ASI "keyword-spacing": 2, // 强制关键字周围空格的一致性 "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-inferrable-types": "off", "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/member-delimiter-style": ["error", { "multiline": { "delimiter": "semi", "requireLast": true }, "singleline": { "delimiter": "semi", "requireLast": true } }] } };