0.0.7 • Published 2 years ago

ksr-cfp v0.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Code Format Plugin

Install


$ npm install ksr-cfp

Usage


prettier requires at least version 10.13.0 of Node

$ ksr-cfp -d FilePath -p .prettierrc.json -c true 

Options


ParamRequiredDefaultAliasIntroduce
-dfalse.--directoryFile Path
-pfalse-path--find-config-path and --config
-cfalsefalse--cliexcute CLI

Format Configuration Schema


{
  "parser": "babel",
  "printWidth": 120, 
  "semi": true, 
  "singleQuote": true,
  "pugAttributeSeparator":"always",
  "pugClosingBracketPosition":"new-line",
  "pugCommentPreserveSpaces":"keep-all",
  "pugSortAttributes":"as-is",
  "tslintIntegration":"false" ,
  "stylelintIntegration" : "false",
  "arrowParens": "always",
  "bracketSpacing": true,
  "embeddedLanguageFormatting": "auto",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxBracketSameLine": false,
  "jsxSingleQuote": false,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false,
  "vueIndentScriptAndStyle": false
}

1、 more options >>

2、All Schema >>

Support


File Suffix or Valid optionsPlugin
*.pug@prettier/plugin-pug
*.ts@typescript-eslint/typescript-estree
*.css、*.scss、*.lesspostcss-scss and postcss-less
*.json 、*.json5@babel/parser parseExpression
*.mdremark-parse
*.html、*.vue 、*.ag(angular)angular-html-parser
*.yamlyaml and yaml-unist-parser
graphqlgraphql/language
babel , babel-flow@babel/parser
babel-tstypescript
flowflow-parse

Flow

npm.io