Polymer Linter (v3.0.1) is a library for finding suspicious patterns and errors in web projects using Polymer custom elements. It is built on the Polymer Analyzer and provides AST-based linting with high-level feature queries. The linter is typically run via Polymer CLI or integrated into editors like VS Code. It offers rule collections (e.g., polymer-2-hybrid) and individual rules. Release cadence is low, as the project is in maintenance mode. Key differentiators: Polymer-specific linting rules (e.g., attribute checks, behaviors spelling) and tight integration with Polymer toolchain.
npm install polymer-linterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to programmatically use Polymer Linter: create an Analyzer, instantiate Linter, and lint a document with a rule collection.
Migrate to lit-analyzer or eslint-plugin-lit for Polymer 3 and LitElement projects.
Instantiate polymer-analyzer and pass it to Linter.
Pass rules as array in options object.
Provide a custom urlLoader or use polymer-cli to run it.
npm install polymer-analyzer
Update code to: linter.lint(document, { rules: ['polymer-2-hybrid'] })Check rule names in registry; use correct string like 'polymer-2-hybrid'.