|
1 | 1 | # eslint-config-ts-lib
|
2 | 2 |
|
3 | 3 | [ts-lib-scripts](https://github.com/sinoui/ts-lib-scripts) 创建的 ts 库项目使用的 ESLint 配置
|
| 4 | + |
| 5 | +## 安装 |
| 6 | + |
| 7 | +```bash |
| 8 | +yarn add eslint-config-ts-lib typescript --dev |
| 9 | +``` |
| 10 | + |
| 11 | +## 使用 |
| 12 | + |
| 13 | +```json |
| 14 | +{ |
| 15 | + "eslintConfig": { |
| 16 | + "extends": "ts-lib" |
| 17 | + } |
| 18 | +} |
| 19 | +``` |
| 20 | + |
| 21 | +## 包含的规则 |
| 22 | + |
| 23 | +- [for-direction](./docs/rules/for-direction.md) |
| 24 | +- [getter-return](./docs/rules/getter-return.md) |
| 25 | +- [no-async-promise-executor](./docs/rules/no-async-promise-executor.md) |
| 26 | +- [no-compare-neg-zero](./docs/rules/no-compare-neg-zero.md) |
| 27 | +- [no-cond-assign](./docs/rules/no-cond-assign.md) |
| 28 | +- [no-constant-condition](./docs/rules/no-constant-condition.md) |
| 29 | +- [no-control-regex](./docs/rules/no-control-regex.md) |
| 30 | +- [no-debugger](./docs/rules/no-debugger.md) |
| 31 | +- [no-dupe-args](./docs/rules/no-dupe-args.md) |
| 32 | +- [no-dupe-else-if](./docs/rules/no-dupe-else-if.md) |
| 33 | +- [no-dupe-keys](./docs/rules/no-dupe-keys.md) |
| 34 | +- [no-duplicate-case](./docs/rules/no-duplicate-case.md) |
| 35 | +- [no-empty](./docs/rules/no-empty.md) |
| 36 | +- [no-empty-character-class](./docs/rules/no-empty-character-class.md) |
| 37 | +- [no-ex-assign](./docs/rules/no-ex-assign.md) |
| 38 | +- [no-extra-boolean-cast](./docs/rules/no-extra-boolean-cast.md) |
| 39 | +- [no-extra-semi](./docs/rules/no-extra-semi.md) |
| 40 | +- [no-func-assign](./docs/rules/no-func-assign.md) |
| 41 | +- [no-import-assign](./docs/rules/no-import-assign.md) |
| 42 | +- [no-inner-declarations](./docs/rules/no-inner-declarations.md) |
| 43 | +- [no-invalid-regexp](./docs/rules/no-invalid-regexp.md) |
| 44 | +- [no-irregular-whitespace](./docs/rules/no-irregular-whitespace.md) |
| 45 | +- [no-misleading-character-class](./docs/rules/no-misleading-character-class.md) |
| 46 | +- [no-obj-calls](./docs/rules/no-obj-calls.md) |
| 47 | +- [no-prototype-builtins](./docs/rules/no-prototype-builtins.md) |
| 48 | +- [no-regex-spaces](./docs/rules/no-regex-spaces.md) |
| 49 | +- [no-setter-return](./docs/rules/no-setter-return.md) |
| 50 | +- [no-sparse-arrays](./docs/rules/no-sparse-arrays.md) |
| 51 | +- [no-unexpected-multiline](./docs/rules/no-unexpected-multiline.md) |
| 52 | +- [no-unreachable](./docs/rules/no-unreachable.md) |
| 53 | +- [no-unsafe-finally](./docs/rules/no-unsafe-finally.md) |
| 54 | +- [no-unsafe-negation](./docs/rules/no-unsafe-negation.md) |
| 55 | +- [use-isnan](./docs/rules/use-isnan.md) |
| 56 | +- [valid-typeof](./docs/rules/valid-typeof.md) |
| 57 | +- [no-case-declarations](./docs/rules/no-case-declarations.md) |
| 58 | +- [no-empty-pattern](./docs/rules/no-empty-pattern.md) |
| 59 | +- [no-fallthrough](./docs/rules/no-fallthrough.md) |
| 60 | +- [no-global-assign](./docs/rules/no-global-assign.md) |
| 61 | +- [no-octal](./docs/rules/no-octal.md) |
| 62 | +- [no-redeclare](./docs/rules/no-redeclare.md) |
| 63 | +- [no-self-assign](./docs/rules/no-self-assign.md) |
| 64 | +- [no-unused-labels](./docs/rules/no-unused-labels.md) |
| 65 | +- [no-useless-catch](./docs/rules/no-useless-catch.md) |
| 66 | +- [no-useless-escape](./docs/rules/no-useless-escape.md) |
| 67 | +- [no-with](./docs/rules/no-with.md) |
| 68 | +- [no-delete-var](./docs/rules/no-delete-var.md) |
| 69 | +- [no-shadow-restricted-names](./docs/rules/no-shadow-restricted-names.md) |
| 70 | +- [no-undef](./docs/rules/no-undef.md) |
| 71 | +- [no-unused-vars](./docs/rules/no-unused-vars.md) |
| 72 | +- [no-mixed-spaces-and-tabs](./docs/rules/no-mixed-spaces-and-tabs.md) |
| 73 | +- [constructor-super](./docs/rules/constructor-super.md) |
| 74 | +- [no-class-assign](./docs/rules/no-class-assign.md) |
| 75 | +- [no-const-assign](./docs/rules/no-const-assign.md) |
| 76 | +- [no-dupe-class-members](./docs/rules/no-dupe-class-members.md) |
| 77 | +- [no-new-symbol](./docs/rules/no-new-symbol.md) |
| 78 | +- [no-this-before-super](./docs/rules/no-this-before-super.md) |
| 79 | +- [require-yield](./docs/rules/require-yield.md) |
| 80 | +- [react/no-danger-with-children](./docs/rules/react/no-danger-with-children.md) |
| 81 | +- [react/display-name](./docs/rules/react/display-name.md) |
| 82 | +- [react/no-children-prop](./docs/rules/react/no-children-prop.md) |
| 83 | +- [react/no-deprecated](./docs/rules/react/no-deprecated.md) |
| 84 | +- [react/no-direct-mutation-state](./docs/rules/react/no-direct-mutation-state.md) |
| 85 | +- [react/no-find-dom-node](./docs/rules/react/no-find-dom-node.md) |
| 86 | +- [react/no-render-return-value](./docs/rules/react/no-render-return-value.md) |
| 87 | +- [react/no-is-mounted](./docs/rules/react/no-is-mounted.md) |
| 88 | +- [react/no-string-refs](./docs/rules/react/no-string-refs.md) |
| 89 | +- [react/no-unescaped-entities](./docs/rules/react/no-unescaped-entities.md) |
| 90 | +- [react/no-unknown-property](./docs/rules/react/no-unknown-property.md) |
| 91 | +- [react/react-in-jsx-scope](./docs/rules/react/react-in-jsx-scope.md) |
| 92 | +- [react/prop-types](./docs/rules/react/prop-types.md) |
| 93 | +- [react/require-render-return](./docs/rules/react/require-render-return.md) |
| 94 | +- [react/jsx-key](./docs/rules/react/jsx-key.md) |
| 95 | +- [react/jsx-no-comment-textnodes](./docs/rules/react/jsx-no-comment-textnodes.md) |
| 96 | +- [react/jsx-no-duplicate-props](./docs/rules/react/jsx-no-duplicate-props.md) |
| 97 | +- [react/jsx-no-target-blank](./docs/rules/react/jsx-no-target-blank.md) |
| 98 | +- [react/jsx-no-undef](./docs/rules/react/jsx-no-undef.md) |
| 99 | +- [react/jsx-uses-react](./docs/rules/react/jsx-uses-react.md) |
| 100 | +- [react/jsx-uses-vars](./docs/rules/react/jsx-uses-vars.md) |
| 101 | +- [@typescript-eslint/ban-ts-comment](./docs/rules/@typescript-eslint/ban-ts-comment.md) |
| 102 | +- [@typescript-eslint/adjacent-overload-signatures](./docs/rules/@typescript-eslint/adjacent-overload-signatures.md) |
| 103 | +- [@typescript-eslint/explicit-module-boundary-types](./docs/rules/@typescript-eslint/explicit-module-boundary-types.md) |
| 104 | +- [@typescript-eslint/no-explicit-any](./docs/rules/@typescript-eslint/no-explicit-any.md) |
| 105 | +- [@typescript-eslint/ban-types](./docs/rules/@typescript-eslint/ban-types.md) |
| 106 | +- [@typescript-eslint/no-extra-non-null-assertion](./docs/rules/@typescript-eslint/no-extra-non-null-assertion.md) |
| 107 | +- [@typescript-eslint/no-inferrable-types](./docs/rules/@typescript-eslint/no-inferrable-types.md) |
| 108 | +- [@typescript-eslint/no-empty-interface](./docs/rules/@typescript-eslint/no-empty-interface.md) |
| 109 | +- [@typescript-eslint/no-misused-new](./docs/rules/@typescript-eslint/no-misused-new.md) |
| 110 | +- [@typescript-eslint/no-namespace](./docs/rules/@typescript-eslint/no-namespace.md) |
| 111 | +- [@typescript-eslint/no-var-requires](./docs/rules/@typescript-eslint/no-var-requires.md) |
| 112 | +- [@typescript-eslint/no-non-null-asserted-optional-chain](./docs/rules/@typescript-eslint/no-non-null-asserted-optional-chain.md) |
| 113 | +- [@typescript-eslint/no-non-null-assertion](./docs/rules/@typescript-eslint/no-non-null-assertion.md) |
| 114 | +- [@typescript-eslint/no-this-alias](./docs/rules/@typescript-eslint/no-this-alias.md) |
| 115 | +- [@typescript-eslint/prefer-namespace-keyword](./docs/rules/@typescript-eslint/prefer-namespace-keyword.md) |
| 116 | +- [@typescript-eslint/prefer-as-const](./docs/rules/@typescript-eslint/prefer-as-const.md) |
| 117 | +- [@typescript-eslint/triple-slash-reference](./docs/rules/@typescript-eslint/triple-slash-reference.md) |
| 118 | +- [@typescript-eslint/no-empty-function](./docs/rules/@typescript-eslint/no-empty-function.md) |
| 119 | +- [@typescript-eslint/no-array-constructor](./docs/rules/@typescript-eslint/no-array-constructor.md) |
| 120 | +- [@typescript-eslint/no-extra-semi](./docs/rules/@typescript-eslint/no-extra-semi.md) |
| 121 | +- [@typescript-eslint/no-unused-vars](./docs/rules/@typescript-eslint/no-unused-vars.md) |
| 122 | +- [react-hooks/exhaustive-deps](./docs/rules/react-hooks/exhaustive-deps.md) |
| 123 | +- [react-hooks/rules-of-hooks](./docs/rules/react-hooks/rules-of-hooks.md) |
0 commit comments