2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-06 07:20:40 +00:00

Fix linting errors in utils

This commit is contained in:
Vjacheslav Trushkin 2022-03-16 10:58:02 +02:00
parent b985c4e69e
commit d5a7e5724d
6 changed files with 451 additions and 545 deletions

View File

@ -1,2 +1 @@
lib
tests-compiled

View File

@ -18,12 +18,12 @@ module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
project: ['tsconfig.json', 'tests/tsconfig.json'],
extraFileExtensions: ['.cjs'],
},
plugins: ['@typescript-eslint'],
rules: {
'no-mixed-spaces-and-tabs': ['off'],
'no-unused-vars': ['off'],
'@typescript-eslint/no-unused-vars-experimental': ['error'],
},
overrides: [
{

File diff suppressed because it is too large Load Diff

View File

@ -13,15 +13,15 @@
"directory": "packages/utils"
},
"scripts": {
"clean": "rimraf lib tests-compiled tsconfig.tsbuildinfo",
"clean": "rimraf lib tsconfig.tsbuildinfo",
"lint": "eslint --fix src/**/*.ts",
"prebuild": "npm run lint && npm run clean",
"build": "unbuild",
"test:jest-cjs": "npm run build && jest --clearCache && jest --config=jest.config.cjs",
"test:jest-esm": "npm run build && jest --clearCache && cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --config=jest.config.mjs",
"test:jest-cjs": "jest --clearCache && jest --runInBand --config=jest.config.cjs",
"test:jest-esm": "jest --clearCache && cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --runInBand --config=jest.config.mjs",
"test": "npm run test:jest-cjs && npm run test:jest-esm",
"vitest:cjs": "npm run build && vitest --config vitest.config.cjs",
"vitest:esm": "npm run build && vitest --config vitest.config.mjs",
"vitest:cjs": "vitest --config vitest.config.cjs",
"vitest:esm": "vitest --config vitest.config.mjs",
"vitest": "npm run vitest:cjs && npm run vitest:esm"
},
"sideEffects": false,
@ -208,9 +208,9 @@
"@iconify-json/flat-color-icons": "^1.0.2",
"@types/debug": "^4.1.7",
"@types/jest": "^27.0.1",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.1",

View File

@ -58,7 +58,7 @@ export const defaults: FullIconCustomisations = Object.freeze({
/**
* TypeScript
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental, @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function assertNever(v: never) {
//
}

View File

@ -189,7 +189,7 @@ export function convertIconSetInfo(
if (source.height instanceof Array) {
source.height.forEach((item) => {
const num = parseInt(item);
const num = parseInt(item as string);
if (num > 0) {
if (!(info.height instanceof Array)) {
info.height = [];