{"id":25448015,"url":"https://github.com/stenciljs/eslint-plugin","last_synced_at":"2025-04-12T14:56:09.635Z","repository":{"id":34932714,"uuid":"191951574","full_name":"stenciljs/eslint-plugin","owner":"stenciljs","description":"ESLint rules specific to Stencil JS projects","archived":false,"fork":false,"pushed_at":"2025-04-04T14:22:13.000Z","size":1484,"stargazers_count":65,"open_issues_count":23,"forks_count":34,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-04T19:09:00.492Z","etag":null,"topics":["stenciljs"],"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/stenciljs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-06-14T13:53:23.000Z","updated_at":"2025-04-01T10:41:07.000Z","dependencies_parsed_at":"2023-01-16T23:15:38.065Z","dependency_job_id":"b1a53bbe-f242-4e49-9163-d01bd3fc06c5","html_url":"https://github.com/stenciljs/eslint-plugin","commit_stats":{"total_commits":100,"total_committers":17,"mean_commits":5.882352941176471,"dds":0.64,"last_synced_commit":"506dba7a5e430da4cfabe96b8e1b1cb31fe07699"},"previous_names":["ionic-team/stencil-eslint","stenciljs/stencil-eslint","stencil-community/stencil-eslint","stenciljs/eslint-plugin"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenciljs%2Feslint-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenciljs%2Feslint-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenciljs%2Feslint-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stenciljs%2Feslint-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stenciljs","download_url":"https://codeload.github.com/stenciljs/eslint-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543837,"owners_count":21121838,"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":["stenciljs"],"created_at":"2025-02-17T19:02:18.553Z","updated_at":"2025-04-12T14:56:09.604Z","avatar_url":"https://github.com/stenciljs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @stencil/eslint-plugin\n\nESLint rules specific to Stencil JS projects.\n\n## Installation\n\nInstall this plugin in your project via:\n\n```bash\nnpm i --save-dev @stencil/eslint-plugin\n```\n\n## Usage\n\n### Configuration (new: eslint.config.*)\n\nThe plugin exports 3 flat configs for use with eslint \u003e= 9:\n\n- flat.base\n- flat.recommended\n- flat.strict\n\n```js\n// eslint.config.mjs\nimport stencil from '@stencil/eslint-plugin';\n\nexport default [\n  ...\n  stencil.configs.flat.recommended,\n  ...\n];\n```\n\nAlternatively:\n\n```js\n// eslint.config.js\nconst stencil = require('@stencil/eslint-plugin');\n\nmodule.exports = [\n  ...\n  stencil.configs.flat.recommended,\n  ...\n];\n```\n\nBy default, ESLint will ignore your `node_modules/` directory. Consider adding a `.eslintignore` file at the root of\nyour project with any output target directories to avoid false positive errors from ESLint.\n\n```\n# place any directories created by the Stencil compilation process here\ndist\nloader\nwww\n```\n\nLint all your project:\n\n```sh\nnpm run lint\n```\n\n### Configuration (legacy: .eslintrc*)\n\n`.eslintrc.json` configuration file:\n\n```json\n{\n  \"parserOptions\": {\n    \"project\": \"./tsconfig.json\"\n  },\n  \"extends\": [\n    \"plugin:stencil/recommended\"\n  ]\n}\n```\n\n## Supported Rules\n\n- [`stencil/async-methods`](./docs/async-methods.md)\n\nThis rule catches Stencil public methods that are not async.\n\n- [`stencil/ban-default-true`](./docs/ban-default-true.md)\n\nThis rule catches Stencil Props with a default value of `true`.\n\n- [`stencil/ban-prefix`](./docs/ban-prefix.md)\n\nThis rule catches Stencil Component banned tag name prefix.\n\n- [`stencil/class-pattern`](./docs/class-pattern.md)\n\nThis rule catches Stencil Component class name not matching configurable pattern.\n\n- [`stencil/decorators-context`](./docs/decorators-context.md)\n\nThis rule catches Stencil decorators in bad locations.\n\n- [`stencil/decorators-style`](./docs/decorators-style.md)\n\nThis rule catches Stencil decorators style usage.\n\n- [`stencil/element-type`](./docs/element-type.md)\n\nThis rule catches Stencil Element decorator have the correct type.\n\n- [`stencil/host-data-deprecated`](./docs/host-data-deprecated.md)\n\nThis rule catches Stencil method hostData.\n\n- [`stencil/methods-must-be-public`](./docs/methods-must-be-public.md)\n\nThis rule catches Stencil Methods marked as private or protected.\n\n- [`stencil/no-unused-watch`](./docs/no-unused-watch.md)\n\nThis rule catches Stencil Watchs with non existing Props or States.\n\n- [`stencil/own-methods-must-be-private`](./docs/own-methods-must-be-private.md)\n\nThis rule catches own class methods marked as public.\n\n- [`stencil/own-props-must-be-private`](./docs/own-props-must-be-private.md)\n\nThis rule catches own class properties marked as public.\n\n- [`stencil/prefer-vdom-listener`](./docs/prefer-vdom-listener.md)\n\nThis rule catches Stencil Listen with vdom events.\n\n- [`stencil/props-must-be-public`](./docs/props-must-be-public.md)\n\nThis rule catches Stencil Props marked as private or protected.\n\n- [`stencil/props-must-be-readonly`](./docs/props-must-be-readonly.md)\n\nThis rule catches Stencil Props marked as non readonly, excluding mutable ones.\n\n- [`stencil/render-returns-host`](./docs/render-returns-host.md)\n\nThis rule catches Stencil Render returning array instead of Host tag.\n\n- [`stencil/required-jsdoc`](./docs/required-jsdoc.md)\n\nThis rule catches Stencil Props, Methods and Events to define jsdoc.\n\n- [`stencil/required-prefix`](./docs/required-prefix.md)\n\nThis rule catches Stencil Component required tag name prefix.\n\n- [`stencil/reserved-member-names`](./docs/reserved-member-names.md)\n\nThis rule catches Stencil Prop names that share names of Global HTML Attributes.\n\n- [`stencil/single-export`](./docs/single-export.md)\n\nThis rule catches modules that expose more than just the Stencil Component itself.\n\n- [`stencil/strict-mutable`](./docs/strict-mutable.md)\n\nThis rule catches Stencil Prop marked as mutable but not changing value in code.\n\n## Recommended rules\n\n```json\n{\n  \"stencil/async-methods\": \"error\",\n  \"stencil/ban-prefix\": [\"error\", [\"stencil\", \"stnl\", \"st\"]],\n  \"stencil/decorators-context\": \"error\",\n  \"stencil/decorators-style\": [\n    \"error\", {\n      \"prop\": \"inline\",\n      \"state\": \"inline\",\n      \"element\": \"inline\",\n      \"event\": \"inline\",\n      \"method\": \"multiline\",\n      \"watch\": \"multiline\",\n      \"listen\": \"multiline\"\n    }],\n  \"stencil/element-type\": \"error\",\n  \"stencil/host-data-deprecated\": \"error\",\n  \"stencil/methods-must-be-public\": \"error\",\n  \"stencil/no-unused-watch\": \"error\",\n  \"stencil/own-methods-must-be-private\": \"error\",\n  \"stencil/own-props-must-be-private\": \"error\",\n  \"stencil/prefer-vdom-listener\": \"error\",\n  \"stencil/props-must-be-public\": \"error\",\n  \"stencil/props-must-be-readonly\": \"error\",\n  \"stencil/render-returns-host\": \"error\",\n  \"stencil/required-jsdoc\": \"error\",\n  \"stencil/reserved-member-names\": \"error\",\n  \"stencil/single-export\": \"error\",\n  \"stencil/strict-mutable\": \"error\"\n}\n```\n\n## Contributing\n\nWhen submitting new rules please:\n- Describe your new rule in the README.md\n- Provide a suite of unit tests for your rule\n- Follow ESLint Rule guidelines (the [eslint-rule yeoman generator](https://github.com/eslint/generator-eslint) is good for this)\n\nAll contributions welcome.\n\n## License\n\n- [MIT](https://raw.githubusercontent.com/stenciljs/eslint-plugin/refs/heads/main/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstenciljs%2Feslint-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstenciljs%2Feslint-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstenciljs%2Feslint-plugin/lists"}