Skip to content

Commit 358eb70

Browse files
author
Josh Oakes
authored
Merge pull request #6 from stellarwp/import_fixes
Linter fixes
2 parents ceb50a9 + 860c4a9 commit 358eb70

File tree

18 files changed

+73
-21
lines changed

18 files changed

+73
-21
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const eslintConfig = {
5656
navigator: 'readonly',
5757
localStorage: 'readonly',
5858
ktgooglefonts: 'readonly',
59+
frames: 'readonly',
5960
},
6061
rules: {
6162
'prettier/prettier': 'off',

.github/workflows/eslint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ESLint
2+
run-name: '[ESLint] ${{ github.event.head_commit.message }}'
3+
4+
on: push
5+
6+
jobs:
7+
run-linters:
8+
name: Run linters
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out Git repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 18
19+
20+
# ESLint and Prettier must be in `package.json`
21+
- name: Install Node.js dependencies
22+
run: npm ci --ignore-scripts --legacy-peer-deps
23+
24+
- name: Run linters
25+
uses: wearerequired/lint-action@v2
26+
with:
27+
auto_fix: true
28+
eslint: true

src/border/border-control/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
radiusLinkedIcon,
4040
radiusIndividualIcon,
4141
} from '@kadence/icons';
42-
import { settings, link, linkOff } from '@wordpress/icons';
42+
import { settings, link, linkOff, undo } from '@wordpress/icons';
4343
import SingleBorderControl from '../single-border-control';
4444
/**
4545
* Build the Border controls

src/dynamic-text-input-control/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import DynamicTextPopover from '../dynamic-text-popover';
55

66
import { __ } from '@wordpress/i18n';
77
import { Button, TextControl } from '@wordpress/components';
8+
import { undo } from '@wordpress/icons';
89
import { map, isEqual } from 'lodash';
910
/**
1011
* WordPress dependencies

src/inline-pop-color/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ import {
3333
<Path d="M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z" />
3434
</SVG>
3535
);
36+
37+
function unConvertOpacity(value) {
38+
let val = 100;
39+
if (value) {
40+
val = value * 100;
41+
}
42+
return val;
43+
}
44+
45+
3646
export default function InlinePopColorControl( {
3747
label,
3848
opacityValue = '',

src/links/image-url-input-link-controls/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { find, map } from 'lodash';
77
* WordPress dependencies
88
*/
99
import { __ } from '@wordpress/i18n';
10-
import { useRef, useState, useCallback } from '@wordpress/element';
10+
import { useRef, useState, useCallback, Fragment } from '@wordpress/element';
1111
import {
1212
ToolbarButton,
1313
Button,
@@ -17,6 +17,7 @@ import {
1717
TextControl,
1818
SVG,
1919
Path,
20+
SelectControl,
2021
} from '@wordpress/components';
2122
import { URLPopover } from '@wordpress/block-editor';
2223
import { link as linkIcon, close } from '@wordpress/icons';

src/links/input-search/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Component, Fragment, createRef } from '@wordpress/element';
1212
import { safeDecodeURI, filterURLForDisplay } from '@wordpress/url';
1313
import { applyFilters } from '@wordpress/hooks';
1414
import { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';
15-
import { BaseControl, Button, Spinner, ToggleControl, ExternalLink } from '@wordpress/components';
15+
import { BaseControl, Button, Spinner, ToggleControl, ExternalLink, Icon } from '@wordpress/components';
1616
import { withInstanceId, withSafeTimeout, compose } from '@wordpress/compose';
1717
import DynamicLinkControl from '../dynamic-link-control';
1818
import TextHighlight from '../text-highlight';

src/measurement-range-control/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {
4747
radiusLinkedIcon,
4848
radiusIndividualIcon,
4949
} from '@kadence/icons';
50-
import { settings, link, linkOff } from '@wordpress/icons';
50+
import { undo, settings, link, linkOff } from '@wordpress/icons';
5151
import { OPTIONS_MAP } from './constants';
5252
import { isCustomOption, getOptionIndex, getOptionFromSize, getOptionSize } from './utils';
5353

src/measurement-range-control/responsive.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@ import { undo, settings, link, linkOff } from '@wordpress/icons';
1818
*/
1919
import './editor.scss';
2020
import { Dashicon, Button, ButtonGroup, Flex } from '@wordpress/components';
21-
import { outlineTopIcon, outlineRightIcon, outlineBottomIcon, outlineLeftIcon } from '@kadence/icons';
21+
import {
22+
outlineTopIcon,
23+
outlineRightIcon,
24+
outlineBottomIcon,
25+
outlineLeftIcon,
26+
topLeftIcon,
27+
topRightIcon,
28+
bottomRightIcon,
29+
bottomLeftIcon,
30+
radiusLinkedIcon,
31+
radiusIndividualIcon,
32+
} from '@kadence/icons';
2233
import { OPTIONS_MAP } from './constants';
2334
import { isCustomOption, getOptionIndex, getOptionFromSize, getOptionSize } from './utils';
2435
/**
@@ -72,6 +83,7 @@ export default function ResponsiveMeasureRangeControl({
7283
};
7384
const [isCustom, setIsCustom] = useState(false);
7485
const [theControl, setTheControl] = useState(control);
86+
// eslint-disable-next-line no-undef
7587
const realIsCustomControl = setCustomControl ? customControl : isCustom;
7688
const realSetIsCustom = setCustomControl ? setCustomControl : setIsCustom;
7789
const reviewOptions = JSON.parse(JSON.stringify(options));

src/measurement/measurement-control/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export default function MeasurementControls({
9393
onChange(['', '', '', '']);
9494
}
9595
};
96+
const liveValue = measurement;
9697
return (
9798
<>
9899
{onChange && (

0 commit comments

Comments
 (0)