Skip to content

Commit b32a57e

Browse files
Yuraima EstevezAaron Cassanova
Yuraima Estevez
and
Aaron Cassanova
committed
Added icons package to eslint-ts config and fixed some eslint errors
Co-authored-by: Aaron Cassanova <aaron.cassanova@shopify.com>
1 parent d50cc6d commit b32a57e

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.eslintrc.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ module.exports = {
1717
tsconfigRootDir: __dirname,
1818
project: [
1919
'./tsconfig.eslint.json',
20-
...packages.map((pkg) => `./${pkg}/tsconfig.json`),
20+
...packages
21+
.filter((pkg) => pkg !== 'polaris-icons')
22+
.map((pkg) => `./${pkg}/tsconfig.json`),
2123
],
2224
},
2325
settings: {

polaris-icons/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"clean": "rm -rf .turbo node_modules dist",
2222
"dev": "rollup -c -w",
2323
"test": "jest",
24-
"optimize": "svgo -f icons"
24+
"optimize": "svgo -f icons",
25+
"lint": "TIMING=1 eslint --cache ."
2526
},
2627
"exports": {
2728
".": {

polaris-icons/tests/validate-svg-content.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const fs = require('fs');
22
const path = require('path');
33

4+
// eslint-disable-next-line import/no-extraneous-dependencies
45
const svgo = require('svgo');
56
const globby = require('globby');
67
const unified = require('unified');
@@ -9,7 +10,7 @@ const {select, selectAll} = require('hast-util-select');
910

1011
const svgoConfig = require('../svgo.config');
1112

12-
const nameRegex = /(?<=)(Major|Minor)(?=\.svg)/;
13+
// const nameRegex = /(?<=)(Major|Minor)(?=\.svg)/;
1314

1415
const allIconFiles = globby
1516
.sync(path.resolve(__dirname, '../icons/*.svg'))
@@ -35,7 +36,7 @@ allIconFiles.forEach(
3536
optimizedSource,
3637
iconAst,
3738
expectedViewbox,
38-
expectedFillColors,
39+
// expectedFillColors,
3940
}) => {
4041
describe(`SVG Contents: packages/${iconPath}`, () => {
4142
it(`is optimized`, () => {

tsconfig.eslint.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
// Root config used to specify which TS files to lint
33
// https://typescript-eslint.io/docs/linting/monorepo/#one-root-tsconfigjson
4-
54
"compilerOptions": {
65
// Ensures this config is not used for a build
76
"noEmit": true
@@ -14,6 +13,7 @@
1413
"polaris-react",
1514
"polaris-tokens",
1615
"polaris.shopify.com",
17-
"stylelint-polaris"
16+
"stylelint-polaris",
17+
"polaris-icons"
1818
]
1919
}

0 commit comments

Comments
 (0)