sketch-spellcheck-assistant-1.0.1.zip
- I had to replace rmdir /s/q dist in the build script in package.json with rm -rf, probably because you're using Windows and I'm on macOS. Maybe there's a command that works cross platform.
"test": "jest --no-cache",
"build": "rm -rf /s/q dist && npm run build:node && npm run build:sketch",
"build-windows": "rmdir /s/q dist && npm run build:node && npm run build:sketch", // For windows
"build:node": "tsc",
"build:sketch": "webpack",
"package-tarball": "npm run build && npm pack",
"ptw":"npm run build-windows && npm pack" // For windows
-
Make sure to use your Assistant name, sketch-assistant-spell-check or perhaps better sketch-spellcheck-assistant, sketch-simple-spellchecker-assistant or something similar across your code base. For the last two you could perhaps import the package.json using import pkg from '../package.json and use pkg.name?
https://github.com/narendrasinghrathore/sketch-assistant-spell-check/blob/master/package.json#L2 https://github.com/narendrasinghrathore/sketch-assistant-spell-check/blob/master/src/index.ts#L97 https://github.com/narendrasinghrathore/sketch-assistant-spell-check/blob/master/src/index.ts#L101 -
Consider changing the rule title to "Use correct spelling", i.e. make it clear what is expected from the user, see https://developer.sketch.com/assistants/rules-and-reports for best practice.
-
Similar for the rule description, maybe better "Use correct spelling in your text layers" to instruct the user what to do.
-
Instead of textNoLoremIpsum use a variable name that defines more what the rule does, e.g. correctSpelling or spellCheck
-
I don't think @skpm/fs should be a dependency. It can only be used within the Sketch Plugin JavaScript environment which dynamically exposes the Objective-C runtime and is entirely different from the Assistants environment.
-
Text transformation while looping removed and also limiting the iteration for suggestion list.