eslint-plugin-lwc icon indicating copy to clipboard operation
eslint-plugin-lwc copied to clipboard

Official ESLint rules for LWC

Results 19 eslint-plugin-lwc issues
Sort by recently updated
recently updated
newest added
trafficstars

SSR rules check whether a class is a component by checking if it inherits `LightningElement`. However, that class could be inheriting another class which in turn inherits `LightningElement`. We should...

`@lwc/lwc/no-unsupported-ssr-properties` and `@lwc/lwc/no-restricted-browser-globals-during-ssr` check all functions in a component for unsafe SSR practices. However, not all functions need to be SSR safe, only those called on first paint. **Example:** ```js...

kind/bug

`@lwc/lwc/no-unsupported-ssr-properties `does not recognize when there is a multi conditional check with `!import.meta.ev.SSR`. **Example:** This will have an error even though it has the correct check in place ```js if...

kind/bug

Some rules break when we use type assertions (e.g. `document.querySelector('td')` is invalid, but `(document as any).querySelector('td')` is considered valid. In order to avoid false negatives, we should update the rules...

When linting a file, you can only have a single parser. We currently use [`@babel/eslint-parser`](https://www.npmjs.com/package/@babel/eslint-parser), which supports typescript, but does not have any TypeScript-specific rules. An alternative parser, [`typescript-eslint`](https://typescript-eslint.io/) is...

USER STORY

`eslint` major version 9 was published to NPM on April 5, 2024. When you install the latest `eslint` version, you get peer dependency warnings coming from this package.

## description This adds support for ESLint v9 by replacing deprecated function calls. The `context.js` is just needed for compatibility with v7. If this was my project, i would just...

cla:signed

[no-disallowed-lwc-imports](https://github.com/salesforce/eslint-plugin-lwc/blob/v1.8.2/docs/rules/no-disallowed-lwc-imports.md) restricts the APIs that can be imported from `lwc`. It was not written with TypeScript in mind. We should update the rule to make working with TypeScript easier. Options:...

kind/feature

There is a bug in `@lwc/lwc/valid-graphql-wire-adapter-callback-parameter` which falsely reports undecorated class methods if their argument is an object with an `error` property like in this example: ```js class C {...