{"id":13660615,"url":"https://github.com/43081j/eslint-plugin-wc","last_synced_at":"2025-04-15T03:52:03.796Z","repository":{"id":34239304,"uuid":"170198096","full_name":"43081j/eslint-plugin-wc","owner":"43081j","description":"ESLint rules for Web Components","archived":false,"fork":false,"pushed_at":"2025-03-18T22:03:14.000Z","size":736,"stargazers_count":103,"open_issues_count":14,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T03:51:59.591Z","etag":null,"topics":["eslint","eslintplugin","hacktoberfest","wc","webcomponents"],"latest_commit_sha":null,"homepage":"","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/43081j.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,"publiccode":null,"codemeta":null}},"created_at":"2019-02-11T20:36:45.000Z","updated_at":"2025-04-08T14:27:29.000Z","dependencies_parsed_at":"2024-01-15T20:50:33.271Z","dependency_job_id":"a565b349-01b0-460d-b514-68d3c918bcc7","html_url":"https://github.com/43081j/eslint-plugin-wc","commit_stats":{"total_commits":124,"total_committers":13,"mean_commits":9.538461538461538,"dds":0.3306451612903226,"last_synced_commit":"25f62cc86b2c79ece1fe980268405ca8a28954e7"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Feslint-plugin-wc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Feslint-plugin-wc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Feslint-plugin-wc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/43081j%2Feslint-plugin-wc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/43081j","download_url":"https://codeload.github.com/43081j/eslint-plugin-wc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003954,"owners_count":21196794,"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","eslintplugin","hacktoberfest","wc","webcomponents"],"created_at":"2024-08-02T05:01:23.724Z","updated_at":"2025-04-15T03:52:03.779Z","avatar_url":"https://github.com/43081j.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"media/eslint-webcomponents.svg\" alt=\"Eslint + WebComponents\" width=\"450\" height=\"175\" /\u003e\n\u003c/div\u003e\n\n# `eslint-plugin-wc`\n\n[![npm version](https://img.shields.io/npm/v/eslint-plugin-wc.svg?style=flat)](https://npmjs.org/package/eslint-plugin-wc 'View this project on npm')\n[![Build Status](https://travis-ci.com/43081j/eslint-plugin-wc.svg?branch=master)](https://travis-ci.com/43081j/eslint-plugin-wc)\n[![Coverage Status](https://coveralls.io/repos/github/43081j/eslint-plugin-wc/badge.svg?branch=master)](https://coveralls.io/github/43081j/eslint-plugin-wc?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003e ESLint plugin for [Web Components](https://www.webcomponents.org/introduction).\n\n## Install\n\nAssuming you already have ESLint installed, run:\n\n```sh\n# npm\nnpm install eslint-plugin-wc --save-dev\n\n# yarn\nyarn add eslint-plugin-wc --dev\n```\n\n## Usage\n\nThen extend the recommended eslint config:\n\n```js\n{\n  \"extends\": [\n    // ...\n    \"plugin:wc/recommended\"\n  ]\n}\n```\n\nOr if you're using ESLint flat configs, add this to your `eslint.config.js`:\n\n```ts\nimport {configs} from 'eslint-plugin-wc';\n\nexport default [\n  configs['flat/recommended'],\n\n  // or if you want to specify `files`, or other options\n  {\n    ...configs['flat/recommended'],\n    files: ['test/**/*.js']\n  }\n];\n```\n\nYou should also specify settings that will be shared across all the plugin rules. ([More about eslint shared settings](https://eslint.org/docs/user-guide/configuring/configuration-files#adding-shared-settings))\n\n```jsonc\n{\n  \"settings\": {\n    \"wc\": {\n      \"elementBaseClasses\": [\"LitElement\"] // Recognize `LitElement` as a Custom Element base class\n    }\n  }\n}\n```\n\n### Custom Configuration\n\nIf you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:\n\n```js\n{\n  \"plugins\": [\n    // ...\n    \"wc\"\n  ],\n  \"rules\": {\n    // ...\n    \"wc/no-invalid-element-name\": \"error\",\n    \"wc/no-typos\": \"warn\"\n  }\n}\n```\n\n## Supported Rules\n\n### Possible Errors (Recommended)\n\n- [wc/no-constructor-attributes](docs/rules/no-constructor-attributes.md)\n- [wc/no-invalid-element-name](docs/rules/no-invalid-element-name.md)\n- [wc/no-self-class](docs/rules/no-self-class.md)\n\n### Best Practice\n\n- [wc/attach-shadow-constructor](docs/rules/attach-shadow-constructor.md)\n- [wc/guard-super-call](docs/rules/guard-super-call.md)\n- [wc/no-child-traversal-in-attributechangedcallback](docs/rules/no-child-traversal-in-attributechangedcallback.md)\n- [wc/no-child-traversal-in-connectedcallback](docs/rules/no-child-traversal-in-connectedcallback.md)\n- [wc/no-closed-shadow-root](docs/rules/no-closed-shadow-root.md)\n- [wc/no-constructor-params](docs/rules/no-constructor-params.md)\n- [wc/no-customized-built-in-elements](docs/rules/no-customized-built-in-elements.md)\n- [wc/no-invalid-extends](docs/rules/no-invalid-extends.md)\n- [wc/no-typos](docs/rules/no-typos.md)\n- [wc/require-listener-teardown](docs/rules/require-listener-teardown.md)\n\n### Preference/convention\n\n- [wc/define-tag-after-class-definition](docs/rules/define-tag-after-class-definition.md)\n- [wc/expose-class-on-global](docs/rules/expose-class-on-global.md)\n- [wc/file-name-matches-element](docs/rules/file-name-matches-element.md)\n- [wc/guard-define-call](docs/rules/guard-define-call.md)\n- [wc/max-elements-per-file](docs/rules/max-elements-per-file.md)\n- [wc/no-constructor](docs/rules/no-constructor.md)\n- [wc/no-exports-with-element](docs/rules/no-exports-with-element.md)\n- [wc/no-method-prefixed-with-on](docs/rules/no-method-prefixed-with-on.md)\n- [wc/tag-name-matches-class](docs/rules/tag-name-matches-class.md)\n\n## Shareable configurations\n\n### Recommended\n\nThis plugin exports a `recommended` configuration that enforces WebComponent good practices.\n\nTo enable this configuration use the `extends` property in your `.eslintrc` config file:\n\n```js\n{\n  \"extends\": [\"eslint:recommended\", \"plugin:wc/recommended\"]\n}\n```\n\n### Best Practices\n\nThis plugin exports a `best-practice` configuration that enforces WebComponent best practices.\n\nTo enable this configuration use the `extends` property in your `.eslintrc` config file:\n\n```js\n{\n  \"extends\": [\"eslint:recommended\", \"plugin:wc/best-practice\"]\n}\n```\n\n**Note**: These configurations will enable `sourceType: 'module'` in [parser options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options).\n\n## License\n\n`eslint-plugin-wc` is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F43081j%2Feslint-plugin-wc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F43081j%2Feslint-plugin-wc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F43081j%2Feslint-plugin-wc/lists"}