mirror of
https://github.com/iconify/iconify.git
synced 2025-01-22 14:48:24 +00:00
Fix linting errors in utils
This commit is contained in:
parent
b985c4e69e
commit
d5a7e5724d
@ -1,2 +1 @@
|
|||||||
lib
|
lib
|
||||||
tests-compiled
|
|
||||||
|
@ -18,12 +18,12 @@ module.exports = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
project: ['tsconfig.json', 'tests/tsconfig.json'],
|
project: ['tsconfig.json', 'tests/tsconfig.json'],
|
||||||
|
extraFileExtensions: ['.cjs'],
|
||||||
},
|
},
|
||||||
plugins: ['@typescript-eslint'],
|
plugins: ['@typescript-eslint'],
|
||||||
rules: {
|
rules: {
|
||||||
'no-mixed-spaces-and-tabs': ['off'],
|
'no-mixed-spaces-and-tabs': ['off'],
|
||||||
'no-unused-vars': ['off'],
|
'no-unused-vars': ['off'],
|
||||||
'@typescript-eslint/no-unused-vars-experimental': ['error'],
|
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
|
973
packages/utils/package-lock.json
generated
973
packages/utils/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,15 +13,15 @@
|
|||||||
"directory": "packages/utils"
|
"directory": "packages/utils"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf lib tests-compiled tsconfig.tsbuildinfo",
|
"clean": "rimraf lib tsconfig.tsbuildinfo",
|
||||||
"lint": "eslint --fix src/**/*.ts",
|
"lint": "eslint --fix src/**/*.ts",
|
||||||
"prebuild": "npm run lint && npm run clean",
|
"prebuild": "npm run lint && npm run clean",
|
||||||
"build": "unbuild",
|
"build": "unbuild",
|
||||||
"test:jest-cjs": "npm run build && jest --clearCache && jest --config=jest.config.cjs",
|
"test:jest-cjs": "jest --clearCache && jest --runInBand --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-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",
|
"test": "npm run test:jest-cjs && npm run test:jest-esm",
|
||||||
"vitest:cjs": "npm run build && vitest --config vitest.config.cjs",
|
"vitest:cjs": "vitest --config vitest.config.cjs",
|
||||||
"vitest:esm": "npm run build && vitest --config vitest.config.mjs",
|
"vitest:esm": "vitest --config vitest.config.mjs",
|
||||||
"vitest": "npm run vitest:cjs && npm run vitest:esm"
|
"vitest": "npm run vitest:cjs && npm run vitest:esm"
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
@ -208,9 +208,9 @@
|
|||||||
"@iconify-json/flat-color-icons": "^1.0.2",
|
"@iconify-json/flat-color-icons": "^1.0.2",
|
||||||
"@types/debug": "^4.1.7",
|
"@types/debug": "^4.1.7",
|
||||||
"@types/jest": "^27.0.1",
|
"@types/jest": "^27.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^8.11.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"jest": "^27.2.1",
|
"jest": "^27.2.1",
|
||||||
|
@ -58,7 +58,7 @@ export const defaults: FullIconCustomisations = Object.freeze({
|
|||||||
/**
|
/**
|
||||||
* TypeScript
|
* 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) {
|
function assertNever(v: never) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ export function convertIconSetInfo(
|
|||||||
|
|
||||||
if (source.height instanceof Array) {
|
if (source.height instanceof Array) {
|
||||||
source.height.forEach((item) => {
|
source.height.forEach((item) => {
|
||||||
const num = parseInt(item);
|
const num = parseInt(item as string);
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
if (!(info.height instanceof Array)) {
|
if (!(info.height instanceof Array)) {
|
||||||
info.height = [];
|
info.height = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user