Skip to content

Commit

Permalink
Prettier and linter would differ in configuration
Browse files Browse the repository at this point in the history
- Prettier: Preserve quotes
- package.json: Make tslint load the npm way
- nest.ts, generate.command.ts, gulpfile.ts: Prettier changes
  • Loading branch information
x3cion committed Sep 23, 2019
1 parent 91e6f26 commit 3c4c9cc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all"
"trailingComma": "all",
"quoteProps": "preserve",
}
4 changes: 2 additions & 2 deletions bin/nest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { CommandLoader } from '../commands';
const bootstrap = () => {
const program: CommanderStatic = commander;
program
.version(require('../package.json').version)
.usage('<command> [options]');
.version(require('../package.json').version)
.usage('<command> [options]');
CommandLoader.load(program);
commander.parse(process.argv);

Expand Down
6 changes: 2 additions & 4 deletions commands/generate.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ export class GenerateCommand extends AbstractCommand {
const tableConfig = {
head: ['name', 'alias'],
chars: {
// tslint:disable-next-line:quotemark
"left": leftMargin.concat('│'),
'left': leftMargin.concat('│'),
'top-left': leftMargin.concat('┌'),
'bottom-left': leftMargin.concat('└'),
// tslint:disable-next-line:quotemark
"mid": '',
'mid': '',
'left-mid': '',
'mid-mid': '',
'right-mid': '',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": "tsc",
"clean": "gulp clean:bundle",
"format": "prettier --write \"**/*.ts\"",
"lint": "./node_modules/tslint/bin/tslint -p .",
"lint": "tslint -p .",
"start": "node bin/nest.js",
"test": "jest --config test/jest-config.json",
"test:dev": "jest --config test/jest-config.json --watchAll"
Expand Down
1 change: 0 additions & 1 deletion tools/gulp/gulpfile.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
import './tasks/clean';

0 comments on commit 3c4c9cc

Please sign in to comment.