Ensure component class name matches file name (consistent-component-name)
August 31, 2020 ยท View on GitHub
Having the component name in sync with the file name offers better stack traces and debuggability.
Note: The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
Rule details
Example of incorrect code:
// foo.js
export default class extends LightningElement {}
// foo.js
export default class Bar extends LightningElement {}
Example of correct code:
// foo.js
export default class Foo extends LightningElement {}
// complexName.js
export default class ComplexName extends LightningElement {}