Skip to content

Commit

Permalink
getPostcssResult: remove unneeded variable fallback (#5640)
Browse files Browse the repository at this point in the history
* getPostcssResult: remove unneeded variable fallback

* Update getPostcssResult.js
  • Loading branch information
XhmikosR committed Oct 24, 2021
1 parent 2bd5ba9 commit 76ad75f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/getPostcssResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,7 @@ const previouslyInferedExtensions = {
* @returns {Syntax}
*/
function cssSyntax(stylelint, filePath) {
const fileExtension = filePath
? path
.extname(filePath || '')
.slice(1)
.toLowerCase()
: '';

const fileExtension = filePath ? path.extname(filePath).slice(1).toLowerCase() : '';
const extensions = ['css', 'pcss', 'postcss'];

if (previouslyInferedExtensions[fileExtension]) {
Expand Down

0 comments on commit 76ad75f

Please sign in to comment.