Skip to content

Commit

Permalink
- upgraded prettier
Browse files Browse the repository at this point in the history
- installed eslint integrations
- removed tslint
- added rules to match old tslint rules
- ran linter on ts_src and tests
  • Loading branch information
Feli committed Dec 5, 2022
1 parent 550ac73 commit 1724115
Show file tree
Hide file tree
Showing 42 changed files with 6,125 additions and 1,124 deletions.
57 changes: 57 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"rules": {
"prettier/prettier": ["error", {
"singleQuote": true,
"trailingComma": "all",

"endOfLine": "auto",
"arrowParens": "avoid",
"tabWidth": 2
}],

"arrow-body-style": "off",
"prefer-arrow-callback": "off",

"@typescript-eslint/array-type": 0,
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": "off",

"arrow-parens": "off",
"curly": "off",
"no-case-declarations": "off",

"quotes": "off",
"@typescript-eslint/quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"prefer-rest-params": "off",
"no-bitwise": "off",
"no-console": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],

"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",

"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "off",

"space-before-function-paren": "off"
},
"env": {
"browser": true,
"amd": true,
"node": true
}
}

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.d.ts
5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all"
"trailingComma": "all",
"endOfLine": "auto",
"arrowParens": "avoid",
"tabWidth": 2
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Refer to the [Git manual](https://git-scm.com/doc) for any information about `gi


## Regarding TypeScript
This library is written in TypeScript with tslint, prettier, and the tsc transpiler. These tools will help during testing to notice improper logic before committing and sending a pull request.
This library is written in TypeScript with eslint, prettier, and the tsc transpiler. These tools will help during testing to notice improper logic before committing and sending a pull request.

Some rules regarding TypeScript:

Expand Down
Loading

0 comments on commit 1724115

Please sign in to comment.