Skip to content

Commit

Permalink
Change flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrii Bormotov committed Feb 22, 2023
1 parent 8e3462f commit 7784361
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ There are two _bin_ files that perform the code checking:
- `ofmt` - prettier formatter. Two options are available:\
`-l, --lint` - a flag to perform checking only. Without the flag `prettier` will rewrite files with fixed formatting.
`-p, --src-path` - defines search path for source code within `format` and `lint` scripts (the scripts added to a project upon installation). Defaults to `./src`. Used only with `install` command.
`-n, --noConfig` - ignores local eslint config files.
`-n, --no-local-config` - ignores local eslint config files.
- `olint` - code quality and best practices linter.

## Examples:
Expand Down
4 changes: 2 additions & 2 deletions ofmt/bin/ofmt.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const args = meow({
flags: {
lint: {type: 'boolean', alias: 'l'},
srcPath: {type: 'string', alias: 'p', default: './src'},
noConfig: {type: 'boolean', alias: 'n'},
localConfig: {type: 'boolean', alias: 'n', default: true},
},
})

Expand All @@ -70,7 +70,7 @@ if (args.input[0] === 'install') {
;[
`npx prettier --${checkOrWrite} --config ${prettierConfigPath} ${args.input}`,
`npx eslint --ext ${eslintExt} --config ${eslintConfigPath} ${args.flags.lint ? '' : '--fix'} ${
args.flags.noConfig ? '--no-eslintrc' : ''
args.flags.localConfig ? '' : '--no-eslintrc'
} ${args.input}`,
].forEach((command) => {
exec(command, (error, stdout, stderr) => {
Expand Down

0 comments on commit 7784361

Please sign in to comment.