Skip to content

Commit

Permalink
Ran sortier and prettier on codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
k2snowman69 committed Nov 19, 2018
1 parent e8b3bb4 commit 2c190fe
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 53 deletions.
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
{
"name": "@snowcoders/sortier",
"version": "2.2.0",
"description": "An opionated code sorter",
"author": "Snowcoders",
"bin": {
"sortier": "./bin/index.js"
},
"main": "./dist/index.js",
"scripts": {
"build-production": "npm run build -- -p ./tsconfig.production.json",
"build": "tsc",
"clean": "rimraf .nyc_output coverage dist",
"cover": "nyc report --reporter=text-lcov | coveralls",
"mocha": "mocha --require ts-node/register --require source-map-support/register --full-trace ./src/**/*.test.ts",
"prepare": "npm run clean && npm run build-production",
"start": "npm run build && node bin/index.js",
"test": "nyc npm run mocha"
"dependencies": {
"cosmiconfig": "5.0.7",
"flow-parser": "0.86.0",
"fs": "0.0.1-security",
"globby": "8.0.1",
"rimraf": "2.6.2",
"typescript-estree": "5.0.1",
"typescript": "3.1.6"
},
"keywords": [
"order",
"alphabetize",
"sorter",
"sort",
"sorting",
"import",
"module"
],
"author": "Snowcoders",
"license": "MIT",
"repository": "github:snowcoders/sortier",
"description": "An opionated code sorter",
"devDependencies": {
"@angular/compiler": "7.0.4",
"@types/chai": "4.1.7",
Expand All @@ -50,13 +35,29 @@
"ts-node": "7.0.1",
"tslint": "5.11.0"
},
"dependencies": {
"cosmiconfig": "5.0.7",
"flow-parser": "0.86.0",
"fs": "0.0.1-security",
"globby": "8.0.1",
"rimraf": "2.6.2",
"typescript": "3.1.6",
"typescript-estree": "5.0.1"
}
"keywords": [
"order",
"alphabetize",
"sorter",
"sort",
"sorting",
"import",
"module"
],
"license": "MIT",
"main": "./dist/index.js",
"name": "@snowcoders/sortier",
"repository": "github:snowcoders/sortier",
"scripts": {
"build-production": "npm run build -- -p ./tsconfig.production.json",
"build": "tsc",
"clean": "rimraf .nyc_output coverage dist",
"cover": "nyc report --reporter=text-lcov | coveralls",
"mocha": "mocha --require ts-node/register --require source-map-support/register --full-trace ./src/**/*.test.ts",
"prepare": "npm run clean && npm run build-production",
"prettier": "prettier",
"start": "npm run build && node bin/index.js",
"test": "nyc npm run mocha"
},
"version": "2.2.0"
}
4 changes: 1 addition & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"extends": [
"snowcoders"
]
"extends": ["snowcoders"]
}
8 changes: 7 additions & 1 deletion src/reprinter/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { ILanguage } from "../language";
import { HtmlReprinter } from "../language-html";
import { JavascriptReprinter } from "../language-js";
import { JsonReprinter } from "../language-json";
import { ReprinterOptions } from "../reprinter-options";
import { FileUtils } from "../utilities/file-utils";

export class Reprinter {
private static reprinters: ILanguage[] = [new JavascriptReprinter()];
private static reprinters: ILanguage[] = [
new HtmlReprinter(),
new JavascriptReprinter(),
new JsonReprinter()
];
public static rewrite(filename: string, options: ReprinterOptions) {
let language: null | ILanguage = null;
for (let reprinter of Reprinter.reprinters) {
Expand Down
20 changes: 10 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"declaration": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"module": "commonjs",
"target": "es2015",
"moduleResolution": "node",
"noImplicitAny": false,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": false,
"declaration": true,
"experimentalDecorators": true,
"noUnusedLocals": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist/",
"preserveConstEnums": true,
"sourceMap": true,
"strictNullChecks": true,
"preserveConstEnums": true
"target": "es2015"
},
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/**/*.test.ts", "./src/**/*.test.tsx"]
"exclude": ["./src/**/*.test.ts", "./src/**/*.test.tsx"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}
10 changes: 5 additions & 5 deletions tsconfig.production.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": false,
}
}
"compilerOptions": {
"sourceMap": false
},
"extends": "./tsconfig.json"
}

0 comments on commit 2c190fe

Please sign in to comment.