Skip to content

Commit

Permalink
package.json: properly configure xo and postcss
Browse files Browse the repository at this point in the history
xo doesn't understand CSS syntax so it was useless that it was checking CSS files.

Also, configure autoprefixer so that its changes do not need a prettier fix after that.

Signed-off-by: XhmikosR <[email protected]>
  • Loading branch information
XhmikosR committed Feb 22, 2025
1 parent 1d220bf commit 9fe93df
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"prettier:check": "prettier -l \"style/*.css\" \"style/themes/*.css\" \"scripts/**/*.js\"",
"prettier:fix": "prettier --write \"style/*.css\" \"style/themes/*.css\" \"scripts/**/*.js\"",
"xo": "xo",
"xo:check": "npm run xo -- \"style/*.css\" \"style/themes/*.css\" \"scripts/**\"",
"xo:fix": "npm run xo -- --fix \"style/*.css\" \"style/themes/*.css\" \"scripts/**\"",
"xo:check": "npm run xo",
"xo:fix": "npm run xo -- --fix",
"test": "npm run prettier:check && npm run xo:check",
"testpr": "npm run prettier:fix && git diff --ws-error-highlight=all --color=always --exit-code && npm run xo:check"
},
Expand Down Expand Up @@ -91,11 +91,13 @@
}
],
"unicorn/filename-case": "off",
"unicorn/no-anonymous-default-export": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-document-cookie": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-node-append": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-query-selector": "off",
Expand Down
11 changes: 11 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-env node */

"use strict";

module.exports = (/* ctx */) => ({
plugins: {
autoprefixer: {
cascade: false,
},
},
});

0 comments on commit 9fe93df

Please sign in to comment.