Skip to content

Commit

Permalink
Improve usage of css-functions-list in function-no-unknown (#5916)
Browse files Browse the repository at this point in the history
This change bumps `css-functions-list` from 3.0.0 to 3.0.1.
See https://github.com/niksy/css-functions-list/releases/tag/v3.0.1

```shell
npm i css-functions-list
```
  • Loading branch information
ybiquitous committed Feb 15, 2022
1 parent 42a401c commit 1496df3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions lib/rules/function-no-unknown/index.js
@@ -1,7 +1,6 @@
'use strict';

const fs = require('fs');
const { URL } = require('url');
const valueParser = require('postcss-value-parser');
const functionsListPath = require('css-functions-list');

Expand Down Expand Up @@ -44,8 +43,7 @@ const rule = (primary, secondaryOptions) => {
return;
}

const path = new URL(functionsListPath.toString(), 'file://');
const functionsList = JSON.parse(fs.readFileSync(path, 'utf8'));
const functionsList = JSON.parse(fs.readFileSync(functionsListPath.toString(), 'utf8'));

root.walkDecls((decl) => {
const { value } = decl;
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -111,7 +111,7 @@
"balanced-match": "^2.0.0",
"colord": "^2.9.2",
"cosmiconfig": "^7.0.1",
"css-functions-list": "^3.0.0",
"css-functions-list": "^3.0.1",
"debug": "^4.3.3",
"execall": "^2.0.0",
"fast-glob": "^3.2.11",
Expand Down

0 comments on commit 1496df3

Please sign in to comment.