Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1054f7f
Replace instances of require() with import
agibson-godaddy Feb 28, 2025
f1be39f
Move config to separate file that we can export
agibson-godaddy Mar 12, 2025
67e1f65
Initialize config from inside sake file
agibson-godaddy Mar 12, 2025
ea38b7a
Refactor replacement pipes
agibson-godaddy Mar 12, 2025
b9ad28d
Export scripts
agibson-godaddy Mar 12, 2025
d05267b
Refactor validation task
agibson-godaddy Mar 12, 2025
95ae9ed
Refactor bump task
agibson-godaddy Mar 12, 2025
d6cb231
Rework wc tasks
agibson-godaddy Mar 13, 2025
a6a6826
Only import the fs function we use
agibson-godaddy Mar 13, 2025
742c38a
Rework config task
agibson-godaddy Mar 13, 2025
b20d287
Rework linting
agibson-godaddy Mar 13, 2025
c87cc19
Rework imagemin
agibson-godaddy Mar 13, 2025
a8d9bd3
Adjust gulpif import
agibson-godaddy Mar 14, 2025
8f118fe
Rework shell tasks
agibson-godaddy Mar 14, 2025
47a4296
Rework watch
agibson-godaddy Mar 14, 2025
6e429df
Rework styles
agibson-godaddy Mar 14, 2025
975f55e
Rework makepot
agibson-godaddy Mar 14, 2025
0a99b85
Rework decaffeinate
agibson-godaddy Mar 14, 2025
08d14e1
Rework clean tasks
agibson-godaddy Mar 14, 2025
2182c87
Rework compile task
agibson-godaddy Mar 14, 2025
f1ff8e8
Rework scripts
agibson-godaddy Mar 14, 2025
0f20169
Rework github tasks
agibson-godaddy Mar 14, 2025
d235325
Rework zip
agibson-godaddy Mar 14, 2025
75f1ebb
Rework prompt
agibson-godaddy Mar 14, 2025
40a5a55
Rework bundle
agibson-godaddy Mar 14, 2025
06141a6
Use task suffix in constants
agibson-godaddy Mar 14, 2025
beafea5
Use task suffix
agibson-godaddy Mar 14, 2025
5c517b0
Use task suffix
agibson-godaddy Mar 14, 2025
e1c28d6
Use task suffix
agibson-godaddy Mar 14, 2025
a68bfe0
Use task suffix
agibson-godaddy Mar 14, 2025
0370715
Start reworking deploy
agibson-godaddy Mar 14, 2025
59a5cca
Rework deploy tasks
agibson-godaddy Mar 17, 2025
d0bae0f
Update prerelease tasks
agibson-godaddy Mar 17, 2025
c0a821b
Update upfw tasks
agibson-godaddy Mar 17, 2025
1291ccd
Update naming
agibson-godaddy Mar 17, 2025
0212867
Update naming
agibson-godaddy Mar 17, 2025
c79a6e0
Fix import
agibson-godaddy Mar 17, 2025
c1ccfcf
Update deprecated sass import
agibson-godaddy Mar 17, 2025
2b08904
Remove console log
agibson-godaddy Mar 19, 2025
df04967
Rework how series is created
agibson-godaddy Mar 19, 2025
d72c2ba
Add force option
agibson-godaddy Mar 25, 2025
54ba0b3
Fix conflicts
agibson-godaddy Aug 22, 2025
bc3f35d
Apply changes from master
agibson-godaddy Aug 22, 2025
4828df1
Apply suggestions from code review
agibson-godaddy Aug 22, 2025
b7ba4da
Execute codename as a function
agibson-godaddy Aug 22, 2025
2bb4f13
Fix typo
agibson-godaddy Aug 22, 2025
d10d31c
FIx merge conflict
agibson-godaddy Jan 20, 2026
17ce641
Update gulp-cli
agibson-godaddy Jan 20, 2026
e5a986f
JS linting
agibson-godaddy Jan 21, 2026
c3aa411
Fix merge conflicts
agibson-godaddy Feb 5, 2026
ea3b225
Add eslintConfigFile to sake config & update usage
agibson-godaddy Feb 5, 2026
3071c57
Replace consoel logs with log.info
agibson-godaddy Feb 5, 2026
bb160b1
Extract common argument checks into helpers
agibson-godaddy Feb 5, 2026
8185cf9
Remove unnecessary try/catch
agibson-godaddy Feb 5, 2026
4c58d4a
Rename argument
agibson-godaddy Feb 5, 2026
afc3ccc
Rework default rules & extend recommended JS ones
agibson-godaddy Feb 5, 2026
e8c598e
Add support for excluding lint files via config
agibson-godaddy Feb 5, 2026
29a5e36
Add some default rules
agibson-godaddy Feb 5, 2026
c7ed746
Rules
agibson-godaddy Feb 5, 2026
3a205e7
Add all rules from old config
agibson-godaddy Feb 5, 2026
51480ac
Remove extra line
agibson-godaddy Feb 5, 2026
2414781
Fix log message about unfixable errors
agibson-godaddy Feb 5, 2026
8f6dea9
Correct flag name
agibson-godaddy Feb 5, 2026
72e53f5
Rework format
agibson-godaddy Feb 5, 2026
dec4495
Tweak comment
agibson-godaddy Feb 5, 2026
3ebc4fb
Rework decaffeinate so that we only lint the converted files
agibson-godaddy Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions helpers/arguments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Helper functions for checking command line arguments
*/

