Closed zepumph closed 1 month ago
Turns out that perennial/common/buildLocal.js already existed, so I could just add on brands with a good default. The lint rules are complete. @samreid can you give me a spot check?
When I rename a grunt task like commits-since.ts to commitsSince.ts, the rule allows it since the regex still passes. How should we proceed? Keep in mind kite has generate-svgPath-parser.ts
@samreid and I will rename (un)published-readme
and the kite task svgPath
to lower case and then commit this patch:
Subject: [PATCH] fdas
---
Index: eslint/rules/grunt-task-kebab-case.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/eslint/rules/grunt-task-kebab-case.js b/eslint/rules/grunt-task-kebab-case.js
--- a/eslint/rules/grunt-task-kebab-case.js (revision 7c07e0fce43f066ccf8e40b8c36d947037991c7f)
+++ b/eslint/rules/grunt-task-kebab-case.js (date 1729200177441)
@@ -14,7 +14,7 @@
//------------------------------------------------------------------------------
const isGruntTaskFileRegex = /[\\/]grunt[\\/]tasks[\\/]?/;
-const validKebabCase = /^[a-z][a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/;
+const validKebabCase = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
const path = require( 'path' );
module.exports = {
@@ -36,7 +36,7 @@
context.report( {
node: node,
loc: node.loc,
- message: `files in "grunt/tasks/" must use kebab-case by convention (no snake or camel): ${parsed.filename}`
+ message: `files in "grunt/tasks/" must use kebab-case by convention (no snake or camel): ${parsed.base}`
} );
}
}
The rule and renames have been pushed. Commits from today are on development branches, but everything is behaving well there. I'll keep open until branches are merged to main.
Last todo handled. Pushed to main. Ready to close.
From https://github.com/phetsims/chipper/issues/1464#issuecomment-2383819582
grunt/tasks/
if outside ofgrunt/tasks/
grunt/tasks/
cannot be camel case, they must be kabob (because they often call their camelCase counterpart injs/grunt/
)I'll take a look.