1.0.4 • Published 4 years ago

wordcop v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

wordcop

Is your naming convention correct? The naming you think is correct may not be correct for the code you have built so far.This is a tool that automatically diagnoses your naming according to the rules. This tool dedicated to TypeScript projects, Diagnose rules followed based on variable type inference.The target of diagnosis is the source code included in "rootDir" described in tsconfig.json. Typical primitives (boolean, number, string) and arrays are targeted. Regular expressions can be edited freely.

usage

First, set up wordcop.config.js. Write the regular expression in the configuration file as follows.

module.exports = {
  targetDir: ".", // Project path where sconfig.json is located
  regExpChecker: { // Regular expression rules to apply to variables
    boolean: /^(is|has|should)/i,
    number: /.*(count|size|length)$/i,
    string: /.*(label|str)$/i,
    array: /.*(s|es|ies|list|items)$/i
  }
}

All you have to do is run npx wordcop.

$ npx wordcop
/~/example-app/index.ts:5:7 👮‍♂️ <  /.*(count|size|length)$/i
1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago