From 3f05b5cde6803064bef0ddc837ec1060c9e83635 Mon Sep 17 00:00:00 2001 From: "Ya Hui Liang(Ryou)" <46517115@qq.com> Date: Wed, 12 Jan 2022 14:15:24 +0800 Subject: [PATCH] chore: remove unused vars and imports (#3682) --- packages/less/src/less-node/image-size.js | 2 -- packages/less/src/less-node/index.js | 1 - packages/less/src/less/tree/expression.js | 2 -- 3 files changed, 5 deletions(-) diff --git a/packages/less/src/less-node/image-size.js b/packages/less/src/less-node/image-size.js index 18123f317..888a7a136 100644 --- a/packages/less/src/less-node/image-size.js +++ b/packages/less/src/less-node/image-size.js @@ -11,9 +11,7 @@ export default environment => { currentFileInfo.currentDirectory : currentFileInfo.entryPath; const fragmentStart = filePath.indexOf('#'); - let fragment = ''; if (fragmentStart !== -1) { - fragment = filePath.slice(fragmentStart); filePath = filePath.slice(0, fragmentStart); } diff --git a/packages/less/src/less-node/index.js b/packages/less/src/less-node/index.js index fec503988..43cbe7a49 100644 --- a/packages/less/src/less-node/index.js +++ b/packages/less/src/less-node/index.js @@ -4,7 +4,6 @@ import UrlFileManager from './url-file-manager'; import createFromEnvironment from '../less'; const less = createFromEnvironment(environment, [new FileManager(), new UrlFileManager()]); import lesscHelper from './lessc-helper'; -import path from 'path'; // allow people to create less with their own environment less.createFromEnvironment = createFromEnvironment; diff --git a/packages/less/src/less/tree/expression.js b/packages/less/src/less/tree/expression.js index bbbacc80f..957505b87 100644 --- a/packages/less/src/less/tree/expression.js +++ b/packages/less/src/less/tree/expression.js @@ -2,8 +2,6 @@ import Node from './node'; import Paren from './paren'; import Comment from './comment'; import Dimension from './dimension'; -import * as Constants from '../constants'; -const MATH = Constants.Math; const Expression = function(value, noSpacing) { this.value = value;