{"id":18340362,"url":"https://github.com/dimensiondev/eslint-plugin","last_synced_at":"2025-04-06T05:32:32.412Z","repository":{"id":44895741,"uuid":"440841109","full_name":"DimensionDev/eslint-plugin","owner":"DimensionDev","description":"eslint plugin for dimensiondev","archived":false,"fork":false,"pushed_at":"2024-04-14T16:32:48.000Z","size":902,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-18T16:58:06.275Z","etag":null,"topics":["eslint","eslint-plugin"],"latest_commit_sha":null,"homepage":"https://dimensiondev.github.io/eslint-plugin","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DimensionDev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-12-22T11:51:39.000Z","updated_at":"2024-09-29T15:25:03.000Z","dependencies_parsed_at":"2024-02-11T05:36:28.040Z","dependency_job_id":null,"html_url":"https://github.com/DimensionDev/eslint-plugin","commit_stats":{"total_commits":117,"total_committers":3,"mean_commits":39.0,"dds":"0.19658119658119655","last_synced_commit":"472677a4b8c68be88cf77357a8c862b3d4972038"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2Feslint-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2Feslint-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2Feslint-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2Feslint-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DimensionDev","download_url":"https://codeload.github.com/DimensionDev/eslint-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247440730,"owners_count":20939223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-plugin"],"created_at":"2024-11-05T20:22:16.910Z","updated_at":"2025-04-06T05:32:31.562Z","avatar_url":"https://github.com/DimensionDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @masknet/eslint-plugin\n\n## Installation\n\nYou'll first need to install [eslint](https://eslint.org):\n\n```bash\nnpm install --save-dev eslint\n```\n\nNext, install `@masknet/eslint-plugin`:\n\n```bash\nnpm install --save-dev @masknet/eslint-plugin\n```\n\n## Usage\n\nAdd `@masknet` to the plugins section of your `.eslintrc` configuration file.\n\n\u003c!-- begin example configure --\u003e\n\n```json\n{\n  \"$schema\": \"https://dimensiondev.github.io/eslint-plugin/src/schema.json\",\n  \"plugins\": [\"@masknet\"],\n  \"rules\": {\n    \"@masknet/array/no-unneeded-flat-map\": \"warn\",\n    \"@masknet/array/prefer-from\": \"error\",\n    \"@masknet/browser/no-persistent-storage\": \"error\",\n    \"@masknet/browser/no-set-html\": \"error\",\n    \"@masknet/browser/prefer-location-assign\": \"warn\",\n    \"@masknet/jsx/no-class-component\": \"warn\",\n    \"@masknet/jsx/no-logical\": \"error\",\n    \"@masknet/jsx/no-set-html\": \"error\",\n    \"@masknet/jsx/no-template-literal\": \"warn\",\n    \"@masknet/jsx/no-unneeded-nested\": \"warn\",\n    \"@masknet/jsx/prefer-test-id\": \"error\",\n    \"@masknet/string/no-data-url\": \"error\",\n    \"@masknet/string/no-interpolation\": \"warn\",\n    \"@masknet/string/no-locale-case\": \"error\",\n    \"@masknet/string/no-simple-template-literal\": \"warn\",\n    \"@masknet/string/no-unneeded-to-string\": \"warn\",\n    \"@masknet/type/no-const-enum\": \"error\",\n    \"@masknet/type/no-empty-literal\": \"error\",\n    \"@masknet/type/no-force-cast-via-top-type\": \"error\",\n    \"unicorn/no-instanceof-array\": \"off\",\n    \"@masknet/type/no-instanceof-wrapper\": \"error\",\n    \"@masknet/type/no-number-constructor\": \"error\",\n    \"@masknet/type/no-wrapper-type-reference\": \"error\",\n    \"@masknet/type/prefer-return-type-annotation\": \"warn\",\n    \"@masknet/unicode/no-bidi\": \"error\",\n    \"@masknet/unicode/no-invisible\": \"error\",\n    \"@masknet/unicode/specific-set\": \"error\",\n    \"@masknet/no-builtin-base64\": \"error\",\n    \"@masknet/no-default-error\": \"error\",\n    \"@masknet/no-for-in\": \"warn\",\n    \"@masknet/no-redundant-variable\": \"warn\",\n    \"@masknet/no-single-return\": \"warn\",\n    \"@masknet/no-then\": \"warn\",\n    \"@masknet/no-timer\": \"error\",\n    \"@masknet/no-top-level\": \"error\",\n    \"@masknet/no-unsafe-date\": \"error\",\n    \"@masknet/prefer-default-export\": \"warn\",\n    \"@masknet/prefer-defer-import\": \"error\",\n    \"@masknet/prefer-early-return\": \"warn\",\n    \"@masknet/prefer-fetch\": \"warn\",\n    \"@masknet/prefer-timer-id\": \"error\"\n  }\n}\n```\n\n\u003c!-- end example configure --\u003e\n\n## Supported Rules\n\n**Key**:\n:white_check_mark: = recommended,\n:wrench: = fixable,\n:bulb: = suggestions,\n:gear: = configurable,\n:thought_balloon: = requires type information\n\n\u003c!-- begin rule list --\u003e\n\n- [array/no-unneeded-flat-map][array$no_unneeded_flat_map] :white_check_mark: :wrench:\\\n  Disallow `Array#flatMap((x) =\u003e x)` when simpler alternatives exist\n- [array/prefer-from][array$prefer_from] :white_check_mark: :wrench:\\\n  Prefer `Array.from(...)` over `new Array(...)`\n- [browser/no-persistent-storage][browser$no_persistent_storage] :white_check_mark:\\\n  Disallow use browser persistent storage\n- [browser/no-set-html][browser$no_set_html] :white_check_mark:\\\n  Disallow use `Element#{inner,outer}HTML`\n- [browser/prefer-location-assign][browser$prefer_location_assign] :white_check_mark: :wrench:\\\n  Prefer `location.assign(...)` over `location.*`\n- [jsx/no-class-component][jsx$no_class_component] :white_check_mark:\\\n  Disallow React Class Component\n- [jsx/no-logical][jsx$no_logical] :gear:\\\n  Limit the complexity of JSX logic expression\n- [jsx/no-set-html][jsx$no_set_html] :white_check_mark:\\\n  Disallow use `dangerouslySetInnerHTML` jsx attribute\n- [jsx/no-template-literal][jsx$no_template_literal] :white_check_mark: :wrench:\\\n  Disallow use template-literal in JSX\n- [jsx/no-unneeded-nested][jsx$no_unneeded_nested] :white_check_mark: :wrench:\\\n  Reduce unneeded JSXFragment nested\n- [jsx/prefer-test-id][jsx$prefer_test_id] :gear:\\\n  Enforces `data-test-id` attribute is present on interactive DOM elements to help with UI testing\n- [string/no-data-url][string$no_data_url] :white_check_mark:\\\n  Disallow use Data URL\n- [string/no-interpolation][string$no_interpolation] :white_check_mark:\\\n  Disallow simple string interpolation\n- [string/no-locale-case][string$no_locale_case] :white_check_mark: :wrench:\\\n  Disallow use `String#toLocale{Upper,Lower}Case()`\n- [string/no-simple-template-literal][string$no_simple_template_literal] :white_check_mark: :wrench:\\\n  Disallow simple template-literal\n- [string/no-unneeded-to-string][string$no_unneeded_to_string] :white_check_mark: :wrench: :thought_balloon:\\\n  Disallow `String#toString()` when simpler alternatives exist\n- [type/no-const-enum][type$no_const_enum] :wrench:\\\n  Disallow use constants enumerate\n- [type/no-empty-literal][type$no_empty_literal] :gear:\\\n  Disallow empty {array,object} literal\n- [type/no-force-cast-via-top-type][type$no_force_cast_via_top_type] :white_check_mark:\\\n  Disallowing cast a type `T` to unrelated or incompatible type `Q` via `T as any as Q`\n- [type/no-instanceof-wrapper][type$no_instanceof_wrapper] :white_check_mark: :wrench:\\\n  Disallow `instanceof` for wrapper objects\n- [type/no-number-constructor][type$no_number_constructor] :white_check_mark:\\\n  Disallow use `Number` constructor\n- [type/no-wrapper-type-reference][type$no_wrapper_type_reference] :white_check_mark: :wrench:\\\n  Disallow wrapper type for type reference\n- [type/prefer-return-type-annotation][type$prefer_return_type_annotation] :white_check_mark: :wrench:\\\n  Enforce Move return type annotation to function return type\n- [unicode/no-bidi][unicode$no_bidi] :white_check_mark: :wrench:\\\n  Detect and stop Trojan Source attacks\n- [unicode/no-invisible][unicode$no_invisible] :white_check_mark: :wrench:\\\n  Disallow invisible characters\n- [unicode/specific-set][unicode$specific_set] :wrench: :gear:\\\n  Limit the range of literal characters\n- [no-builtin-base64][no_builtin_base64] :wrench:\\\n  Disallow use built-in base64 function\n- [no-default-error][no_default_error] :white_check_mark: :thought_balloon:\\\n  Restrict the usage of default (unextended) error\n- [no-for-in][no_for_in] :white_check_mark:\\\n  Disallow use for-in\n- [no-redundant-variable][no_redundant_variable] :white_check_mark: :wrench:\\\n  Disallow redundant variable\n- [no-single-return][no_single_return] :white_check_mark:\\\n  Disallow single-return\n- [no-then][no_then] :white_check_mark:\\\n  Disallow `Promise#then(...)`\n- [no-timer][no_timer] \\\n  Disallow use timer function\n- [no-top-level][no_top_level] :gear:\\\n  Disallow side-effect at module top-level\n- [no-unsafe-date][no_unsafe_date] :thought_balloon:\\\n  Disallow use unsafe Date methods\n- [prefer-default-export][prefer_default_export] :white_check_mark: :gear:\\\n  Enforce default export location at top or bottom\n- [prefer-defer-import][prefer_defer_import] :wrench: :gear:\\\n  Prefer defer import a module. See \u003chttps://github.com/tc39/proposal-defer-import-eval\u003e and \u003chttps://github.com/webpack/webpack/pull/16567/\u003e.\n- [prefer-early-return][prefer_early_return] :white_check_mark: :wrench: :gear:\\\n  Prefer early returns over full-body conditional wrapping in function declarations\n- [prefer-fetch][prefer_fetch] :white_check_mark:\\\n  Enforce fetch\n- [prefer-timer-id][prefer_timer_id] :white_check_mark: :bulb:\\\n  Enforce best practice with timer function\n\n[array$no_unneeded_flat_map]: https://dimensiondev.github.io/eslint-plugin/src/rules/array/no-unneeded-flat-map\n[array$prefer_from]: https://dimensiondev.github.io/eslint-plugin/src/rules/array/prefer-from\n[browser$no_persistent_storage]: https://dimensiondev.github.io/eslint-plugin/src/rules/browser/no-persistent-storage\n[browser$no_set_html]: https://dimensiondev.github.io/eslint-plugin/src/rules/browser/no-set-html\n[browser$prefer_location_assign]: https://dimensiondev.github.io/eslint-plugin/src/rules/browser/prefer-location-assign\n[jsx$no_class_component]: https://dimensiondev.github.io/eslint-plugin/src/rules/jsx/no-class-component\n[jsx$no_logical]: https://dimensiondev.github.io/eslint-plugin/src/rules/jsx/no-logical\n[jsx$no_set_html]: https://dimensiondev.github.io/eslint-plugin/src/rules/jsx/no-set-html\n[jsx$no_template_literal]: https://dimensiondev.github.io/eslint-plugin/src/rules/jsx/no-template-literal\n[jsx$no_unneeded_nested]: https://dimensiondev.github.io/eslint-plugin/src/rules/jsx/no-unneeded-nested\n[jsx$prefer_test_id]: https://dimensiondev.github.io/eslint-plugin/src/rules/jsx/prefer-test-id\n[string$no_data_url]: https://dimensiondev.github.io/eslint-plugin/src/rules/string/no-data-url\n[string$no_interpolation]: https://dimensiondev.github.io/eslint-plugin/src/rules/string/no-interpolation\n[string$no_locale_case]: https://dimensiondev.github.io/eslint-plugin/src/rules/string/no-locale-case\n[string$no_simple_template_literal]: https://dimensiondev.github.io/eslint-plugin/src/rules/string/no-simple-template-literal\n[string$no_unneeded_to_string]: https://dimensiondev.github.io/eslint-plugin/src/rules/string/no-unneeded-to-string\n[type$no_const_enum]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/no-const-enum\n[type$no_empty_literal]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/no-empty-literal\n[type$no_force_cast_via_top_type]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/no-force-cast-via-top-type\n[type$no_instanceof_wrapper]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/no-instanceof-wrapper\n[type$no_number_constructor]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/no-number-constructor\n[type$no_wrapper_type_reference]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/no-wrapper-type-reference\n[type$prefer_return_type_annotation]: https://dimensiondev.github.io/eslint-plugin/src/rules/type/prefer-return-type-annotation\n[unicode$no_bidi]: https://dimensiondev.github.io/eslint-plugin/src/rules/unicode/no-bidi\n[unicode$no_invisible]: https://dimensiondev.github.io/eslint-plugin/src/rules/unicode/no-invisible\n[unicode$specific_set]: https://dimensiondev.github.io/eslint-plugin/src/rules/unicode/specific-set\n[no_builtin_base64]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-builtin-base64\n[no_default_error]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-default-error\n[no_for_in]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-for-in\n[no_redundant_variable]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-redundant-variable\n[no_single_return]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-single-return\n[no_then]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-then\n[no_timer]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-timer\n[no_top_level]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-top-level\n[no_unsafe_date]: https://dimensiondev.github.io/eslint-plugin/src/rules/no-unsafe-date\n[prefer_default_export]: https://dimensiondev.github.io/eslint-plugin/src/rules/prefer-default-export\n[prefer_defer_import]: https://dimensiondev.github.io/eslint-plugin/src/rules/prefer-defer-import\n[prefer_early_return]: https://dimensiondev.github.io/eslint-plugin/src/rules/prefer-early-return\n[prefer_fetch]: https://dimensiondev.github.io/eslint-plugin/src/rules/prefer-fetch\n[prefer_timer_id]: https://dimensiondev.github.io/eslint-plugin/src/rules/prefer-timer-id\n\n\u003c!-- end rule list --\u003e\n\n## LICENSE\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensiondev%2Feslint-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimensiondev%2Feslint-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensiondev%2Feslint-plugin/lists"}