-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from TSLint -> ESLint, apply Prettier
- Loading branch information
Showing
16 changed files
with
1,122 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"extends": ["prettier/@typescript-eslint", "plugin:prettier/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"project": "./tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/ban-types": "error", | ||
"camelcase": "off", | ||
"@typescript-eslint/camelcase": "error", | ||
"@typescript-eslint/class-name-casing": "error", | ||
"@typescript-eslint/consistent-type-assertions": "error", | ||
"@typescript-eslint/interface-name-prefix": "error", | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ "multiline": { "delimiter": "none" } } | ||
], | ||
"no-array-constructor": "off", | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"no-empty-function": "off", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"@typescript-eslint/no-inferrable-types": "error", | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-namespace": "error", | ||
"@typescript-eslint/no-this-alias": "error", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"no-var": "error", | ||
"prefer-const": "error", | ||
"prefer-rest-params": "error", | ||
"prefer-spread": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"endOfLine": "lf", | ||
"parser": "typescript", | ||
"printWidth": 120, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { format as prettify } from 'prettier' | ||
import { Options } from './' | ||
import {format as prettify} from 'prettier' | ||
import {Options} from './' | ||
|
||
export function format(code: string, options: Options): string { | ||
return prettify(code, { parser: 'typescript', ...options.style }) | ||
return prettify(code, {parser: 'typescript', ...options.style}) | ||
} |
Oops, something went wrong.