UNPKG

eslint-config-tencent

Version:

ESLint Config for Tencent

101 lines (97 loc) 2.84 kB
/** * ESLint Config for Tencent * https://git.code.oa.com/standards/javascript * * 贡献者: * xcatliu <xcaliu@tencent.com> * ziofatli <ziofatli@tencent.com * * 依赖版本: * eslint ^8.57.0 * @babel/eslint-parser ^7.14.5 * @typescript-eslint/parser undefined * @typescript-eslint/eslint-plugin undefined * eslint-plugin-import ^2.31.0 * * 此文件是由脚本 scripts/build.ts 自动生成 * * @reason 为什么要开启(关闭)此规则 */ module.exports = { plugins: ['prettier', 'chalk'],rules:{ 'chalk/chalk': ["warn", { icon: '💡', hexColor: '#f00', message: 'Prettier 规则仍在开发中,不建议在公司项目中使用,可能会导致 CodeCC 检查出错。', }], 'wrap-iife': 'off', 'template-curly-spacing': 'off', 'space-infix-ops': 'off', 'space-in-parens': 'off', 'space-before-blocks': 'off', 'quote-props': 'off', 'padded-blocks': 'off', 'operator-linebreak': 'off', 'object-curly-spacing': 'off', 'nonblock-statement-body-position': 'off', 'no-whitespace-before-property': 'off', 'no-trailing-spaces': 'off', 'no-multiple-empty-lines': 'off', 'no-mixed-operators': 'off', 'no-confusing-arrow': 'off', 'newline-per-chained-call': 'off', 'max-len': 'off', 'linebreak-style': 'off', 'key-spacing': 'off', 'implicit-arrow-linebreak': 'off', 'generator-star-spacing': 'off', 'function-paren-newline': 'off', 'eol-last': 'off', 'computed-property-spacing': 'off', 'comma-style': 'off', 'comma-dangle': 'off', 'block-spacing': 'off', 'arrow-spacing': 'off', 'arrow-parens': 'off', 'array-bracket-spacing': 'off', '@typescript-eslint/type-annotation-spacing': 'off', '@typescript-eslint/space-before-function-paren': 'off', '@typescript-eslint/semi': 'off', '@typescript-eslint/quotes': 'off', '@typescript-eslint/keyword-spacing': 'off', '@typescript-eslint/indent': 'off', '@typescript-eslint/func-call-spacing': 'off', '@typescript-eslint/comma-spacing': 'off', '@typescript-eslint/brace-style': 'off' , /** * prettier 格式错误 */ 'prettier/prettier': [ "warn", { "printWidth": 120, "tabWidth": 2, "useTabs": false, "semi": true, "singleQuote": true, "quoteProps": "as-needed", "jsxSingleQuote": false, "trailingComma": "all", "bracketSpacing": true, "jsxBracketSameLine": false, "arrowParens": "always", "rangeStart": 0, "rangeEnd": null, "requirePragma": false, "insertPragma": false, "proseWrap": "preserve", "htmlWhitespaceSensitivity": "css", "vueIndentScriptAndStyle": false, "endOfLine": "lf", "embeddedLanguageFormatting": "auto" }, { "usePrettierrc": false } ],},};