Skip to content

Commit c311249

Browse files
committed
refactor: cleanup null checks & update configs
1 parent 9ff6e7f commit c311249

File tree

12 files changed

+1706
-1713
lines changed

12 files changed

+1706
-1713
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
node_modules
3+
rethinkdb_data

.eslintrc

Lines changed: 1 addition & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,3 @@
11
{
2-
"env": {
3-
"es6": true,
4-
"amd": true
5-
},
6-
7-
"root": true,
8-
"ignorePatterns": ["docs/", "dist/", "out/", "rethinkdb_data/", "node_modules/"],
9-
10-
"parserOptions": {
11-
"sourceType": "module",
12-
"ecmaVersion": 2020
13-
},
14-
15-
"extends": ["eslint:recommended", "prettier"],
16-
17-
"rules": {
18-
"arrow-parens": [1, "always"],
19-
"block-spacing": [1, "always"],
20-
"brace-style": [1, "1tbs", { "allowSingleLine": true }],
21-
"comma-dangle": [1, "always-multiline"],
22-
"comma-spacing": [1, { "before": false, "after": true }],
23-
"comma-style": [1, "last"],
24-
"computed-property-spacing": [1, "never"],
25-
"consistent-this": [1, "self"],
26-
"eol-last": 1,
27-
"eqeqeq": [1, "smart"],
28-
"no-inline-comments": 1,
29-
"jsx-quotes": [1, "prefer-double"],
30-
"lines-around-comment": [1, { "beforeBlockComment": false }],
31-
"max-depth": [1, 8],
32-
"max-nested-callbacks": [1, 8],
33-
"new-parens": 1,
34-
"no-array-constructor": 1,
35-
"no-lonely-if": 1,
36-
"no-mixed-spaces-and-tabs": 1,
37-
"no-multiple-empty-lines": 1,
38-
"no-new-object": 1,
39-
"no-spaced-func": 1,
40-
"no-trailing-spaces": 1,
41-
"no-return-await": 1,
42-
"no-undef": 0,
43-
"no-unneeded-ternary": 1,
44-
"no-var": 1,
45-
"object-curly-spacing": [1, "always"],
46-
"operator-linebreak": [1, "after"],
47-
"padded-blocks": [1, "never"],
48-
"prefer-const": ["error", { "destructuring": "any", "ignoreReadBeforeAssign": false }],
49-
"prettier/prettier": 1,
50-
"quotes": [1, "double", { "avoidEscape": true, "allowTemplateLiterals": false }],
51-
"quote-props": [1, "consistent-as-needed"],
52-
"semi": [1, "always"],
53-
"semi-spacing": [1, { "before": false, "after": true }],
54-
"space-before-blocks": [1, "always"],
55-
"space-in-parens": [1, "never"],
56-
"space-infix-ops": [1, { "int32Hint": true }],
57-
"spaced-comment": [1, "always"],
58-
"sort-imports": [
59-
"warn",
60-
{
61-
"ignoreCase": false,
62-
"ignoreDeclarationSort": true,
63-
"ignoreMemberSort": false,
64-
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
65-
"allowSeparatedGroups": false
66-
}
67-
]
68-
},
69-
70-
// Typescript overrides
71-
"overrides": [
72-
{
73-
"files": ["*.ts", "*.tsx"],
74-
"parser": "@typescript-eslint/parser",
75-
"plugins": ["@typescript-eslint", "prettier"],
76-
"extends": [
77-
"eslint:recommended",
78-
"plugin:@typescript-eslint/eslint-recommended",
79-
"plugin:@typescript-eslint/recommended",
80-
"prettier"
81-
],
82-
83-
// Enable if you need jsx support
84-
// "parserOptions": {
85-
// "ecmaFeatures": { "jsx": true }
86-
// },
87-
88-
"rules": {
89-
"semi": "off",
90-
"@typescript-eslint/no-unused-vars": "error",
91-
"@typescript-eslint/member-delimiter-style": "error",
92-
"@typescript-eslint/member-ordering": "error",
93-
"@typescript-eslint/type-annotation-spacing": "error",
94-
"@typescript-eslint/semi": [1, "always"],
95-
"@typescript-eslint/no-explicit-any": 0,
96-
"@typescript-eslint/no-var-requires": 0,
97-
"@typescript-eslint/explicit-module-boundary-types": "off",
98-
"@typescript-eslint/ban-ts-comment": "off",
99-
"@typescript-eslint/no-empty-function": "off",
100-
"@typescript-eslint/naming-convention": [
101-
"warn",
102-
{ "selector": "default", "format": ["camelCase"] },
103-
{ "selector": "variableLike", "format": ["camelCase"] },
104-
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE", "PascalCase"] },
105-
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow" },
106-
{ "selector": "memberLike", "format": ["camelCase"] },
107-
{ "selector": "memberLike", "modifiers": ["private"], "format": ["camelCase"], "leadingUnderscore": "require" },
108-
{ "selector": "typeLike", "format": null },
109-
{ "selector": "typeAlias", "format": null },
110-
{ "selector": "typeProperty", "format": null },
111-
{ "selector": "typeParameter", "format": ["PascalCase"], "prefix": ["T"] },
112-
{ "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false } },
113-
{ "selector": "objectLiteralProperty", "format": null },
114-
{ "selector": "enumMember", "format": ["UPPER_CASE"] }
115-
]
116-
}
117-
}
118-
]
2+
"extends": "@sysdotini/eslint-config"
1193
}

.gitattributes

Lines changed: 203 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,203 @@
1-
* text=auto
2-
3-
LICENSE text eol=lf
4-
*.bat text eol=crlf
5-
*.css text eol=lf
6-
*.eslintrc text eol=lf
7-
*.ejs text eol=lf
8-
*.gitattributes text eol=lf
9-
*.gitignore text eol=lf
10-
*.html text eol=lf
11-
*.js text eol=lf
12-
*.json text eol=lf
13-
*.prettierrc text eol=lf
14-
*.sh text eol=lf
15-
*.ts text eol=lf
16-
*.md text eol=lf
17-
*.yml text eol=lf
18-
19-
*.bmp binary
20-
*.gif binary
21-
*.jpeg binary
22-
*.jpg binary
23-
*.map binary
24-
*.png binary
25-
*.tar.gz binary
26-
*.zip binary
1+
## GITATTRIBUTES FOR WEB PROJECTS
2+
#
3+
# These settings are for any web project.
4+
#
5+
# Details per file setting:
6+
# text These files should be normalized (i.e. convert CRLF to LF).
7+
# binary These files are binary and should be left untouched.
8+
#
9+
# Note that binary is a macro for -text -diff.
10+
######################################################################
11+
12+
# Auto detect
13+
## Handle line endings automatically for files detected as
14+
## text and leave all files detected as binary untouched.
15+
## This will handle all files NOT defined below.
16+
* text=auto
17+
18+
# Source code
19+
*.bash text eol=lf
20+
*.bat text eol=crlf
21+
*.cmd text eol=crlf
22+
*.coffee text
23+
*.css text diff=css
24+
*.htm text diff=html
25+
*.html text diff=html
26+
*.inc text
27+
*.ini text
28+
*.js text
29+
*.json text
30+
*.jsx text
31+
*.less text
32+
*.ls text
33+
*.map text -diff
34+
*.od text
35+
*.onlydata text
36+
*.php text diff=php
37+
*.pl text
38+
*.ps1 text eol=crlf
39+
*.py text diff=python
40+
*.rb text diff=ruby
41+
*.sass text
42+
*.scm text
43+
*.scss text diff=css
44+
*.sh text eol=lf
45+
*.sql text
46+
*.styl text
47+
*.tag text
48+
*.ts text
49+
*.tsx text
50+
*.xml text
51+
*.xhtml text diff=html
52+
53+
# Docker
54+
Dockerfile text
55+
56+
# Documentation
57+
*.ipynb text
58+
*.markdown text diff=markdown
59+
*.md text diff=markdown
60+
*.mdwn text diff=markdown
61+
*.mdown text diff=markdown
62+
*.mkd text diff=markdown
63+
*.mkdn text diff=markdown
64+
*.mdtxt text
65+
*.mdtext text
66+
*.txt text
67+
AUTHORS text
68+
CHANGELOG text
69+
CHANGES text
70+
CONTRIBUTING text
71+
COPYING text
72+
copyright text
73+
*COPYRIGHT* text
74+
INSTALL text
75+
license text
76+
LICENSE text
77+
NEWS text
78+
readme text
79+
*README* text
80+
TODO text
81+
82+
# Templates
83+
*.dot text
84+
*.ejs text
85+
*.haml text
86+
*.handlebars text
87+
*.hbs text
88+
*.hbt text
89+
*.jade text
90+
*.latte text
91+
*.liquid text
92+
*.mustache text
93+
*.njk text
94+
*.phtml text
95+
*.tmpl text
96+
*.tpl text
97+
*.twig text
98+
*.vue text
99+
100+
# Configs
101+
*.cnf text
102+
*.conf text
103+
*.config text
104+
.editorconfig text
105+
.env text
106+
.gitattributes text
107+
.gitconfig text
108+
.htaccess text
109+
*.lock text -diff
110+
package.json text eol=lf
111+
package-lock.json text -diff
112+
pnpm-lock.yaml text eol=lf -diff
113+
yarn.lock text -diff
114+
*.toml text
115+
*.yaml text
116+
*.yml text
117+
browserslist text
118+
Makefile text
119+
makefile text
120+
121+
# Heroku
122+
Procfile text
123+
124+
# Graphics
125+
*.ai binary
126+
*.bmp binary
127+
*.eps binary
128+
*.gif binary
129+
*.gifv binary
130+
*.ico binary
131+
*.jng binary
132+
*.jp2 binary
133+
*.jpg binary
134+
*.jpeg binary
135+
*.jpx binary
136+
*.jxr binary
137+
*.pdf binary
138+
*.png binary
139+
*.psb binary
140+
*.psd binary
141+
# SVG treated as an asset (binary) by default.
142+
*.svg text
143+
# If you want to treat it as binary,
144+
# use the following line instead.
145+
# *.svg binary
146+
*.svgz binary
147+
*.tif binary
148+
*.tiff binary
149+
*.wbmp binary
150+
*.webp binary
151+
152+
# Audio
153+
*.kar binary
154+
*.m4a binary
155+
*.mid binary
156+
*.midi binary
157+
*.mp3 binary
158+
*.ogg binary
159+
*.ra binary
160+
161+
# Video
162+
*.3gpp binary
163+
*.3gp binary
164+
*.as binary
165+
*.asf binary
166+
*.asx binary
167+
*.fla binary
168+
*.flv binary
169+
*.m4v binary
170+
*.mng binary
171+
*.mov binary
172+
*.mp4 binary
173+
*.mpeg binary
174+
*.mpg binary
175+
*.ogv binary
176+
*.swc binary
177+
*.swf binary
178+
*.webm binary
179+
180+
# Archives
181+
*.7z binary
182+
*.gz binary
183+
*.jar binary
184+
*.rar binary
185+
*.tar binary
186+
*.zip binary
187+
188+
# Fonts
189+
*.ttf binary
190+
*.eot binary
191+
*.otf binary
192+
*.woff binary
193+
*.woff2 binary
194+
195+
# Executables
196+
*.exe binary
197+
*.pyc binary
198+
199+
# RC files (like .babelrc or .eslintrc)
200+
*.*rc text
201+
202+
# Ignore files (like .npmignore or .gitignore)
203+
*.*ignore text

0 commit comments

Comments
 (0)