Skip to content

Commit

Permalink
chore(deps): update dependency eslint-config-love to v47 (#4466)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency eslint-config-love to v47

* chore(deps): update dependency eslint-config-love to v47

* fix: remove unused vars

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christopher Tannum <christopher.tannum@cognite.com>
  • Loading branch information
renovate[bot] and christjt authored May 8, 2024
1 parent cb258f3 commit 35447e0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 84 deletions.
9 changes: 9 additions & 0 deletions react-components/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ module.exports = {
plugins: ['react', 'prettier', 'header'],
rules: {
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-misused-promises': 'off',
'no-console': [2, { allow: ['warn', 'error'] }],
Expand Down
2 changes: 1 addition & 1 deletion react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.57.0",
"eslint-config-love": "43.1.0",
"eslint-config-love": "47.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.29.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async function applyStyling(

for (const group of styling) {
if (group.assetIds !== undefined) {
const annotationInfoPromise = group.assetIds.map(async (id) => {
const annotationInfoPromise = group.assetIds.map(async () => {
return await imageCollection.findImageAnnotations({
assetRef: { id: group.assetIds[0] }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const MeasurementButton = ({
measurementTool.off('added', measurementAddedCallback);
};

const handleMeasurement = (_enable: boolean): void => {
const toggleMeasurementEnabled = (): void => {
if (viewer.models.length <= 0) {
return;
}
Expand All @@ -82,9 +82,7 @@ export const MeasurementButton = ({
icon="Ruler"
toggled={measurementEnabled}
aria-label="Make measurements"
onClick={() => {
handleMeasurement(!measurementEnabled);
}}
onClick={toggleMeasurementEnabled}
/>
</CogsTooltip>
);
Expand Down
5 changes: 2 additions & 3 deletions react-components/src/components/RuleBasedOutputs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ const analyzeNodesAgainstExpression = async ({
);

const filteredAllTreeNodes = allTreeNodes.flat().filter(isDefined);
return applyNodeStyles(filteredAllTreeNodes, outputSelected, model);
return applyNodeStyles(filteredAllTreeNodes, outputSelected);
};

const getThreeDNodesFromAsset = async (
Expand All @@ -309,8 +309,7 @@ const getThreeDNodesFromAsset = async (

const applyNodeStyles = (
treeNodes: NodeAndRange[],
outputSelected: ColorRuleOutput,
model: CogniteCadModel
outputSelected: ColorRuleOutput
): AssetStylingGroupAndStyleIndex => {
const ruleOutputAndStyleIndex: RuleAndStyleIndex = {
styleIndex: new TreeIndexNodeCollection(),
Expand Down
92 changes: 17 additions & 75 deletions react-components/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 35447e0

Please sign in to comment.