Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: remove deprecated ban-props-on-host, enforce-ref-last-prop, require-event-emitter-type rules #10679

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions packages/eslint-plugin-calcite-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,14 @@ npm run lint

This rule helps prevent usage of specific events and allows suggesting alternatives.

- [`@esri/calcite-components/ban-props-on-host`](./docs/ban-props-on-host.md)
- [`@esri/calcite-components/no-dynamic-createelement`](./docs/no-dynamic-createelement.md)

This rule catches props/attributes that should be in the encapsulated HTML structure and not on the host element.

- [`@esri/calcite-components/enforce-ref-last-prop`](./docs/enforce-ref-last-prop.md)

This ensures the node passed into the `ref` callback is in sync with its JSX attributes/properties when invoked.

- [`@esri/calcite-components/require-event-emitter-type`](./docs/require-event-emitter-type.md)

This rule helps enforce the payload type to EventEmitters to avoid misleading `any` type on the CustomEvent detail object.
This rule ensures that calls to `document.createElement()` use string literals to avoid dynamic tag creation to enhance plugin compatibility.

- [`@esri/calcite-components/strict-boolean-attributes`](./docs/strict-boolean-attributes.md)

This rule catches boolean props that are initialized in a way that does not conform to the HTML5 spec.

## Recommended rules

```json
{
"@esri/calcite-components/ban-props-on-host": "error",
"@esri/calcite-components/enforce-ref-last-prop": "error",
"@esri/calcite-components/require-event-emitter-type": "error",
"@esri/calcite-components/strict-boolean-attributes": "error"
}
```

## Contributing

We welcome contributions to this project. See [CONTRIBUTING.md](./CONTRIBUTING.md) for an overview of contribution guidelines.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ export default {
},
plugins: ["@esri/calcite-components"],
rules: {
"@esri/calcite-components/ban-props-on-host": 2,
"@esri/calcite-components/enforce-ref-last-prop": 2,
"@esri/calcite-components/no-dynamic-createelement": 2,
"@esri/calcite-components/require-event-emitter-type": 2,
"@esri/calcite-components/strict-boolean-attributes": 2,
"@esri/calcite-components/no-dynamic-createelement": 1,
"@esri/calcite-components/strict-boolean-attributes": 1,
},
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
export default {
extends: ["plugin:@esri/calcite-components/base"],
rules: {
"@esri/calcite-components/ban-props-on-host": 2,
"@esri/calcite-components/enforce-ref-last-prop": 2,
"@esri/calcite-components/require-event-emitter-type": 2,
"@esri/calcite-components/strict-boolean-attributes": 2,
},
};

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import banEvents from "./ban-events";
import banPropsOnHost from "./ban-props-on-host";
import enforceRefLastProp from "./enforce-ref-last-prop";
import noDynamicCreateelement from "./no-dynamic-createelement";
import requireEventEmitterType from "./require-event-emitter-type";
import strictBooleanAttributes from "./strict-boolean-attributes";

export default {
"ban-events": banEvents,
"ban-props-on-host": banPropsOnHost,
"enforce-ref-last-prop": enforceRefLastProp,
"no-dynamic-createelement": noDynamicCreateelement,
"require-event-emitter-type": requireEventEmitterType,
"strict-boolean-attributes": strictBooleanAttributes,
};

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading