@stylelint/postcss-css-in-js
Advanced tools
Comparing version 0.37.1 to 0.37.2
@@ -9,3 +9,3 @@ 'use strict'; | ||
.replace(/-\w/g, (s) => s[1].toUpperCase()) | ||
: s | ||
: s, | ||
); | ||
@@ -12,0 +12,0 @@ } |
# Changelog | ||
## 0.37.2 | ||
- Fixed: use HTTPS url instead of HTTP for postcss logo in README ([#39](https://github.com/stylelint/postcss-css-in-js/pull/39)). | ||
## 0.37.1 | ||
@@ -4,0 +8,0 @@ |
@@ -204,8 +204,7 @@ 'use strict'; | ||
function setSpecifier(id, nameSpace) { | ||
nameSpace.unshift.apply( | ||
nameSpace, | ||
nameSpace | ||
nameSpace.unshift( | ||
...nameSpace | ||
.shift() | ||
.replace(/^\W+/, '') | ||
.split(/[/\\]+/g) | ||
.split(/[/\\]+/g), | ||
); | ||
@@ -244,3 +243,3 @@ | ||
if (specifier) { | ||
nameSpace.unshift.apply(nameSpace, specifier); | ||
nameSpace.unshift(...specifier); | ||
} else { | ||
@@ -259,3 +258,3 @@ nameSpace.unshift(node.name); | ||
function isStylePath(path) { | ||
return getNameSpace(path, []).some(function (name) { | ||
return getNameSpace(path, []).some(function (name, ...args) { | ||
const result = | ||
@@ -269,3 +268,3 @@ name && | ||
case 'function': { | ||
return result.apply(this, Array.prototype.slice.call(arguments, 1)); | ||
return result.apply(this, args); | ||
} | ||
@@ -275,2 +274,5 @@ case 'boolean': { | ||
} | ||
default: { | ||
return undefined; | ||
} | ||
} | ||
@@ -440,4 +442,4 @@ }); | ||
targetStyle.opts.expressions.some( | ||
(expr) => expr.start <= style.startIndex && style.endIndex < expr.end | ||
) | ||
(expr) => expr.start <= style.startIndex && style.endIndex < expr.end, | ||
), | ||
); | ||
@@ -444,0 +446,0 @@ |
@@ -51,3 +51,3 @@ 'use strict'; | ||
}, | ||
props | ||
props, | ||
); | ||
@@ -89,3 +89,3 @@ } | ||
startNode.start - startNode.loc.start.column, | ||
startNode.start | ||
startNode.start, | ||
); | ||
@@ -92,0 +92,0 @@ |
129
package.json
{ | ||
"name": "@stylelint/postcss-css-in-js", | ||
"version": "0.37.1", | ||
"version": "0.37.2", | ||
"description": "PostCSS syntax for parsing CSS in JS literals", | ||
"repository": "stylelint/postcss-css-in-js", | ||
"main": "index.js", | ||
"files": [ | ||
"*.js" | ||
], | ||
"keywords": [ | ||
@@ -26,9 +21,54 @@ "postcss", | ||
], | ||
"repository": "stylelint/postcss-css-in-js", | ||
"license": "MIT", | ||
"author": "gucong3000", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"files": [ | ||
"*.js" | ||
], | ||
"scripts": { | ||
"debug": "npm run mocha -- --inspect-brk", | ||
"format": "prettier . --write", | ||
"lint": "npm-run-all --parallel lint:*", | ||
"lint:formatting": "prettier . --check", | ||
"lint:js": "eslint . --cache --max-warnings=0", | ||
"lint:md": "remark . --quiet --frail", | ||
"mocha": "mocha --no-timeouts", | ||
"release": "np", | ||
"test": "nyc npm run mocha", | ||
"watch": "mocha --watch" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.js": "eslint --cache --fix", | ||
"*.{js,md,yml}": "prettier --write" | ||
}, | ||
"prettier": "@stylelint/prettier-config", | ||
"eslintConfig": { | ||
"extends": [ | ||
"stylelint" | ||
], | ||
"rules": { | ||
"array-callback-return": "off", | ||
"no-confusing-arrow": "off", | ||
"no-else-return": "off", | ||
"prefer--template": "off", | ||
"prefer-object-spread": "off", | ||
"prefer-rest-params": "off", | ||
"prefer-spread": "off", | ||
"prefer-template": "off", | ||
"jest/expect-expect": "off", | ||
"jest/valid-expect": "off" | ||
} | ||
}, | ||
"remarkConfig": { | ||
"plugins": [ | ||
"@stylelint/remark-preset" | ||
] | ||
}, | ||
"nyc": { | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
], | ||
"all": true, | ||
@@ -41,24 +81,15 @@ "cache": true, | ||
"**/.{prettier,eslint,mocha}rc.{js,cjs}" | ||
], | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
] | ||
}, | ||
"scripts": { | ||
"format": "prettier . --write", | ||
"lint:formatting": "prettier . --check", | ||
"lint:js": "eslint .", | ||
"lint": "npm-run-all --parallel lint:*", | ||
"mocha": "mocha --no-timeouts", | ||
"test": "nyc npm run mocha", | ||
"watch": "mocha --watch", | ||
"debug": "npm run mocha -- --inspect-brk", | ||
"release": "np" | ||
}, | ||
"dependencies": { | ||
"@babel/core": ">=7.9.0" | ||
}, | ||
"peerDependencies": { | ||
"postcss": ">=7.0.0", | ||
"postcss-syntax": ">=0.36.2" | ||
}, | ||
"devDependencies": { | ||
"autoprefixer": "^9.7.5", | ||
"@stylelint/prettier-config": "^2.0.0", | ||
"@stylelint/remark-preset": "^1.0.0", | ||
"autoprefixer": "^9.7.6", | ||
"chai": "^4.2.0", | ||
@@ -68,10 +99,10 @@ "codecov": "^3.6.5", | ||
"eslint-config-prettier": "^6.10.1", | ||
"eslint-config-stylelint": "^11.1.0", | ||
"husky": "^4.2.3", | ||
"json5": "^2.1.2", | ||
"lint-staged": "^10.1.1", | ||
"eslint-config-stylelint": "^12.0.0", | ||
"husky": "^4.2.5", | ||
"json5": "^2.1.3", | ||
"lint-staged": "^10.1.3", | ||
"mocha": "^7.1.1", | ||
"np": "^6.2.0", | ||
"np": "^6.3.2", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^15.0.0", | ||
"nyc": "^15.0.1", | ||
"postcss": ">=7.0.27", | ||
@@ -81,30 +112,12 @@ "postcss-parser-tests": "^6.5.0", | ||
"postcss-syntax": ">=0.36.2", | ||
"prettier": "^2.0.2" | ||
"prettier": "^2.0.4", | ||
"remark-cli": "^8.0.0" | ||
}, | ||
"peerDependencies": { | ||
"postcss": ">=7.0.0", | ||
"postcss-syntax": ">=0.36.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.js": "eslint --cache --fix", | ||
"*.{js,md,yml}": "prettier --write" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"stylelint", | ||
"prettier" | ||
], | ||
"rules": { | ||
"jest/valid-expect": "off" | ||
} | ||
}, | ||
"eslintIgnore": [ | ||
"test/fixtures/*", | ||
"coverage/**", | ||
".nyc_output/**" | ||
] | ||
} | ||
} |
@@ -7,3 +7,3 @@ # PostCSS CSS-in-JS Syntax | ||
title="Philosopher’s stone, logo of PostCSS" | ||
src="http://postcss.github.io/postcss/logo.svg"> | ||
src="https://api.postcss.org/logo.svg"> | ||
@@ -10,0 +10,0 @@ [PostCSS](https://github.com/postcss/postcss) syntax for parsing [CSS in JS](https://github.com/MicheleBertoli/css-in-js) literals: |
@@ -51,3 +51,3 @@ 'use strict'; | ||
const templateLiteralStyles = input.templateLiteralStyles.filter( | ||
(style) => style.startIndex <= end && start < style.endIndex | ||
(style) => style.startIndex <= end && start < style.endIndex, | ||
); | ||
@@ -178,3 +178,3 @@ | ||
/:\d+:\d+:/, | ||
':' + error.line + ':' + error.column + ':' | ||
':' + error.line + ':' + error.column + ':', | ||
); | ||
@@ -199,4 +199,4 @@ } | ||
}, | ||
style.opts | ||
) | ||
style.opts, | ||
), | ||
); | ||
@@ -203,0 +203,0 @@ } catch (error) { |
@@ -9,3 +9,3 @@ 'use strict'; | ||
.replace(/^(o|ms|moz|khtml|epub|(\w+-?)*webkit)(?=-)/i, '-$1') | ||
: s | ||
: s, | ||
); | ||
@@ -12,0 +12,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40841
21
24
1242