Skip to content

Commit

Permalink
Merge pull request #3334 from marcalexiei/typescript-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei authored Oct 25, 2020
2 parents 4ea9303 + 9e291b8 commit e832206
Show file tree
Hide file tree
Showing 509 changed files with 15,971 additions and 8,589 deletions.
6 changes: 1 addition & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.js]
[*.{js,ts}]
indent_style = space
indent_size = 2

[*.md]
indent_style = space
indent_size = 4

[*.ts]
indent_style = space
indent_size = 4
30 changes: 0 additions & 30 deletions .eslintrc

This file was deleted.

175 changes: 175 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript"
],
"env": {
"es6": true
},
"plugins": [
"prettier",
"import"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"parser": "@typescript-eslint/parser",
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [
".ts"
]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "./tsconfig.json"
}
}
},
"rules": {
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"pathGroups": [
{
"pattern": "config/**",
"group": "internal"
},
{
"pattern": "model/**",
"group": "internal"
},
{
"pattern": "parse/**",
"group": "internal"
},
{
"pattern": "shared/**",
"group": "internal"
},
{
"pattern": "types/**",
"group": "internal"
},
{
"pattern": "utils/**",
"group": "internal"
},
{
"pattern": "view/**",
"group": "internal"
}
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"prettier/prettier": [
"error",
{
"printWidth": 100,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "none"
}
],
"linebreak-style": [
"error",
"unix"
],
"no-mixed-spaces-and-tabs": [
"error",
"smart-tabs"
],
"no-class-assign": "error",
"no-cond-assign": "off",
"no-const-assign": "error",
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"no-control-regex": "off",
"no-this-before-super": "error",
"no-var": "error",
"object-shorthand": [
"error",
"always"
],
"one-var": [
"error",
{
"initialized": "never"
}
],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"no-useless-escape": 0,
"no-console": "error",
"no-dupe-class-members": "off",

// TODO add @typescript-eslint/naming-convention rule
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-empty-function": [
"error",
{
"allow": [
"methods"
]
}
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Function": false
},
"extendDefaults": true
}
]
},
"overrides": [
{
// disable typescript rules for JS files
"files": [
"**/*.js"
],
"rules": {
"no-dupe-class-members": "error",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ perf/control/*

# Log files
*.log

# Documentation
docs
13 changes: 13 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"default": true,
"ul-indent": {
"indent": 2
},
"no-multiple-blanks": {
"maximum": 2
},
"no-trailing-punctuation": {
"punctuation": ""
},
"line-length": false
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-dev=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
12
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: false
language: node_js
node_js:
- '8'
- '12'
cache:
directories:
- node_modules
Expand Down
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"davidanson.vscode-markdownlint"
],
}
9 changes: 7 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
"statusBarItem.hoverBackground": "#00919b",
"statusBar.foreground": "#15202b"
},
"peacock.color": "#00c1ce"
}
"editor.rulers": [100],
"peacock.color": "#00c1ce",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Loading

0 comments on commit e832206

Please sign in to comment.