/**
* Check if a specific argument is present in process.argv
* @param {string} arg - The argument to check for (including dashes, e.g., '--fix')
* @returns {boolean}
*/
const hasArg = (arg) => {
return process.argv.includes(arg)
}

/**
* Check if the --fix flag is present
* @returns {boolean}
*/
const shouldFix = () => {
return hasArg('--fix')
}

/**
* Check if the --skip-linting flag is present
* @returns {boolean}
*/
const shouldSkipLinting = () => {
return hasArg('--skip-linting')
}

/**
* Check if the --fail-on-lint-errors flag is present
* @returns {boolean}
*/
const shouldFailOnLintErrors = () => {
return hasArg('--fail-on-lint-errors')
}

/**
* Check if the --show-files flag is present
* @returns {boolean}
*/
const shouldShowFiles = () => {
return hasArg('--show-files')
}

export {
hasArg,
shouldFix,
shouldSkipLinting,
shouldFailOnLintErrors,
shouldShowFiles
}
6 changes: 5 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ const buildSakeConfig = () => {
// dev environment and workflow, not to a particular repo.
tasks: {
lint: {
stylelintConfigFile: null // will use the default bundled one
stylelintConfigFile: null, // will use the default bundled one
eslint: {
configFile: null, // will use the default bundled one
excludeFiles: null // array of patterns to exclude from linting
}
},
makepot: {
reportBugsTo: 'https://woocommerce.com/my-account/marketplace-ticket-form/',
Expand Down
3 changes: 0 additions & 3 deletions lib/lintfiles/.eslintrc

This file was deleted.

75 changes: 75 additions & 0 deletions lib/lintfiles/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import jsdoc from "eslint-plugin-jsdoc";

export default defineConfig([
globalIgnores([
"**/vendor/**",
"**/*.min.js"
]),
{
...js.configs.recommended,
files: ["**/*.js"],
plugins: {
js,
jsdoc,
},
languageOptions: {
ecmaVersion: 2024,
sourceType: 'script',
globals: {
window: 'readonly',
document: 'readonly',
jQuery: 'readonly',
$: 'readonly',
console: 'readonly',
define: 'readonly',
require: 'readonly'
}
},
rules: {
'semi': ['error', 'always'],
'space-before-blocks': 'error',
'space-before-function-paren': ['error', 'never'],
'keyword-spacing': 'error',
'object-curly-spacing': ['error', 'always'],
'comma-dangle': ['error', 'never'],
'no-trailing-spaces': 'error',
'no-undef': 'warn',
'no-unused-vars': ['warn', { 'args': 'none', 'varsIgnorePattern': '^_' }],
'array-bracket-spacing': ['error', 'always', { 'arraysInArrays': true }],
'key-spacing': ['error', { 'beforeColon': false, 'afterColon': true, 'align': 'value' }],
'space-in-parens': ['error', 'always'],
'camelcase': ['error', { 'properties': 'never' }],
'eqeqeq': 'warn',
'no-multiple-empty-lines': 'warn',
'padding-line-between-statements': [
'warn',
{ 'blankLine': 'always', 'prev': 'directive', 'next': '*' },
{ 'blankLine': 'any', 'prev': 'directive', 'next': 'directive' },
{ 'blankLine': 'always', 'prev': ['class', 'function'], 'next': '*' },
{ 'blankLine': 'any', 'prev': ['const', 'let', 'var'], 'next': ['const', 'let', 'var'] },
{ 'blankLine': 'always', 'prev': '*', 'next': ['if', 'switch', 'while', 'for', 'throw', 'continue', 'return', 'block-like', 'multiline-block-like', 'multiline-expression'] },
{ 'blankLine': 'always', 'prev': ['if', 'switch', 'while', 'for', 'block-like', 'multiline-block-like', 'multiline-expression'], 'next': '*' }
],
'jsdoc/check-alignment': 'warn',
'jsdoc/check-indentation': 'warn',
'jsdoc/check-param-names': 'warn',
'jsdoc/check-tag-names': 'warn',
'jsdoc/require-description': 'warn',
'jsdoc/require-jsdoc': 'warn',
'jsdoc/require-param': 'warn',
'jsdoc/require-param-name': 'warn',
'jsdoc/require-param-type': 'warn',
'jsdoc/require-returns': 'warn',
'jsdoc/require-returns-check': 'warn',
'jsdoc/require-returns-type': 'warn'
},
settings: {
jsdoc: {
mode: 'jsdoc',
ignorePrivate: true
}
}
}
]);
Loading